blob: cbd1c16e0962f7537810b1a4d95a44228d6a26a2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersond78735d2010-01-01 16:04:23 +00002# From configure.in Revision: 77196 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001889# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001890if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892 case $enableval in
1893 yes)
1894 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1895 ;;
1896 esac
1897 case $enableval in
1898 no)
1899 UNIVERSALSDK=
1900 enable_universalsdk=
1901 ;;
1902 *)
1903 UNIVERSALSDK=$enableval
1904 ;;
1905 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001906
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907else
1908
1909 UNIVERSALSDK=
1910 enable_universalsdk=
1911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001912fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001913
1914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001915
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001916
1917
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001918UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001920{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1921echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922
1923# Check whether --with-universal-archs was given.
1924if test "${with_universal_archs+set}" = set; then
1925 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001926 { echo "$as_me:$LINENO: result: $withval" >&5
1927echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928 UNIVERSAL_ARCHS="$withval"
1929
1930else
1931
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001932 { echo "$as_me:$LINENO: result: 32-bit" >&5
1933echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001934
1935fi
1936
1937
1938
1939
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001940
1941# Check whether --with-framework-name was given.
1942if test "${with_framework_name+set}" = set; then
1943 withval=$with_framework_name;
1944 PYTHONFRAMEWORK=${withval}
1945 PYTHONFRAMEWORKDIR=${withval}.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1947
1948else
1949
1950 PYTHONFRAMEWORK=Python
1951 PYTHONFRAMEWORKDIR=Python.framework
1952 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1953
1954fi
1955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001956# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001957if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001958 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001959 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001960 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001961 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001962 esac
1963 case $enableval in
1964 no)
1965 PYTHONFRAMEWORK=
1966 PYTHONFRAMEWORKDIR=no-framework
1967 PYTHONFRAMEWORKPREFIX=
1968 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001969 FRAMEWORKINSTALLFIRST=
1970 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001971 FRAMEWORKALTINSTALLFIRST=
1972 FRAMEWORKALTINSTALLLAST=
1973 if test "x${prefix}" = "xNONE"; then
1974 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1975 else
1976 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1977 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001979 ;;
1980 *)
1981 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001982 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001983 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001984 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
1986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002025fi
2026
Thomas Wouters477c8d52006-05-27 19:21:47 +00002027
2028
Michael W. Hudson54241132001-12-07 15:38:26 +00002029
2030
2031
2032
Jack Jansene578a632001-08-15 01:27:14 +00002033
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002034
2035
2036
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002037
Jack Jansene578a632001-08-15 01:27:14 +00002038##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002039## AC_HELP_STRING(--with-dyld,
2040## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002041##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042# Set name for machine-dependent library files
2043
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002044{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2045echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046if test -z "$MACHDEP"
2047then
Guido van Rossum563e7081996-09-10 18:20:48 +00002048 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002049 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002050 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002054 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_md_system=`echo $ac_sys_system |
2056 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2057 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002058 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002059 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002060
Guido van Rossum07397971997-04-29 21:49:50 +00002061 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002062 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002063 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002064 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002065 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066 esac
2067fi
Guido van Rossum91922671997-10-09 20:24:13 +00002068
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002069# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2070# disable features if it is defined, without any means to access these
2071# features as extensions. For these systems, we skip the definition of
2072# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2073# some feature, make sure there is no alternative way to access this
2074# feature. Also, when using wildcards, make sure you have verified the
2075# need for not defining _XOPEN_SOURCE on all systems matching the
2076# wildcard, and that the wildcard does not include future systems
2077# (which may remove their limitations).
2078case $ac_sys_system/$ac_sys_release in
2079 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2080 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002081 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002082 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002083 define_xopen_source=no
2084 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2085 # also defined. This can be overridden by defining _BSD_SOURCE
2086 # As this has a different meaning on Linux, only define it on OpenBSD
2087
2088cat >>confdefs.h <<\_ACEOF
2089#define _BSD_SOURCE 1
2090_ACEOF
2091
2092 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002093 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2094 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2095 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002096 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 +00002097 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002098 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2099 # of union __?sigval. Reported by Stuart Bishop.
2100 SunOS/5.6)
2101 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002102 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2103 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002104 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002105 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 define_xopen_source=no;;
2107 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002108 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002109 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002110 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002111 # On FreeBSD 4, the math functions C89 does not cover are never defined
2112 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2113 FreeBSD/4.*)
2114 define_xopen_source=no;;
2115 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2116 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2117 # identifies itself as Darwin/7.*
2118 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2119 # disables platform specific features beyond repair.
2120 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2121 # has no effect, don't bother defining them
2122 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002123 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002124 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2125 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2126 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002127 AIX/4)
2128 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002129 AIX/5)
2130 if test `uname -r` -eq 1; then
2131 define_xopen_source=no
2132 fi
2133 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002134 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2135 # defining NI_NUMERICHOST.
2136 QNX/6.3.2)
2137 define_xopen_source=no
2138 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002139
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002140esac
2141
2142if test $define_xopen_source = yes
2143then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002144 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2145 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002146 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2147 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002149 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150
2151cat >>confdefs.h <<\_ACEOF
2152#define _XOPEN_SOURCE 500
2153_ACEOF
2154
2155 ;;
2156 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002157
2158cat >>confdefs.h <<\_ACEOF
2159#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002160_ACEOF
2161
Skip Montanarof0d5f792004-08-15 14:08:23 +00002162 ;;
2163 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002164
2165 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2166 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2167 # several APIs are not declared. Since this is also needed in some
2168 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002169 # except for Solaris 10, where it must not be defined,
2170 # as it implies XPG4.2
2171 case $ac_sys_system/$ac_sys_release in
2172 SunOS/5.10)
2173 ;;
2174 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE_EXTENDED 1
2178_ACEOF
2179
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 ;;
2181 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002183
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002184cat >>confdefs.h <<\_ACEOF
2185#define _POSIX_C_SOURCE 200112L
2186_ACEOF
2187
2188
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002189fi
2190
Guido van Rossum91922671997-10-09 20:24:13 +00002191#
2192# SGI compilers allow the specification of the both the ABI and the
2193# ISA on the command line. Depending on the values of these switches,
2194# different and often incompatable code will be generated.
2195#
2196# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2197# thus supply support for various ABI/ISA combinations. The MACHDEP
2198# variable is also adjusted.
2199#
2200
2201if test ! -z "$SGI_ABI"
2202then
2203 CC="cc $SGI_ABI"
2204 LDFLAGS="$SGI_ABI $LDFLAGS"
2205 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2206fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002207{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2208echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002209
Jack Jansen6b08a402004-06-03 12:41:45 +00002210# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2211# it may influence the way we can build extensions, so distutils
2212# needs to check it
2213
Thomas Wouters477c8d52006-05-27 19:21:47 +00002214
Jack Jansen6b08a402004-06-03 12:41:45 +00002215CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002216EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002217
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002218{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2219echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002220ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002221{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2222echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002223
Guido van Rossum627b2d71993-12-24 10:39:16 +00002224# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002225
2226# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2227# for debug/optimization stuff. BASECFLAGS is for flags that are required
2228# just to get things to compile and link. Users are free to override OPT
2229# when running configure or make. The build should not break if they do.
2230# BASECFLAGS should generally not be messed with, however.
2231
2232# XXX shouldn't some/most/all of this code be merged with the stuff later
2233# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002234{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2235echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002237# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002238if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002239 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002240 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002241 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002242 without_gcc=yes;;
2243 yes) CC=gcc
2244 without_gcc=no;;
2245 *) CC=$withval
2246 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002247 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248else
Martin v. Löwis11437992002-04-12 09:54:03 +00002249
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002250 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002251 AIX*) CC=cc_r
2252 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002253 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002255fi
2256
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002257{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2258echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002259
Guido van Rossum8b131c51995-03-09 14:10:13 +00002260# If the user switches compilers, we can't believe the cache
2261if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2262then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002263 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002264(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002265echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002266(it is also a good idea to do 'make clean' before compiling)" >&2;}
2267 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002268fi
2269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270ac_ext=c
2271ac_cpp='$CPP $CPPFLAGS'
2272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2274ac_compiler_gnu=$ac_cv_c_compiler_gnu
2275if test -n "$ac_tool_prefix"; then
2276 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2277set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002282else
2283 if test -n "$CC"; then
2284 ac_cv_prog_CC="$CC" # Let the user override the test.
2285else
Martin v. Löwis11437992002-04-12 09:54:03 +00002286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002292 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 +00002293 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002295 break 2
2296 fi
2297done
2298done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
Jack Jansendd19cf82001-12-06 22:36:17 +00002301fi
2302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002303CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002304if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002305 { echo "$as_me:$LINENO: result: $CC" >&5
2306echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002312
Martin v. Löwis11437992002-04-12 09:54:03 +00002313fi
2314if test -z "$ac_cv_prog_CC"; then
2315 ac_ct_CC=$CC
2316 # Extract the first word of "gcc", so it can be a program name with args.
2317set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002322else
2323 if test -n "$ac_ct_CC"; then
2324 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2325else
2326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332 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 +00002333 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002335 break 2
2336 fi
2337done
2338done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341fi
2342fi
2343ac_ct_CC=$ac_cv_prog_ac_ct_CC
2344if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002345 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2346echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002348 { echo "$as_me:$LINENO: result: no" >&5
2349echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002352 if test "x$ac_ct_CC" = x; then
2353 CC=""
2354 else
2355 case $cross_compiling:$ac_tool_warned in
2356yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002357{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2358whose name does not start with the host triplet. If you think this
2359configuration is useful to you, please write to autoconf@gnu.org." >&5
2360echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2361whose name does not start with the host triplet. If you think this
2362configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363ac_tool_warned=yes ;;
2364esac
2365 CC=$ac_ct_CC
2366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002367else
2368 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002369fi
2370
Jack Jansendd19cf82001-12-06 22:36:17 +00002371if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372 if test -n "$ac_tool_prefix"; then
2373 # 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 +00002374set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002378 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Martin v. Löwis11437992002-04-12 09:54:03 +00002383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
2388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389 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 +00002390 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002392 break 2
2393 fi
2394done
2395done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398fi
2399fi
2400CC=$ac_cv_prog_CC
2401if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002402 { echo "$as_me:$LINENO: result: $CC" >&5
2403echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002405 { echo "$as_me:$LINENO: result: no" >&5
2406echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002407fi
2408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412if test -z "$CC"; then
2413 # Extract the first word of "cc", so it can be a program name with args.
2414set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002419else
2420 if test -n "$CC"; then
2421 ac_cv_prog_CC="$CC" # Let the user override the test.
2422else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425for as_dir in $PATH
2426do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430 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 +00002431 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2432 ac_prog_rejected=yes
2433 continue
2434 fi
2435 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 break 2
2438 fi
2439done
2440done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002443if test $ac_prog_rejected = yes; then
2444 # We found a bogon in the path, so make sure we never use it.
2445 set dummy $ac_cv_prog_CC
2446 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448 # We chose a different compiler from the bogus one.
2449 # However, it has the same basename, so the bogon will be chosen
2450 # first if we set CC to just the basename; use the full file name.
2451 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 fi
2454fi
2455fi
2456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002457CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002459 { echo "$as_me:$LINENO: result: $CC" >&5
2460echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002462 { echo "$as_me:$LINENO: result: no" >&5
2463echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464fi
2465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466
Martin v. Löwis11437992002-04-12 09:54:03 +00002467fi
2468if test -z "$CC"; then
2469 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 do
2472 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2473set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002478else
2479 if test -n "$CC"; then
2480 ac_cv_prog_CC="$CC" # Let the user override the test.
2481else
Martin v. Löwis11437992002-04-12 09:54:03 +00002482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
2487 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 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 +00002489 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493done
2494done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002496
2497fi
2498fi
2499CC=$ac_cv_prog_CC
2500if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002501 { echo "$as_me:$LINENO: result: $CC" >&5
2502echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002504 { echo "$as_me:$LINENO: result: no" >&5
2505echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002506fi
2507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 test -n "$CC" && break
2510 done
2511fi
2512if test -z "$CC"; then
2513 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
2516 # Extract the first word of "$ac_prog", so it can be a program name with args.
2517set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002522else
2523 if test -n "$ac_ct_CC"; then
2524 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2525else
2526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 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 +00002533 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 break 2
2536 fi
2537done
2538done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541fi
2542fi
2543ac_ct_CC=$ac_cv_prog_ac_ct_CC
2544if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002545 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2546echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 test -n "$ac_ct_CC" && break
2554done
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 if test "x$ac_ct_CC" = x; then
2557 CC=""
2558 else
2559 case $cross_compiling:$ac_tool_warned in
2560yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002561{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2562whose name does not start with the host triplet. If you think this
2563configuration is useful to you, please write to autoconf@gnu.org." >&5
2564echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2565whose name does not start with the host triplet. If you think this
2566configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567ac_tool_warned=yes ;;
2568esac
2569 CC=$ac_ct_CC
2570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002571fi
2572
2573fi
2574
2575
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002577See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002578echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002579See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583echo "$as_me:$LINENO: checking for C compiler version" >&5
2584ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585{ (ac_try="$ac_compiler --version >&5"
2586case "(($ac_try" in
2587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2588 *) ac_try_echo=$ac_try;;
2589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595{ (ac_try="$ac_compiler -v >&5"
2596case "(($ac_try" in
2597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2598 *) ac_try_echo=$ac_try;;
2599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605{ (ac_try="$ac_compiler -V >&5"
2606case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 (exit $ac_status); }
2615
2616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002617/* confdefs.h. */
2618_ACEOF
2619cat confdefs.h >>conftest.$ac_ext
2620cat >>conftest.$ac_ext <<_ACEOF
2621/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623int
2624main ()
2625{
2626
2627 ;
2628 return 0;
2629}
2630_ACEOF
2631ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002632ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633# Try to create an executable without -o first, disregard a.out.
2634# It will help us diagnose broken compilers, and finding out an intuition
2635# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2637echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2638ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2639#
2640# List of possible output files, starting from the most likely.
2641# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2642# only as a last resort. b.out is created by i960 compilers.
2643ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2644#
2645# The IRIX 6 linker writes into existing files which may not be
2646# executable, retaining their permissions. Remove them first so a
2647# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648ac_rmfiles=
2649for ac_file in $ac_files
2650do
2651 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002652 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2654 esac
2655done
2656rm -f $ac_rmfiles
2657
2658if { (ac_try="$ac_link_default"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2669# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2670# in a Makefile. We should not override ac_cv_exeext if it was cached,
2671# so that the user can short-circuit this test for compilers unknown to
2672# Autoconf.
2673for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002674do
2675 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002677 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002678 ;;
2679 [ab].out )
2680 # We found the default executable, but exeext='' is most
2681 # certainly right.
2682 break;;
2683 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2685 then :; else
2686 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2687 fi
2688 # We set ac_cv_exeext here because the later test for it is not
2689 # safe: cross compilers may not add the suffix if given an `-o'
2690 # argument, so we may need to know it at that point already.
2691 # Even if this section looks crufty: it has the advantage of
2692 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002693 break;;
2694 * )
2695 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 esac
2697done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698test "$ac_cv_exeext" = no && ac_cv_exeext=
2699
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002700else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 ac_file=''
2702fi
2703
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002704{ echo "$as_me:$LINENO: result: $ac_file" >&5
2705echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002708sed 's/^/| /' conftest.$ac_ext >&5
2709
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002711See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002713See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002715fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002716
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002717ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002720# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002721{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2722echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002723# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2724# If not cross compiling, check that we can run a simple program.
2725if test "$cross_compiling" != yes; then
2726 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002727 { (case "(($ac_try" in
2728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2729 *) ac_try_echo=$ac_try;;
2730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 (exit $ac_status); }; }; then
2736 cross_compiling=no
2737 else
2738 if test "$cross_compiling" = maybe; then
2739 cross_compiling=yes
2740 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002741 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002742If you meant to cross compile, use \`--host'.
2743See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002744echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002745If you meant to cross compile, use \`--host'.
2746See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 fi
2749 fi
2750fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751{ echo "$as_me:$LINENO: result: yes" >&5
2752echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002753
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002754rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002757# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2759echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2760{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2761echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002763{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2764echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765if { (ac_try="$ac_link"
2766case "(($ac_try" in
2767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2768 *) ac_try_echo=$ac_try;;
2769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002775 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2776# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2777# work properly (i.e., refer to `conftest.exe'), while it won't with
2778# `rm'.
2779for ac_file in conftest.exe conftest conftest.*; do
2780 test -f "$ac_file" || continue
2781 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002782 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002783 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2784 break;;
2785 * ) break;;
2786 esac
2787done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002790See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002792See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002794fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2798echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002799
2800rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002801EXEEXT=$ac_cv_exeext
2802ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2804echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002805if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002806 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002807else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808 cat >conftest.$ac_ext <<_ACEOF
2809/* confdefs.h. */
2810_ACEOF
2811cat confdefs.h >>conftest.$ac_ext
2812cat >>conftest.$ac_ext <<_ACEOF
2813/* end confdefs.h. */
2814
2815int
2816main ()
2817{
2818
2819 ;
2820 return 0;
2821}
2822_ACEOF
2823rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824if { (ac_try="$ac_compile"
2825case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 for ac_file in conftest.o conftest.obj conftest.*; do
2835 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2839 break;;
2840 esac
2841done
2842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002844sed 's/^/| /' conftest.$ac_ext >&5
2845
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002846{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002849See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851fi
2852
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002853rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002855{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2856echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857OBJEXT=$ac_cv_objext
2858ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2860echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002863else
2864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002865/* confdefs.h. */
2866_ACEOF
2867cat confdefs.h >>conftest.$ac_ext
2868cat >>conftest.$ac_ext <<_ACEOF
2869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002870
Martin v. Löwis11437992002-04-12 09:54:03 +00002871int
2872main ()
2873{
2874#ifndef __GNUC__
2875 choke me
2876#endif
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002891 grep -v '^ *+' conftest.er1 >conftest.err
2892 rm -f conftest.er1
2893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (exit $ac_status); } && {
2896 test -z "$ac_c_werror_flag" ||
2897 test ! -s conftest.err
2898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_compiler_gnu=yes
2900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002902sed 's/^/| /' conftest.$ac_ext >&5
2903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906
2907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002908ac_cv_c_compiler_gnu=$ac_compiler_gnu
2909
2910fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002911{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2912echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2913GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_test_CFLAGS=${CFLAGS+set}
2915ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002916{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2917echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002920else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002921 ac_save_c_werror_flag=$ac_c_werror_flag
2922 ac_c_werror_flag=yes
2923 ac_cv_prog_cc_g=no
2924 CFLAGS="-g"
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932int
2933main ()
2934{
2935
2936 ;
2937 return 0;
2938}
2939_ACEOF
2940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941if { (ac_try="$ac_compile"
2942case "(($ac_try" in
2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 *) ac_try_echo=$ac_try;;
2945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002949 grep -v '^ *+' conftest.er1 >conftest.err
2950 rm -f conftest.er1
2951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (exit $ac_status); } && {
2954 test -z "$ac_c_werror_flag" ||
2955 test ! -s conftest.err
2956 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002957 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002960sed 's/^/| /' conftest.$ac_ext >&5
2961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 CFLAGS=""
2963 cat >conftest.$ac_ext <<_ACEOF
2964/* confdefs.h. */
2965_ACEOF
2966cat confdefs.h >>conftest.$ac_ext
2967cat >>conftest.$ac_ext <<_ACEOF
2968/* end confdefs.h. */
2969
2970int
2971main ()
2972{
2973
2974 ;
2975 return 0;
2976}
2977_ACEOF
2978rm -f conftest.$ac_objext
2979if { (ac_try="$ac_compile"
2980case "(($ac_try" in
2981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2982 *) ac_try_echo=$ac_try;;
2983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002985 (eval "$ac_compile") 2>conftest.er1
2986 ac_status=$?
2987 grep -v '^ *+' conftest.er1 >conftest.err
2988 rm -f conftest.er1
2989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (exit $ac_status); } && {
2992 test -z "$ac_c_werror_flag" ||
2993 test ! -s conftest.err
2994 } && test -s conftest.$ac_objext; then
2995 :
2996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002997 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998sed 's/^/| /' conftest.$ac_ext >&5
2999
3000 ac_c_werror_flag=$ac_save_c_werror_flag
3001 CFLAGS="-g"
3002 cat >conftest.$ac_ext <<_ACEOF
3003/* confdefs.h. */
3004_ACEOF
3005cat confdefs.h >>conftest.$ac_ext
3006cat >>conftest.$ac_ext <<_ACEOF
3007/* end confdefs.h. */
3008
3009int
3010main ()
3011{
3012
3013 ;
3014 return 0;
3015}
3016_ACEOF
3017rm -f conftest.$ac_objext
3018if { (ac_try="$ac_compile"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 (eval "$ac_compile") 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (exit $ac_status); } && {
3031 test -z "$ac_c_werror_flag" ||
3032 test ! -s conftest.err
3033 } && test -s conftest.$ac_objext; then
3034 ac_cv_prog_cc_g=yes
3035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003036 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037sed 's/^/| /' conftest.$ac_ext >&5
3038
3039
Guido van Rossum627b2d71993-12-24 10:39:16 +00003040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041
3042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
3045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3046fi
3047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3049 ac_c_werror_flag=$ac_save_c_werror_flag
3050fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003051{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3052echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055elif test $ac_cv_prog_cc_g = yes; then
3056 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003057 CFLAGS="-g -O2"
3058 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060 fi
3061else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003062 if test "$GCC" = yes; then
3063 CFLAGS="-O2"
3064 else
3065 CFLAGS=
3066 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003068{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3069echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003071 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003072else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003074ac_save_CC=$CC
3075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003076/* confdefs.h. */
3077_ACEOF
3078cat confdefs.h >>conftest.$ac_ext
3079cat >>conftest.$ac_ext <<_ACEOF
3080/* end confdefs.h. */
3081#include <stdarg.h>
3082#include <stdio.h>
3083#include <sys/types.h>
3084#include <sys/stat.h>
3085/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3086struct buf { int x; };
3087FILE * (*rcsopen) (struct buf *, struct stat *, int);
3088static char *e (p, i)
3089 char **p;
3090 int i;
3091{
3092 return p[i];
3093}
3094static char *f (char * (*g) (char **, int), char **p, ...)
3095{
3096 char *s;
3097 va_list v;
3098 va_start (v,p);
3099 s = g (p, va_arg (v,int));
3100 va_end (v);
3101 return s;
3102}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003103
3104/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3105 function prototypes and stuff, but not '\xHH' hex character constants.
3106 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3109 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003111int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3114 inside strings and character constants. */
3115#define FOO(x) 'x'
3116int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3117
Skip Montanaro6dead952003-09-25 14:50:04 +00003118int test (int i, double x);
3119struct s1 {int (*f) (int a);};
3120struct s2 {int (*f) (double a);};
3121int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3122int argc;
3123char **argv;
3124int
3125main ()
3126{
3127return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3128 ;
3129 return 0;
3130}
3131_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003132for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3133 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003134do
3135 CC="$ac_save_CC $ac_arg"
3136 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137if { (ac_try="$ac_compile"
3138case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 grep -v '^ *+' conftest.er1 >conftest.err
3146 rm -f conftest.er1
3147 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (exit $ac_status); } && {
3150 test -z "$ac_c_werror_flag" ||
3151 test ! -s conftest.err
3152 } && test -s conftest.$ac_objext; then
3153 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003156sed 's/^/| /' conftest.$ac_ext >&5
3157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158
Skip Montanaro6dead952003-09-25 14:50:04 +00003159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160
3161rm -f core conftest.err conftest.$ac_objext
3162 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003163done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003165CC=$ac_save_CC
3166
3167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168# AC_CACHE_VAL
3169case "x$ac_cv_prog_cc_c89" in
3170 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003171 { echo "$as_me:$LINENO: result: none needed" >&5
3172echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003174 { echo "$as_me:$LINENO: result: unsupported" >&5
3175echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003176 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3179echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180esac
3181
Skip Montanaro6dead952003-09-25 14:50:04 +00003182
Martin v. Löwis11437992002-04-12 09:54:03 +00003183ac_ext=c
3184ac_cpp='$CPP $CPPFLAGS'
3185ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3186ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3187ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003189
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003190
3191
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3193echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
3199 case $withval in
3200 no) with_cxx_main=no
3201 MAINCC='$(CC)';;
3202 yes) with_cxx_main=yes
3203 MAINCC='$(CXX)';;
3204 *) with_cxx_main=yes
3205 MAINCC=$withval
3206 if test -z "$CXX"
3207 then
3208 CXX=$withval
3209 fi;;
3210 esac
3211else
3212
3213 with_cxx_main=no
3214 MAINCC='$(CC)'
3215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216fi
3217
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003218{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3219echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003220
3221preset_cxx="$CXX"
3222if test -z "$CXX"
3223then
3224 case "$CC" in
3225 gcc) # Extract the first word of "g++", so it can be a program name with args.
3226set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003227{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3228echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003230 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231else
3232 case $CXX in
3233 [\\/]* | ?:[\\/]*)
3234 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3235 ;;
3236 *)
3237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in notfound
3239do
3240 IFS=$as_save_IFS
3241 test -z "$as_dir" && as_dir=.
3242 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 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 +00003244 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003246 break 2
3247 fi
3248done
3249done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003251
3252 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3253 ;;
3254esac
3255fi
3256CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003257if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003258 { echo "$as_me:$LINENO: result: $CXX" >&5
3259echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003261 { echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003265 ;;
3266 cc) # Extract the first word of "c++", so it can be a program name with args.
3267set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003268{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003271 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272else
3273 case $CXX in
3274 [\\/]* | ?:[\\/]*)
3275 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3276 ;;
3277 *)
3278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in notfound
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
3283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 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 +00003285 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003287 break 2
3288 fi
3289done
3290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292
3293 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3294 ;;
3295esac
3296fi
3297CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003299 { echo "$as_me:$LINENO: result: $CXX" >&5
3300echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003306 ;;
3307 esac
3308 if test "$CXX" = "notfound"
3309 then
3310 CXX=""
3311 fi
3312fi
3313if test -z "$CXX"
3314then
3315 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3316do
3317 # Extract the first word of "$ac_prog", so it can be a program name with args.
3318set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003319{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003321if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003322 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003323else
3324 if test -n "$CXX"; then
3325 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3326else
3327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 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 +00003334 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003336 break 2
3337 fi
3338done
3339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341
3342fi
3343fi
3344CXX=$ac_cv_prog_CXX
3345if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003351fi
3352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354 test -n "$CXX" && break
3355done
3356test -n "$CXX" || CXX="notfound"
3357
3358 if test "$CXX" = "notfound"
3359 then
3360 CXX=""
3361 fi
3362fi
3363if test "$preset_cxx" != "$CXX"
3364then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003365 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003366
3367 By default, distutils will build C++ extension modules with \"$CXX\".
3368 If this is not intended, then set CXX on the configure command line.
3369 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&2;}
3375fi
3376
3377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003378# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003379
3380ac_ext=c
3381ac_cpp='$CPP $CPPFLAGS'
3382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3384ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003385{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3386echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387# On Suns, sometimes $CPP names a directory.
3388if test -n "$CPP" && test -d "$CPP"; then
3389 CPP=
3390fi
3391if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003394else
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 # Double quotes because CPP needs to be expanded
3396 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3397 do
3398 ac_preproc_ok=false
3399for ac_c_preproc_warn_flag in '' yes
3400do
3401 # Use a header file that comes with gcc, so configuring glibc
3402 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003403 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3404 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003405 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 # not just through cpp. "Syntax error" is here to catch this case.
3407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003408/* confdefs.h. */
3409_ACEOF
3410cat confdefs.h >>conftest.$ac_ext
3411cat >>conftest.$ac_ext <<_ACEOF
3412/* end confdefs.h. */
3413#ifdef __STDC__
3414# include <limits.h>
3415#else
3416# include <assert.h>
3417#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003418 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420if { (ac_try="$ac_cpp conftest.$ac_ext"
3421case "(($ac_try" in
3422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423 *) ac_try_echo=$ac_try;;
3424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 rm -f conftest.er1
3430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (exit $ac_status); } >/dev/null && {
3433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3434 test ! -s conftest.err
3435 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003436 :
3437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003439sed 's/^/| /' conftest.$ac_ext >&5
3440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # Broken: fails on valid input.
3442continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 # can be detected and how.
3449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003450/* confdefs.h. */
3451_ACEOF
3452cat confdefs.h >>conftest.$ac_ext
3453cat >>conftest.$ac_ext <<_ACEOF
3454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003455#include <ac_nonexistent.h>
3456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 # Broken: success on invalid input.
3474continue
3475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003477sed 's/^/| /' conftest.$ac_ext >&5
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Passes both tests.
3480ac_preproc_ok=:
3481break
3482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484rm -f conftest.err conftest.$ac_ext
3485
3486done
3487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3488rm -f conftest.err conftest.$ac_ext
3489if $ac_preproc_ok; then
3490 break
3491fi
3492
3493 done
3494 ac_cv_prog_CPP=$CPP
3495
3496fi
3497 CPP=$ac_cv_prog_CPP
3498else
3499 ac_cv_prog_CPP=$CPP
3500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003501{ echo "$as_me:$LINENO: result: $CPP" >&5
3502echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503ac_preproc_ok=false
3504for ac_c_preproc_warn_flag in '' yes
3505do
3506 # Use a header file that comes with gcc, so configuring glibc
3507 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003508 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3509 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # On the NeXT, cc -E runs the code through the compiler's parser,
3511 # not just through cpp. "Syntax error" is here to catch this case.
3512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
3518#ifdef __STDC__
3519# include <limits.h>
3520#else
3521# include <assert.h>
3522#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003523 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525if { (ac_try="$ac_cpp conftest.$ac_ext"
3526case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003533 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 rm -f conftest.er1
3535 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (exit $ac_status); } >/dev/null && {
3538 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3539 test ! -s conftest.err
3540 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 :
3542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003544sed 's/^/| /' conftest.$ac_ext >&5
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 # Broken: fails on valid input.
3547continue
3548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550rm -f conftest.err conftest.$ac_ext
3551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 # can be detected and how.
3554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003555/* confdefs.h. */
3556_ACEOF
3557cat confdefs.h >>conftest.$ac_ext
3558cat >>conftest.$ac_ext <<_ACEOF
3559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003560#include <ac_nonexistent.h>
3561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # Broken: success on invalid input.
3579continue
3580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Passes both tests.
3585ac_preproc_ok=:
3586break
3587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589rm -f conftest.err conftest.$ac_ext
3590
3591done
3592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3593rm -f conftest.err conftest.$ac_ext
3594if $ac_preproc_ok; then
3595 :
3596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003597 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003598See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003599echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003600See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
3604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609
3610
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003611{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3612echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003614 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616 # Extract the first word of "grep ggrep" to use in msg output
3617if test -z "$GREP"; then
3618set dummy grep ggrep; ac_prog_name=$2
3619if test "${ac_cv_path_GREP+set}" = set; then
3620 echo $ECHO_N "(cached) $ECHO_C" >&6
3621else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003623# Loop through the user's path and test for each of PROGNAME-LIST
3624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
3629 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
3631 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3632 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3633 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634 # Check for GNU $ac_path_GREP
3635case `"$ac_path_GREP" --version 2>&1` in
3636*GNU*)
3637 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3638*)
3639 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003640 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641 while :
3642 do
3643 cat "conftest.in" "conftest.in" >"conftest.tmp"
3644 mv "conftest.tmp" "conftest.in"
3645 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003646 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649 ac_count=`expr $ac_count + 1`
3650 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3651 # Best one so far, save it but keep looking for a better one
3652 ac_cv_path_GREP="$ac_path_GREP"
3653 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 # 10*(2^10) chars as input seems more than enough
3656 test $ac_count -gt 10 && break
3657 done
3658 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659esac
3660
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661
3662 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 done
3664done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003668
3669
3670fi
3671
3672GREP="$ac_cv_path_GREP"
3673if test -z "$GREP"; then
3674 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3675echo "$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 +00003676 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003677fi
3678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679else
3680 ac_cv_path_GREP=$GREP
3681fi
3682
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003685{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3686echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 GREP="$ac_cv_path_GREP"
3688
3689
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003690{ echo "$as_me:$LINENO: checking for egrep" >&5
3691echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003693 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694else
3695 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3696 then ac_cv_path_EGREP="$GREP -E"
3697 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698 # Extract the first word of "egrep" to use in msg output
3699if test -z "$EGREP"; then
3700set dummy egrep; ac_prog_name=$2
3701if test "${ac_cv_path_EGREP+set}" = set; then
3702 echo $ECHO_N "(cached) $ECHO_C" >&6
3703else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003705# Loop through the user's path and test for each of PROGNAME-LIST
3706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
3711 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003712 for ac_exec_ext in '' $ac_executable_extensions; do
3713 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3714 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3715 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716 # Check for GNU $ac_path_EGREP
3717case `"$ac_path_EGREP" --version 2>&1` in
3718*GNU*)
3719 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3720*)
3721 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003722 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 while :
3724 do
3725 cat "conftest.in" "conftest.in" >"conftest.tmp"
3726 mv "conftest.tmp" "conftest.in"
3727 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3730 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3731 ac_count=`expr $ac_count + 1`
3732 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3733 # Best one so far, save it but keep looking for a better one
3734 ac_cv_path_EGREP="$ac_path_EGREP"
3735 ac_path_EGREP_max=$ac_count
3736 fi
3737 # 10*(2^10) chars as input seems more than enough
3738 test $ac_count -gt 10 && break
3739 done
3740 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3741esac
3742
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743
3744 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 done
3746done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003750
3751
3752fi
3753
3754EGREP="$ac_cv_path_EGREP"
3755if test -z "$EGREP"; then
3756 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3757echo "$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 +00003758 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003759fi
3760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761else
3762 ac_cv_path_EGREP=$EGREP
3763fi
3764
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 fi
3767fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003768{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3769echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003771
3772
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003773
3774{ echo "$as_me:$LINENO: checking for AIX" >&5
3775echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3776cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003782#ifdef _AIX
3783 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003784#endif
3785
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003786_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3788 $EGREP "yes" >/dev/null 2>&1; then
3789 { echo "$as_me:$LINENO: result: yes" >&5
3790echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003791cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003792#define _ALL_SOURCE 1
3793_ACEOF
3794
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003795else
3796 { echo "$as_me:$LINENO: result: no" >&5
3797echo "${ECHO_T}no" >&6; }
3798fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00003799rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003800
3801
3802
3803# Check for unsupported systems
3804case $ac_sys_system/$ac_sys_release in
3805atheos*|Linux*/1*)
3806 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3807 echo See README for details.
3808 exit 1;;
3809esac
3810
3811
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003812{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3813echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003814
3815# Check whether --with-suffix was given.
3816if test "${with_suffix+set}" = set; then
3817 withval=$with_suffix;
3818 case $withval in
3819 no) EXEEXT=;;
3820 yes) EXEEXT=.exe;;
3821 *) EXEEXT=$withval;;
3822 esac
3823fi
3824
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003825{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3826echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003827
3828# Test whether we're running on a non-case-sensitive system, in which
3829# case we give a warning if no ext is given
3830
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003831{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3832echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003833if test ! -d CaseSensitiveTestDir; then
3834mkdir CaseSensitiveTestDir
3835fi
3836
3837if test -d casesensitivetestdir
3838then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003839 { echo "$as_me:$LINENO: result: yes" >&5
3840echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003841 BUILDEXEEXT=.exe
3842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=$EXEEXT
3846fi
3847rmdir CaseSensitiveTestDir
3848
3849case $MACHDEP in
3850bsdos*)
3851 case $CC in
3852 gcc) CC="$CC -D_HAVE_BSDI";;
3853 esac;;
3854esac
3855
3856case $ac_sys_system in
3857hp*|HP*)
3858 case $CC in
3859 cc|*/cc) CC="$CC -Ae";;
3860 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003861SunOS*)
3862 # Some functions have a prototype only with that define, e.g. confstr
3863
3864cat >>confdefs.h <<\_ACEOF
3865#define __EXTENSIONS__ 1
3866_ACEOF
3867
3868 ;;
3869esac
3870
3871
3872
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003873{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3874echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003875if test -z "$LIBRARY"
3876then
3877 LIBRARY='libpython$(VERSION).a'
3878fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003879{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3880echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003881
3882# LDLIBRARY is the name of the library to link against (as opposed to the
3883# name of the library into which to insert object files). BLDLIBRARY is also
3884# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3885# is blank as the main program is not linked directly against LDLIBRARY.
3886# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3887# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3888# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3889# DLLLIBRARY is the shared (i.e., DLL) library.
3890#
3891# RUNSHARED is used to run shared python without installed libraries
3892#
3893# INSTSONAME is the name of the shared library that will be use to install
3894# on the system - some systems like version suffix, others don't
3895
3896
3897
3898
3899
3900
3901LDLIBRARY="$LIBRARY"
3902BLDLIBRARY='$(LDLIBRARY)'
3903INSTSONAME='$(LDLIBRARY)'
3904DLLLIBRARY=''
3905LDLIBRARYDIR=''
3906RUNSHARED=''
3907
3908# LINKCC is the command that links the python executable -- default is $(CC).
3909# If CXX is set, and if it is needed to link a main function that was
3910# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3911# python might then depend on the C++ runtime
3912# This is altered for AIX in order to build the export list before
3913# linking.
3914
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003915{ echo "$as_me:$LINENO: checking LINKCC" >&5
3916echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003917if test -z "$LINKCC"
3918then
3919 LINKCC='$(PURIFY) $(MAINCC)'
3920 case $ac_sys_system in
3921 AIX*)
3922 exp_extra="\"\""
3923 if test $ac_sys_release -ge 5 -o \
3924 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3925 exp_extra="."
3926 fi
3927 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003928 QNX*)
3929 # qcc must be used because the other compilers do not
3930 # support -N.
3931 LINKCC=qcc;;
3932 esac
3933fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003934{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3935echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003936
3937# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3938# make sure we default having it set to "no": this is used by
3939# distutils.unixccompiler to know if it should add --enable-new-dtags
3940# to linker command lines, and failing to detect GNU ld simply results
3941# in the same bahaviour as before.
3942
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003943{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3944echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003945ac_prog=ld
3946if test "$GCC" = yes; then
3947 ac_prog=`$CC -print-prog-name=ld`
3948fi
3949case `"$ac_prog" -V 2>&1 < /dev/null` in
3950 *GNU*)
3951 GNULD=yes;;
3952 *)
3953 GNULD=no;;
3954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003955{ echo "$as_me:$LINENO: result: $GNULD" >&5
3956echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003957
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003958{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3959echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003960# Check whether --enable-shared was given.
3961if test "${enable_shared+set}" = set; then
3962 enableval=$enable_shared;
3963fi
3964
3965
3966if test -z "$enable_shared"
3967then
3968 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003969 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003970 enable_shared="yes";;
3971 *)
3972 enable_shared="no";;
3973 esac
3974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003975{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3976echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003977
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003978{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3979echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003980# Check whether --enable-profiling was given.
3981if test "${enable_profiling+set}" = set; then
3982 enableval=$enable_profiling; ac_save_cc="$CC"
3983 CC="$CC -pg"
3984 if test "$cross_compiling" = yes; then
3985 ac_enable_profiling="no"
3986else
3987 cat >conftest.$ac_ext <<_ACEOF
3988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
3993int main() { return 0; }
3994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (ac_try="$ac_link"
3997case "(($ac_try" in
3998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3999 *) ac_try_echo=$ac_try;;
4000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004002 (eval "$ac_link") 2>&5
4003 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4006 { (case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004011 (eval "$ac_try") 2>&5
4012 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004014 (exit $ac_status); }; }; then
4015 ac_enable_profiling="yes"
4016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me: program exited with status $ac_status" >&5
4018echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004019sed 's/^/| /' conftest.$ac_ext >&5
4020
4021( exit $ac_status )
4022ac_enable_profiling="no"
4023fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4025fi
4026
4027
4028 CC="$ac_save_cc"
4029fi
4030
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004031{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4032echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004033
4034case "$ac_enable_profiling" in
4035 "yes")
4036 BASECFLAGS="-pg $BASECFLAGS"
4037 LDFLAGS="-pg $LDFLAGS"
4038 ;;
4039esac
4040
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004041{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4042echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004043
4044# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4045# library that we build, but we do not want to link against it (we
4046# will find it with a -framework option). For this reason there is an
4047# extra variable BLDLIBRARY against which Python and the extension
4048# modules are linked, BLDLIBRARY. This is normally the same as
4049# LDLIBRARY, but empty for MacOSX framework builds.
4050if test "$enable_framework"
4051then
4052 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4053 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4054 BLDLIBRARY=''
4055else
4056 BLDLIBRARY='$(LDLIBRARY)'
4057fi
4058
4059# Other platforms follow
4060if test $enable_shared = "yes"; then
4061
4062cat >>confdefs.h <<\_ACEOF
4063#define Py_ENABLE_SHARED 1
4064_ACEOF
4065
4066 case $ac_sys_system in
4067 CYGWIN*)
4068 LDLIBRARY='libpython$(VERSION).dll.a'
4069 DLLLIBRARY='libpython$(VERSION).dll'
4070 ;;
4071 SunOS*)
4072 LDLIBRARY='libpython$(VERSION).so'
4073 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4074 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4075 INSTSONAME="$LDLIBRARY".$SOVERSION
4076 ;;
4077 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 case $ac_sys_system in
4082 FreeBSD*)
4083 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4084 ;;
4085 esac
4086 INSTSONAME="$LDLIBRARY".$SOVERSION
4087 ;;
4088 hp*|HP*)
4089 case `uname -m` in
4090 ia64)
4091 LDLIBRARY='libpython$(VERSION).so'
4092 ;;
4093 *)
4094 LDLIBRARY='libpython$(VERSION).sl'
4095 ;;
4096 esac
4097 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4098 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4099 ;;
4100 OSF*)
4101 LDLIBRARY='libpython$(VERSION).so'
4102 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4103 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4104 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004105 Darwin*)
4106 LDLIBRARY='libpython$(VERSION).dylib'
4107 BLDLIBRARY='-L. -lpython$(VERSION)'
4108 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4109 ;;
4110
4111 esac
4112else # shared is disabled
4113 case $ac_sys_system in
4114 CYGWIN*)
4115 BLDLIBRARY='$(LIBRARY)'
4116 LDLIBRARY='libpython$(VERSION).dll.a'
4117 ;;
4118 esac
4119fi
4120
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004121{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4122echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004123
4124if test -n "$ac_tool_prefix"; then
4125 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4126set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004127{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4128echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004129if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004130 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004131else
4132 if test -n "$RANLIB"; then
4133 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4134else
4135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4136for as_dir in $PATH
4137do
4138 IFS=$as_save_IFS
4139 test -z "$as_dir" && as_dir=.
4140 for ac_exec_ext in '' $ac_executable_extensions; do
4141 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4142 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004143 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004144 break 2
4145 fi
4146done
4147done
4148IFS=$as_save_IFS
4149
4150fi
4151fi
4152RANLIB=$ac_cv_prog_RANLIB
4153if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004154 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4155echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004157 { echo "$as_me:$LINENO: result: no" >&5
4158echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004159fi
4160
4161
4162fi
4163if test -z "$ac_cv_prog_RANLIB"; then
4164 ac_ct_RANLIB=$RANLIB
4165 # Extract the first word of "ranlib", so it can be a program name with args.
4166set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004167{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004170 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004171else
4172 if test -n "$ac_ct_RANLIB"; then
4173 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4174else
4175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH
4177do
4178 IFS=$as_save_IFS
4179 test -z "$as_dir" && as_dir=.
4180 for ac_exec_ext in '' $ac_executable_extensions; do
4181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4182 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004183 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004184 break 2
4185 fi
4186done
4187done
4188IFS=$as_save_IFS
4189
4190fi
4191fi
4192ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4193if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004194 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4195echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004197 { echo "$as_me:$LINENO: result: no" >&5
4198echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004199fi
4200
4201 if test "x$ac_ct_RANLIB" = x; then
4202 RANLIB=":"
4203 else
4204 case $cross_compiling:$ac_tool_warned in
4205yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004206{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4207whose name does not start with the host triplet. If you think this
4208configuration is useful to you, please write to autoconf@gnu.org." >&5
4209echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4210whose name does not start with the host triplet. If you think this
4211configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004212ac_tool_warned=yes ;;
4213esac
4214 RANLIB=$ac_ct_RANLIB
4215 fi
4216else
4217 RANLIB="$ac_cv_prog_RANLIB"
4218fi
4219
4220
4221for ac_prog in ar aal
4222do
4223 # Extract the first word of "$ac_prog", so it can be a program name with args.
4224set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004227if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004228 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004229else
4230 if test -n "$AR"; then
4231 ac_cv_prog_AR="$AR" # Let the user override the test.
4232else
4233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234for as_dir in $PATH
4235do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_exec_ext in '' $ac_executable_extensions; do
4239 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4240 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004242 break 2
4243 fi
4244done
4245done
4246IFS=$as_save_IFS
4247
4248fi
4249fi
4250AR=$ac_cv_prog_AR
4251if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004252 { echo "$as_me:$LINENO: result: $AR" >&5
4253echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004255 { echo "$as_me:$LINENO: result: no" >&5
4256echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004257fi
4258
4259
4260 test -n "$AR" && break
4261done
4262test -n "$AR" || AR="ar"
4263
4264
4265# tweak ARFLAGS only if the user didn't set it on the command line
4266
4267if test -z "$ARFLAGS"
4268then
4269 ARFLAGS="rc"
4270fi
4271
4272
4273# Extract the first word of "svnversion", so it can be a program name with args.
4274set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004278 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004279else
4280 if test -n "$SVNVERSION"; then
4281 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4282else
4283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284for as_dir in $PATH
4285do
4286 IFS=$as_save_IFS
4287 test -z "$as_dir" && as_dir=.
4288 for ac_exec_ext in '' $ac_executable_extensions; do
4289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4290 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292 break 2
4293 fi
4294done
4295done
4296IFS=$as_save_IFS
4297
4298 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4299fi
4300fi
4301SVNVERSION=$ac_cv_prog_SVNVERSION
4302if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004303 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4304echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004306 { echo "$as_me:$LINENO: result: no" >&5
4307echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004308fi
4309
4310
4311if test $SVNVERSION = found
4312then
4313 SVNVERSION="svnversion \$(srcdir)"
4314else
4315 SVNVERSION="echo Unversioned directory"
4316fi
4317
4318case $MACHDEP in
4319bsdos*|hp*|HP*)
4320 # install -d does not work on BSDI or HP-UX
4321 if test -z "$INSTALL"
4322 then
4323 INSTALL="${srcdir}/install-sh -c"
4324 fi
4325esac
4326ac_aux_dir=
4327for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4328 if 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/install.sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install.sh -c"
4335 break
4336 elif test -f "$ac_dir/shtool"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/shtool install -c"
4339 break
4340 fi
4341done
4342if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004343 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4344echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004345 { (exit 1); exit 1; }; }
4346fi
4347
4348# These three variables are undocumented and unsupported,
4349# and are intended to be withdrawn in a future Autoconf release.
4350# They can cause serious problems if a builder's source tree is in a directory
4351# whose full name contains unusual characters.
4352ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4353ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4354ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4355
4356
4357# Find a good install program. We prefer a C program (faster),
4358# so one script is as good as another. But avoid the broken or
4359# incompatible versions:
4360# SysV /etc/install, /usr/sbin/install
4361# SunOS /usr/etc/install
4362# IRIX /sbin/install
4363# AIX /bin/install
4364# AmigaOS /C/install, which installs bootblocks on floppy discs
4365# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4366# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4367# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4368# OS/2's system install, which has a completely different semantic
4369# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004370{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4371echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004372if test -z "$INSTALL"; then
4373if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004375else
4376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4377for as_dir in $PATH
4378do
4379 IFS=$as_save_IFS
4380 test -z "$as_dir" && as_dir=.
4381 # Account for people who put trailing slashes in PATH elements.
4382case $as_dir/ in
4383 ./ | .// | /cC/* | \
4384 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4385 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4386 /usr/ucb/* ) ;;
4387 *)
4388 # OSF1 and SCO ODT 3.0 have their own names for install.
4389 # Don't use installbsd from OSF since it installs stuff as root
4390 # by default.
4391 for ac_prog in ginstall scoinst install; do
4392 for ac_exec_ext in '' $ac_executable_extensions; do
4393 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4394 if test $ac_prog = install &&
4395 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4396 # AIX install. It has an incompatible calling convention.
4397 :
4398 elif test $ac_prog = install &&
4399 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # program-specific install script used by HP pwplus--don't use.
4401 :
4402 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004403 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4404 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004405 fi
4406 fi
4407 done
4408 done
4409 ;;
4410esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004411done
4412IFS=$as_save_IFS
4413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004414
4415fi
4416 if test "${ac_cv_path_install+set}" = set; then
4417 INSTALL=$ac_cv_path_install
4418 else
4419 # As a last resort, use the slow shell script. Don't cache a
4420 # value for INSTALL within a source directory, because that will
4421 # break other packages using the cache if that directory is
4422 # removed, or if the value is a relative name.
4423 INSTALL=$ac_install_sh
4424 fi
4425fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004426{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4427echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004428
4429# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4430# It thinks the first close brace ends the variable substitution.
4431test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4432
4433test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4434
4435test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4436
4437
4438# Not every filesystem supports hard links
4439
4440if test -z "$LN" ; then
4441 case $ac_sys_system in
4442 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004443 *) LN=ln;;
4444 esac
4445fi
4446
4447# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004448{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4449echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004450
4451# Check whether --with-pydebug was given.
4452if test "${with_pydebug+set}" = set; then
4453 withval=$with_pydebug;
4454if test "$withval" != no
4455then
4456
4457cat >>confdefs.h <<\_ACEOF
4458#define Py_DEBUG 1
4459_ACEOF
4460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461 { echo "$as_me:$LINENO: result: yes" >&5
4462echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004463 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464else { echo "$as_me:$LINENO: result: no" >&5
4465echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466fi
4467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468 { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471
4472
4473# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4474# merged with this chunk of code?
4475
4476# Optimizer/debugger flags
4477# ------------------------
4478# (The following bit of code is complicated enough - please keep things
4479# indented properly. Just pretend you're editing Python code. ;-)
4480
4481# There are two parallel sets of case statements below, one that checks to
4482# see if OPT was set and one that does BASECFLAGS setting based upon
4483# compiler and platform. BASECFLAGS tweaks need to be made even if the
4484# user set OPT.
4485
4486# tweak OPT based on compiler and platform, only if the user didn't set
4487# it on the command line
4488
4489if test -z "$OPT"
4490then
4491 case $GCC in
4492 yes)
4493 if test "$CC" != 'g++' ; then
4494 STRICT_PROTO="-Wstrict-prototypes"
4495 fi
4496 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4497 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4498 WRAP="-fwrapv"
4499 fi
4500 case $ac_cv_prog_cc_g in
4501 yes)
4502 if test "$Py_DEBUG" = 'true' ; then
4503 # Optimization messes up debuggers, so turn it off for
4504 # debug builds.
4505 OPT="-g -Wall $STRICT_PROTO"
4506 else
4507 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4508 fi
4509 ;;
4510 *)
4511 OPT="-O3 -Wall $STRICT_PROTO"
4512 ;;
4513 esac
4514 case $ac_sys_system in
4515 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4516 ;;
4517 esac
4518 ;;
4519
4520 *)
4521 OPT="-O"
4522 ;;
4523 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004524fi
4525
4526
4527
4528# The -arch flags for universal builds on OSX
4529UNIVERSAL_ARCH_FLAGS=
4530
4531
4532# tweak BASECFLAGS based on compiler and platform
4533case $GCC in
4534yes)
4535 # Python violates C99 rules, by casting between incompatible
4536 # pointer types. GCC may generate bad code as a result of that,
4537 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004538 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4539echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004540 ac_save_cc="$CC"
4541 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004542 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004543 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004544else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545 cat >conftest.$ac_ext <<_ACEOF
4546/* confdefs.h. */
4547_ACEOF
4548cat confdefs.h >>conftest.$ac_ext
4549cat >>conftest.$ac_ext <<_ACEOF
4550/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004551
4552int
4553main ()
4554{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004555int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004556 ;
4557 return 0;
4558}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004560rm -f conftest.$ac_objext
4561if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562case "(($ac_try" in
4563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564 *) ac_try_echo=$ac_try;;
4565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004567 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004568 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004569 grep -v '^ *+' conftest.er1 >conftest.err
4570 rm -f conftest.er1
4571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004573 (exit $ac_status); } && {
4574 test -z "$ac_c_werror_flag" ||
4575 test ! -s conftest.err
4576 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004577 ac_cv_no_strict_aliasing_ok=yes
4578else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004579 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580sed 's/^/| /' conftest.$ac_ext >&5
4581
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004582 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583fi
4584
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004586fi
4587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004588 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004589 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4590echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004591 if test $ac_cv_no_strict_aliasing_ok = yes
4592 then
4593 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4594 fi
4595
4596 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4597 # support. Without this, treatment of subnormals doesn't follow
4598 # the standard.
4599 case $ac_sys_machine in
4600 alpha*)
4601 BASECFLAGS="$BASECFLAGS -mieee"
4602 ;;
4603 esac
4604
4605 case $ac_sys_system in
4606 SCO_SV*)
4607 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4608 ;;
4609 # is there any other compiler on Darwin besides gcc?
4610 Darwin*)
4611 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4612 # used to be here, but non-Apple gcc doesn't accept them.
4613
4614
4615 if test "${enable_universalsdk}"; then
4616 UNIVERSAL_ARCH_FLAGS=""
4617 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4618 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4619 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004620 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621
4622 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4623 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004624 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004625 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626
4627 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4628 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004629 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 ARCH_RUN_32BIT="arch -i386 -ppc"
4631
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004632 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4633 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004634 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004635 ARCH_RUN_32BIT="arch -i386"
4636
4637 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4638 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004639 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4640 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004643 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4644echo "$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 +00004645 { (exit 1); exit 1; }; }
4646
4647 fi
4648
4649
4650 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4651 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4652 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4653 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4654 fi
4655 fi
4656
4657 # Calculate the right deployment target for this build.
4658 #
4659 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4660 if test ${cur_target} '>' 10.2; then
4661 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004662 if test ${enable_universalsdk}; then
4663 if test "${UNIVERSAL_ARCHS}" = "all"; then
4664 # Ensure that the default platform for a
4665 # 4-way universal build is OSX 10.5,
4666 # that's the first OS release where
4667 # 4-way builds make sense.
4668 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004669
4670 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4671 cur_target='10.5'
4672
4673 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4674 cur_target='10.5'
4675
4676 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4677 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004678 fi
4679 else
4680 if test `arch` = "i386"; then
4681 # On Intel macs default to a deployment
4682 # target of 10.4, that's the first OSX
4683 # release with Intel support.
4684 cur_target="10.4"
4685 fi
4686 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687 fi
4688 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4689
4690 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4691 # environment with a value that is the same as what we'll use
4692 # in the Makefile to ensure that we'll get the same compiler
4693 # environment during configure and build time.
4694 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4695 export MACOSX_DEPLOYMENT_TARGET
4696 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4697
4698 ;;
4699 OSF*)
4700 BASECFLAGS="$BASECFLAGS -mieee"
4701 ;;
4702 esac
4703 ;;
4704
4705*)
4706 case $ac_sys_system in
4707 OpenUNIX*|UnixWare*)
4708 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4709 ;;
4710 OSF*)
4711 BASECFLAGS="$BASECFLAGS -ieee -std"
4712 ;;
4713 SCO_SV*)
4714 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4715 ;;
4716 esac
4717 ;;
4718esac
4719
4720if test "$Py_DEBUG" = 'true'; then
4721 :
4722else
4723 OPT="-DNDEBUG $OPT"
4724fi
4725
4726if test "$ac_arch_flags"
4727then
4728 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4729fi
4730
4731# disable check for icc since it seems to pass, but generates a warning
4732if test "$CC" = icc
4733then
4734 ac_cv_opt_olimit_ok=no
4735fi
4736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004737{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4738echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004740 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741else
4742 ac_save_cc="$CC"
4743CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004744cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745/* confdefs.h. */
4746_ACEOF
4747cat confdefs.h >>conftest.$ac_ext
4748cat >>conftest.$ac_ext <<_ACEOF
4749/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004750
4751int
4752main ()
4753{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004755 ;
4756 return 0;
4757}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004759rm -f conftest.$ac_objext
4760if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761case "(($ac_try" in
4762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4763 *) ac_try_echo=$ac_try;;
4764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004766 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004768 grep -v '^ *+' conftest.er1 >conftest.err
4769 rm -f conftest.er1
4770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004772 (exit $ac_status); } && {
4773 test -z "$ac_c_werror_flag" ||
4774 test ! -s conftest.err
4775 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776 ac_cv_opt_olimit_ok=yes
4777else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004778 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779sed 's/^/| /' conftest.$ac_ext >&5
4780
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004781 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782fi
4783
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785CC="$ac_save_cc"
4786fi
4787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004788{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4789echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790if test $ac_cv_opt_olimit_ok = yes; then
4791 case $ac_sys_system in
4792 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4793 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4794 # environment?
4795 Darwin*)
4796 ;;
4797 *)
4798 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4799 ;;
4800 esac
4801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004802 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4803echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004805 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806else
4807 ac_save_cc="$CC"
4808 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809 cat >conftest.$ac_ext <<_ACEOF
4810/* confdefs.h. */
4811_ACEOF
4812cat confdefs.h >>conftest.$ac_ext
4813cat >>conftest.$ac_ext <<_ACEOF
4814/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004815
4816int
4817main ()
4818{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004820 ;
4821 return 0;
4822}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004824rm -f conftest.$ac_objext
4825if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826case "(($ac_try" in
4827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4828 *) ac_try_echo=$ac_try;;
4829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 grep -v '^ *+' conftest.er1 >conftest.err
4834 rm -f conftest.er1
4835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 (exit $ac_status); } && {
4838 test -z "$ac_c_werror_flag" ||
4839 test ! -s conftest.err
4840 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 ac_cv_olimit_ok=yes
4842else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004843 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844sed 's/^/| /' conftest.$ac_ext >&5
4845
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004846 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
4848
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004853 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4854echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 if test $ac_cv_olimit_ok = yes; then
4856 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4857 fi
4858fi
4859
4860# Check whether GCC supports PyArg_ParseTuple format
4861if test "$GCC" = "yes"
4862then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004863 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4864echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 save_CFLAGS=$CFLAGS
4866 CFLAGS="$CFLAGS -Werror"
4867 cat >conftest.$ac_ext <<_ACEOF
4868/* confdefs.h. */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h. */
4873
4874 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4875
4876int
4877main ()
4878{
4879
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884rm -f conftest.$ac_objext
4885if { (ac_try="$ac_compile"
4886case "(($ac_try" in
4887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4888 *) ac_try_echo=$ac_try;;
4889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891 (eval "$ac_compile") 2>conftest.er1
4892 ac_status=$?
4893 grep -v '^ *+' conftest.er1 >conftest.err
4894 rm -f conftest.er1
4895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 (exit $ac_status); } && {
4898 test -z "$ac_c_werror_flag" ||
4899 test ! -s conftest.err
4900 } && test -s conftest.$ac_objext; then
4901
4902cat >>confdefs.h <<\_ACEOF
4903#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4904_ACEOF
4905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004906 { echo "$as_me:$LINENO: result: yes" >&5
4907echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004909 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004912 { echo "$as_me:$LINENO: result: no" >&5
4913echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914
4915fi
4916
4917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918 CFLAGS=$save_CFLAGS
4919fi
4920
4921# On some compilers, pthreads are available without further options
4922# (e.g. MacOS X). On some of these systems, the compiler will not
4923# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4924# So we have to see first whether pthreads are available without
4925# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004926{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4927echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004929 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930else
4931 if test "$cross_compiling" = yes; then
4932 ac_cv_pthread_is_default=no
4933else
4934 cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940
4941#include <pthread.h>
4942
4943void* routine(void* p){return NULL;}
4944
4945int main(){
4946 pthread_t p;
4947 if(pthread_create(&p,NULL,routine,NULL)!=0)
4948 return 1;
4949 (void)pthread_detach(p);
4950 return 0;
4951}
4952
4953_ACEOF
4954rm -f conftest$ac_exeext
4955if { (ac_try="$ac_link"
4956case "(($ac_try" in
4957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4958 *) ac_try_echo=$ac_try;;
4959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 (eval "$ac_link") 2>&5
4962 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4965 { (case "(($ac_try" in
4966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4967 *) ac_try_echo=$ac_try;;
4968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 (eval "$ac_try") 2>&5
4971 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 (exit $ac_status); }; }; then
4974
4975 ac_cv_pthread_is_default=yes
4976 ac_cv_kthread=no
4977 ac_cv_pthread=no
4978
4979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004980 echo "$as_me: program exited with status $ac_status" >&5
4981echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982sed 's/^/| /' conftest.$ac_ext >&5
4983
4984( exit $ac_status )
4985ac_cv_pthread_is_default=no
4986fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4988fi
4989
4990
4991
4992fi
4993
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004994{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4995echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996
4997
4998if test $ac_cv_pthread_is_default = yes
4999then
5000 ac_cv_kpthread=no
5001else
5002# -Kpthread, if available, provides the right #defines
5003# and linker options to make pthread_create available
5004# Some compilers won't report that they do not support -Kpthread,
5005# so we need to run a program to see whether it really made the
5006# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005007{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5008echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005010 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
5012 ac_save_cc="$CC"
5013CC="$CC -Kpthread"
5014if test "$cross_compiling" = yes; then
5015 ac_cv_kpthread=no
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023
5024#include <pthread.h>
5025
5026void* routine(void* p){return NULL;}
5027
5028int main(){
5029 pthread_t p;
5030 if(pthread_create(&p,NULL,routine,NULL)!=0)
5031 return 1;
5032 (void)pthread_detach(p);
5033 return 0;
5034}
5035
5036_ACEOF
5037rm -f conftest$ac_exeext
5038if { (ac_try="$ac_link"
5039case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 (eval "$ac_link") 2>&5
5045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5048 { (case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 (eval "$ac_try") 2>&5
5054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056 (exit $ac_status); }; }; then
5057 ac_cv_kpthread=yes
5058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005059 echo "$as_me: program exited with status $ac_status" >&5
5060echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061sed 's/^/| /' conftest.$ac_ext >&5
5062
5063( exit $ac_status )
5064ac_cv_kpthread=no
5065fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5067fi
5068
5069
5070CC="$ac_save_cc"
5071fi
5072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005073{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5074echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075fi
5076
5077if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5078then
5079# -Kthread, if available, provides the right #defines
5080# and linker options to make pthread_create available
5081# Some compilers won't report that they do not support -Kthread,
5082# so we need to run a program to see whether it really made the
5083# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005084{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5085echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005087 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088else
5089 ac_save_cc="$CC"
5090CC="$CC -Kthread"
5091if test "$cross_compiling" = yes; then
5092 ac_cv_kthread=no
5093else
5094 cat >conftest.$ac_ext <<_ACEOF
5095/* confdefs.h. */
5096_ACEOF
5097cat confdefs.h >>conftest.$ac_ext
5098cat >>conftest.$ac_ext <<_ACEOF
5099/* end confdefs.h. */
5100
5101#include <pthread.h>
5102
5103void* routine(void* p){return NULL;}
5104
5105int main(){
5106 pthread_t p;
5107 if(pthread_create(&p,NULL,routine,NULL)!=0)
5108 return 1;
5109 (void)pthread_detach(p);
5110 return 0;
5111}
5112
5113_ACEOF
5114rm -f conftest$ac_exeext
5115if { (ac_try="$ac_link"
5116case "(($ac_try" in
5117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5118 *) ac_try_echo=$ac_try;;
5119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121 (eval "$ac_link") 2>&5
5122 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5125 { (case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 (eval "$ac_try") 2>&5
5131 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 (exit $ac_status); }; }; then
5134 ac_cv_kthread=yes
5135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005136 echo "$as_me: program exited with status $ac_status" >&5
5137echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138sed 's/^/| /' conftest.$ac_ext >&5
5139
5140( exit $ac_status )
5141ac_cv_kthread=no
5142fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5144fi
5145
5146
5147CC="$ac_save_cc"
5148fi
5149
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5151echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152fi
5153
5154if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5155then
5156# -pthread, if available, provides the right #defines
5157# and linker options to make pthread_create available
5158# Some compilers won't report that they do not support -pthread,
5159# so we need to run a program to see whether it really made the
5160# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005161{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5162echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005164 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165else
5166 ac_save_cc="$CC"
5167CC="$CC -pthread"
5168if test "$cross_compiling" = yes; then
5169 ac_cv_pthread=no
5170else
5171 cat >conftest.$ac_ext <<_ACEOF
5172/* confdefs.h. */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h. */
5177
5178#include <pthread.h>
5179
5180void* routine(void* p){return NULL;}
5181
5182int main(){
5183 pthread_t p;
5184 if(pthread_create(&p,NULL,routine,NULL)!=0)
5185 return 1;
5186 (void)pthread_detach(p);
5187 return 0;
5188}
5189
5190_ACEOF
5191rm -f conftest$ac_exeext
5192if { (ac_try="$ac_link"
5193case "(($ac_try" in
5194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5195 *) ac_try_echo=$ac_try;;
5196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198 (eval "$ac_link") 2>&5
5199 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5202 { (case "(($ac_try" in
5203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204 *) ac_try_echo=$ac_try;;
5205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 (eval "$ac_try") 2>&5
5208 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 (exit $ac_status); }; }; then
5211 ac_cv_pthread=yes
5212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005213 echo "$as_me: program exited with status $ac_status" >&5
5214echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215sed 's/^/| /' conftest.$ac_ext >&5
5216
5217( exit $ac_status )
5218ac_cv_pthread=no
5219fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5221fi
5222
5223
5224CC="$ac_save_cc"
5225fi
5226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005227{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5228echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229fi
5230
5231# If we have set a CC compiler flag for thread support then
5232# check if it works for CXX, too.
5233ac_cv_cxx_thread=no
5234if test ! -z "$CXX"
5235then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005236{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5237echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238ac_save_cxx="$CXX"
5239
5240if test "$ac_cv_kpthread" = "yes"
5241then
5242 CXX="$CXX -Kpthread"
5243 ac_cv_cxx_thread=yes
5244elif test "$ac_cv_kthread" = "yes"
5245then
5246 CXX="$CXX -Kthread"
5247 ac_cv_cxx_thread=yes
5248elif test "$ac_cv_pthread" = "yes"
5249then
5250 CXX="$CXX -pthread"
5251 ac_cv_cxx_thread=yes
5252fi
5253
5254if test $ac_cv_cxx_thread = yes
5255then
5256 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5257 $CXX -c conftest.$ac_ext 2>&5
5258 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5259 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5260 then
5261 ac_cv_cxx_thread=yes
5262 else
5263 ac_cv_cxx_thread=no
5264 fi
5265 rm -fr conftest*
5266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005267{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5268echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269fi
5270CXX="$ac_save_cxx"
5271
5272
5273# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005274{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5275echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005277 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278else
5279 cat >conftest.$ac_ext <<_ACEOF
5280/* confdefs.h. */
5281_ACEOF
5282cat confdefs.h >>conftest.$ac_ext
5283cat >>conftest.$ac_ext <<_ACEOF
5284/* end confdefs.h. */
5285#include <stdlib.h>
5286#include <stdarg.h>
5287#include <string.h>
5288#include <float.h>
5289
5290int
5291main ()
5292{
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (ac_try="$ac_compile"
5300case "(($ac_try" in
5301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5302 *) ac_try_echo=$ac_try;;
5303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 (eval "$ac_compile") 2>conftest.er1
5306 ac_status=$?
5307 grep -v '^ *+' conftest.er1 >conftest.err
5308 rm -f conftest.er1
5309 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311 (exit $ac_status); } && {
5312 test -z "$ac_c_werror_flag" ||
5313 test ! -s conftest.err
5314 } && test -s conftest.$ac_objext; then
5315 ac_cv_header_stdc=yes
5316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005317 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318sed 's/^/| /' conftest.$ac_ext >&5
5319
5320 ac_cv_header_stdc=no
5321fi
5322
5323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5324
5325if test $ac_cv_header_stdc = yes; then
5326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5327 cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
5333#include <string.h>
5334
5335_ACEOF
5336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5337 $EGREP "memchr" >/dev/null 2>&1; then
5338 :
5339else
5340 ac_cv_header_stdc=no
5341fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005342rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343
5344fi
5345
5346if test $ac_cv_header_stdc = yes; then
5347 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355
5356_ACEOF
5357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 $EGREP "free" >/dev/null 2>&1; then
5359 :
5360else
5361 ac_cv_header_stdc=no
5362fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005363rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5369 if test "$cross_compiling" = yes; then
5370 :
5371else
5372 cat >conftest.$ac_ext <<_ACEOF
5373/* confdefs.h. */
5374_ACEOF
5375cat confdefs.h >>conftest.$ac_ext
5376cat >>conftest.$ac_ext <<_ACEOF
5377/* end confdefs.h. */
5378#include <ctype.h>
5379#include <stdlib.h>
5380#if ((' ' & 0x0FF) == 0x020)
5381# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5382# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5383#else
5384# define ISLOWER(c) \
5385 (('a' <= (c) && (c) <= 'i') \
5386 || ('j' <= (c) && (c) <= 'r') \
5387 || ('s' <= (c) && (c) <= 'z'))
5388# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5389#endif
5390
5391#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5392int
5393main ()
5394{
5395 int i;
5396 for (i = 0; i < 256; i++)
5397 if (XOR (islower (i), ISLOWER (i))
5398 || toupper (i) != TOUPPER (i))
5399 return 2;
5400 return 0;
5401}
5402_ACEOF
5403rm -f conftest$ac_exeext
5404if { (ac_try="$ac_link"
5405case "(($ac_try" in
5406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5407 *) ac_try_echo=$ac_try;;
5408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410 (eval "$ac_link") 2>&5
5411 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5414 { (case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 (eval "$ac_try") 2>&5
5420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 (exit $ac_status); }; }; then
5423 :
5424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005425 echo "$as_me: program exited with status $ac_status" >&5
5426echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427sed 's/^/| /' conftest.$ac_ext >&5
5428
5429( exit $ac_status )
5430ac_cv_header_stdc=no
5431fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5433fi
5434
5435
5436fi
5437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005438{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5439echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440if test $ac_cv_header_stdc = yes; then
5441
5442cat >>confdefs.h <<\_ACEOF
5443#define STDC_HEADERS 1
5444_ACEOF
5445
5446fi
5447
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005448# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5459 inttypes.h stdint.h unistd.h
5460do
5461as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5462{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5464if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
5466else
5467 cat >conftest.$ac_ext <<_ACEOF
5468/* confdefs.h. */
5469_ACEOF
5470cat confdefs.h >>conftest.$ac_ext
5471cat >>conftest.$ac_ext <<_ACEOF
5472/* end confdefs.h. */
5473$ac_includes_default
5474
5475#include <$ac_header>
5476_ACEOF
5477rm -f conftest.$ac_objext
5478if { (ac_try="$ac_compile"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
5483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5484 (eval "$ac_compile") 2>conftest.er1
5485 ac_status=$?
5486 grep -v '^ *+' conftest.er1 >conftest.err
5487 rm -f conftest.er1
5488 cat conftest.err >&5
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); } && {
5491 test -z "$ac_c_werror_flag" ||
5492 test ! -s conftest.err
5493 } && test -s conftest.$ac_objext; then
5494 eval "$as_ac_Header=yes"
5495else
5496 echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499 eval "$as_ac_Header=no"
5500fi
5501
5502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5503fi
5504ac_res=`eval echo '${'$as_ac_Header'}'`
5505 { echo "$as_me:$LINENO: result: $ac_res" >&5
5506echo "${ECHO_T}$ac_res" >&6; }
5507if test `eval echo '${'$as_ac_Header'}'` = yes; then
5508 cat >>confdefs.h <<_ACEOF
5509#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5510_ACEOF
5511
5512fi
5513
5514done
5515
5516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Martin v. Löwis11437992002-04-12 09:54:03 +00005518
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
5549
5550
5551
5552
Anthony Baxter8a560de2004-10-13 15:30:56 +00005553
Martin v. Löwisc3001752005-01-23 09:27:24 +00005554
Martin v. Löwis11017b12006-01-14 18:12:57 +00005555
Thomas Wouters477c8d52006-05-27 19:21:47 +00005556
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005557
5558
5559
5560
5561
5562
5563
5564
Thomas Wouters89f507f2006-12-13 04:49:30 +00005565
Christian Heimes043d6f62008-01-07 17:19:16 +00005566
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005567
5568
Christian Heimesbbe741d2008-03-28 10:53:29 +00005569
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005570
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005571for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5572fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005573ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005574shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005575unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005576sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5577sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005579sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005580sys/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 +00005581sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005582bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005583do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005584as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005586 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005588if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005590fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005591ac_res=`eval echo '${'$as_ac_Header'}'`
5592 { echo "$as_me:$LINENO: result: $ac_res" >&5
5593echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594else
Martin v. Löwis11437992002-04-12 09:54:03 +00005595 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005596{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5597echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005599/* confdefs.h. */
5600_ACEOF
5601cat confdefs.h >>conftest.$ac_ext
5602cat >>conftest.$ac_ext <<_ACEOF
5603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005604$ac_includes_default
5605#include <$ac_header>
5606_ACEOF
5607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005627sed 's/^/| /' conftest.$ac_ext >&5
5628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005633{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5634echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005635
5636# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005637{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5638echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005639cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005645#include <$ac_header>
5646_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005647if { (ac_try="$ac_cpp conftest.$ac_ext"
5648case "(($ac_try" in
5649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5650 *) ac_try_echo=$ac_try;;
5651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005655 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 rm -f conftest.er1
5657 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005659 (exit $ac_status); } >/dev/null && {
5660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5661 test ! -s conftest.err
5662 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 ac_header_preproc=yes
5664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005666sed 's/^/| /' conftest.$ac_ext >&5
5667
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670
Martin v. Löwis11437992002-04-12 09:54:03 +00005671rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005672{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5673echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005674
5675# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005676case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5677 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005678 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5679echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5680 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5681echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005683 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005685 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5686echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5688echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5690echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5692echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5694echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5696echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005697 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005698## -------------------------------------- ##
5699## Report this to http://bugs.python.org/ ##
5700## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005701_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005705{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5706echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005707if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005708 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005709else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005712ac_res=`eval echo '${'$as_ac_Header'}'`
5713 { echo "$as_me:$LINENO: result: $ac_res" >&5
5714echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715
5716fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005719#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005720_ACEOF
5721
5722fi
5723
Guido van Rossum627b2d71993-12-24 10:39:16 +00005724done
5725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727
5728
5729
5730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005732for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5734{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5735echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005736if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738else
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005740/* confdefs.h. */
5741_ACEOF
5742cat confdefs.h >>conftest.$ac_ext
5743cat >>conftest.$ac_ext <<_ACEOF
5744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745#include <sys/types.h>
5746#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
Martin v. Löwis11437992002-04-12 09:54:03 +00005748int
5749main ()
5750{
5751if ((DIR *) 0)
5752return 0;
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005758if { (ac_try="$ac_compile"
5759case "(($ac_try" in
5760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5761 *) ac_try_echo=$ac_try;;
5762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005766 grep -v '^ *+' conftest.er1 >conftest.err
5767 rm -f conftest.er1
5768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005770 (exit $ac_status); } && {
5771 test -z "$ac_c_werror_flag" ||
5772 test ! -s conftest.err
5773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005774 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005777sed 's/^/| /' conftest.$ac_ext >&5
5778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781
5782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784ac_res=`eval echo '${'$as_ac_Header'}'`
5785 { echo "$as_me:$LINENO: result: $ac_res" >&5
5786echo "${ECHO_T}$ac_res" >&6; }
5787if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005789#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005790_ACEOF
5791
5792ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795done
5796# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5797if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005798 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5799echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005800if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802else
Martin v. Löwis11437992002-04-12 09:54:03 +00005803 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005811/* Override any GCC internal prototype to avoid an error.
5812 Use char because int might match the return type of a GCC
5813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005814#ifdef __cplusplus
5815extern "C"
5816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005817char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005818int
5819main ()
5820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005821return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005822 ;
5823 return 0;
5824}
5825_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005826for ac_lib in '' dir; do
5827 if test -z "$ac_lib"; then
5828 ac_res="none required"
5829 else
5830 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832 fi
5833 rm -f conftest.$ac_objext conftest$ac_exeext
5834if { (ac_try="$ac_link"
5835case "(($ac_try" in
5836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837 *) ac_try_echo=$ac_try;;
5838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005841 ac_status=$?
5842 grep -v '^ *+' conftest.er1 >conftest.err
5843 rm -f conftest.er1
5844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 (exit $ac_status); } && {
5847 test -z "$ac_c_werror_flag" ||
5848 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849 } && test -s conftest$ac_exeext &&
5850 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856
Thomas Wouters477c8d52006-05-27 19:21:47 +00005857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858
5859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5860 conftest$ac_exeext
5861 if test "${ac_cv_search_opendir+set}" = set; then
5862 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005864done
5865if test "${ac_cv_search_opendir+set}" = set; then
5866 :
5867else
5868 ac_cv_search_opendir=no
5869fi
5870rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005871LIBS=$ac_func_search_save_LIBS
5872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005873{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5874echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875ac_res=$ac_cv_search_opendir
5876if test "$ac_res" != no; then
5877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005880
Michael W. Hudson54241132001-12-07 15:38:26 +00005881else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005882 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5883echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005884if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005885 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005886else
5887 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005889/* confdefs.h. */
5890_ACEOF
5891cat confdefs.h >>conftest.$ac_ext
5892cat >>conftest.$ac_ext <<_ACEOF
5893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895/* Override any GCC internal prototype to avoid an error.
5896 Use char because int might match the return type of a GCC
5897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005898#ifdef __cplusplus
5899extern "C"
5900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005901char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005905return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 ;
5907 return 0;
5908}
5909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005910for ac_lib in '' x; do
5911 if test -z "$ac_lib"; then
5912 ac_res="none required"
5913 else
5914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918if { (ac_try="$ac_link"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005924 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005925 ac_status=$?
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005933 } && test -s conftest$ac_exeext &&
5934 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
Thomas Wouters477c8d52006-05-27 19:21:47 +00005941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942
5943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5944 conftest$ac_exeext
5945 if test "${ac_cv_search_opendir+set}" = set; then
5946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948done
5949if test "${ac_cv_search_opendir+set}" = set; then
5950 :
5951else
5952 ac_cv_search_opendir=no
5953fi
5954rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005955LIBS=$ac_func_search_save_LIBS
5956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005957{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5958echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959ac_res=$ac_cv_search_opendir
5960if test "$ac_res" != no; then
5961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963fi
5964
5965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005967{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5968echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971else
5972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979int
5980main ()
5981{
5982return makedev(0, 0);
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005988if { (ac_try="$ac_link"
5989case "(($ac_try" in
5990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5991 *) ac_try_echo=$ac_try;;
5992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005996 grep -v '^ *+' conftest.er1 >conftest.err
5997 rm -f conftest.er1
5998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 (exit $ac_status); } && {
6001 test -z "$ac_c_werror_flag" ||
6002 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006003 } && test -s conftest$ac_exeext &&
6004 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005 ac_cv_header_sys_types_h_makedev=yes
6006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006008sed 's/^/| /' conftest.$ac_ext >&5
6009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006012
6013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015
6016fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6018echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019
6020if test $ac_cv_header_sys_types_h_makedev = no; then
6021if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006022 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6023echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006027{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6028echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029else
6030 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006031{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6032echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039$ac_includes_default
6040#include <sys/mkdev.h>
6041_ACEOF
6042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043if { (ac_try="$ac_compile"
6044case "(($ac_try" in
6045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6046 *) ac_try_echo=$ac_try;;
6047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055 (exit $ac_status); } && {
6056 test -z "$ac_c_werror_flag" ||
6057 test ! -s conftest.err
6058 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059 ac_header_compiler=yes
6060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006062sed 's/^/| /' conftest.$ac_ext >&5
6063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066
6067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6069echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070
6071# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6073echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080#include <sys/mkdev.h>
6081_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082if { (ac_try="$ac_cpp conftest.$ac_ext"
6083case "(($ac_try" in
6084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6085 *) ac_try_echo=$ac_try;;
6086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006090 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 rm -f conftest.er1
6092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 (exit $ac_status); } >/dev/null && {
6095 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6096 test ! -s conftest.err
6097 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 ac_header_preproc=yes
6099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006101sed 's/^/| /' conftest.$ac_ext >&5
6102
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_header_preproc=no
6104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006107{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6108echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109
6110# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006111case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6112 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6116echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006118 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006133## -------------------------------------- ##
6134## Report this to http://bugs.python.org/ ##
6135## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006136_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006138 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006140{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6141echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144else
6145 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006147{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6148echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006151if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152
6153cat >>confdefs.h <<\_ACEOF
6154#define MAJOR_IN_MKDEV 1
6155_ACEOF
6156
6157fi
6158
6159
6160
6161 if test $ac_cv_header_sys_mkdev_h = no; then
6162 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006163 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6164echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170else
6171 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6173echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180$ac_includes_default
6181#include <sys/sysmacros.h>
6182_ACEOF
6183rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184if { (ac_try="$ac_compile"
6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 grep -v '^ *+' conftest.er1 >conftest.err
6193 rm -f conftest.er1
6194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 (exit $ac_status); } && {
6197 test -z "$ac_c_werror_flag" ||
6198 test ! -s conftest.err
6199 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200 ac_header_compiler=yes
6201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006203sed 's/^/| /' conftest.$ac_ext >&5
6204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207
6208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6210echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006213{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6214echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221#include <sys/sysmacros.h>
6222_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223if { (ac_try="$ac_cpp conftest.$ac_ext"
6224case "(($ac_try" in
6225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6226 *) ac_try_echo=$ac_try;;
6227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006231 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 rm -f conftest.er1
6233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235 (exit $ac_status); } >/dev/null && {
6236 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6237 test ! -s conftest.err
6238 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239 ac_header_preproc=yes
6240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006242sed 's/^/| /' conftest.$ac_ext >&5
6243
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_header_preproc=no
6245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006248{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6249echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250
6251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6253 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006254 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6255echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6257echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006274## -------------------------------------- ##
6275## Report this to http://bugs.python.org/ ##
6276## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006277_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006279 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006281{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6282echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285else
6286 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006288{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6289echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290
6291fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006292if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293
6294cat >>confdefs.h <<\_ACEOF
6295#define MAJOR_IN_SYSMACROS 1
6296_ACEOF
6297
6298fi
6299
6300
6301 fi
6302fi
6303
Michael W. Hudson54241132001-12-07 15:38:26 +00006304
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006305# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006306
6307for ac_header in term.h
6308do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6310{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006313 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006314else
6315 cat >conftest.$ac_ext <<_ACEOF
6316/* confdefs.h. */
6317_ACEOF
6318cat confdefs.h >>conftest.$ac_ext
6319cat >>conftest.$ac_ext <<_ACEOF
6320/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006322#ifdef HAVE_CURSES_H
6323#include <curses.h>
6324#endif
6325
6326
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006327#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328_ACEOF
6329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006330if { (ac_try="$ac_compile"
6331case "(($ac_try" in
6332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6333 *) ac_try_echo=$ac_try;;
6334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337 ac_status=$?
6338 grep -v '^ *+' conftest.er1 >conftest.err
6339 rm -f conftest.er1
6340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 (exit $ac_status); } && {
6343 test -z "$ac_c_werror_flag" ||
6344 test ! -s conftest.err
6345 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006346 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006348 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353
6354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356ac_res=`eval echo '${'$as_ac_Header'}'`
6357 { echo "$as_me:$LINENO: result: $ac_res" >&5
6358echo "${ECHO_T}$ac_res" >&6; }
6359if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006361#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364fi
6365
6366done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
6368
Martin v. Löwis11017b12006-01-14 18:12:57 +00006369# On Linux, netlink.h requires asm/types.h
6370
6371for ac_header in linux/netlink.h
6372do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006373as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6374{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378else
6379 cat >conftest.$ac_ext <<_ACEOF
6380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
6385
6386#ifdef HAVE_ASM_TYPES_H
6387#include <asm/types.h>
6388#endif
6389#ifdef HAVE_SYS_SOCKET_H
6390#include <sys/socket.h>
6391#endif
6392
6393
6394#include <$ac_header>
6395_ACEOF
6396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397if { (ac_try="$ac_compile"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413 eval "$as_ac_Header=yes"
6414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006415 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006416sed 's/^/| /' conftest.$ac_ext >&5
6417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423ac_res=`eval echo '${'$as_ac_Header'}'`
6424 { echo "$as_me:$LINENO: result: $ac_res" >&5
6425echo "${ECHO_T}$ac_res" >&6; }
6426if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429_ACEOF
6430
6431fi
6432
6433done
6434
6435
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006438{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6439echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006441/* confdefs.h. */
6442_ACEOF
6443cat confdefs.h >>conftest.$ac_ext
6444cat >>conftest.$ac_ext <<_ACEOF
6445/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006450 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006451 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452else
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454
6455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006459
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6464echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465
Neal Norwitz11690112002-07-30 01:08:28 +00006466# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006467{ echo "$as_me:$LINENO: checking for makedev" >&5
6468echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006475#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006476int
6477main ()
6478{
6479 makedev(0, 0)
6480 ;
6481 return 0;
6482}
6483_ACEOF
6484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485if { (ac_try="$ac_link"
6486case "(($ac_try" in
6487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6488 *) ac_try_echo=$ac_try;;
6489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006491 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006493 grep -v '^ *+' conftest.er1 >conftest.err
6494 rm -f conftest.er1
6495 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497 (exit $ac_status); } && {
6498 test -z "$ac_c_werror_flag" ||
6499 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006500 } && test -s conftest$ac_exeext &&
6501 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006502 ac_cv_has_makedev=yes
6503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006505sed 's/^/| /' conftest.$ac_ext >&5
6506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509
6510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006511 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006512if test "$ac_cv_has_makedev" = "no"; then
6513 # we didn't link, try if _OSF_SOURCE will allow us to link
6514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006520
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006521#define _OSF_SOURCE 1
6522#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006523
Neal Norwitz11690112002-07-30 01:08:28 +00006524int
6525main ()
6526{
6527 makedev(0, 0)
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006533if { (ac_try="$ac_link"
6534case "(($ac_try" in
6535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6536 *) ac_try_echo=$ac_try;;
6537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006541 grep -v '^ *+' conftest.er1 >conftest.err
6542 rm -f conftest.er1
6543 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006545 (exit $ac_status); } && {
6546 test -z "$ac_c_werror_flag" ||
6547 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006548 } && test -s conftest$ac_exeext &&
6549 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006550 ac_cv_has_makedev=yes
6551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006553sed 's/^/| /' conftest.$ac_ext >&5
6554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557
6558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006559 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006560 if test "$ac_cv_has_makedev" = "yes"; then
6561
6562cat >>confdefs.h <<\_ACEOF
6563#define _OSF_SOURCE 1
6564_ACEOF
6565
6566 fi
6567fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006568{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6569echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006570if test "$ac_cv_has_makedev" = "yes"; then
6571
6572cat >>confdefs.h <<\_ACEOF
6573#define HAVE_MAKEDEV 1
6574_ACEOF
6575
6576fi
6577
Martin v. Löwis399a6892002-10-04 10:22:02 +00006578# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6579# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6580# defined, but the compiler does not support pragma redefine_extname,
6581# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6582# structures (such as rlimit64) without declaring them. As a
6583# work-around, disable LFS on such configurations
6584
6585use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006586{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6587echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594
6595#define _LARGEFILE_SOURCE 1
6596#define _FILE_OFFSET_BITS 64
6597#include <sys/resource.h>
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599int
6600main ()
6601{
6602struct rlimit foo;
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608if { (ac_try="$ac_compile"
6609case "(($ac_try" in
6610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6611 *) ac_try_echo=$ac_try;;
6612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620 (exit $ac_status); } && {
6621 test -z "$ac_c_werror_flag" ||
6622 test ! -s conftest.err
6623 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624 sol_lfs_bug=no
6625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006633{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6634echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635if test "$sol_lfs_bug" = "yes"; then
6636 use_lfs=no
6637fi
6638
6639if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006640# Two defines needed to enable largefile support on various platforms
6641# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643cat >>confdefs.h <<\_ACEOF
6644#define _LARGEFILE_SOURCE 1
6645_ACEOF
6646
6647
6648cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006649#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006653
Guido van Rossum84e7b241996-08-19 21:59:00 +00006654# Add some code to confdefs.h so that the test for off_t works on SCO
6655cat >> confdefs.h <<\EOF
6656#if defined(SCO_DS)
6657#undef _OFF_T
6658#endif
6659EOF
6660
Guido van Rossumef2255b2000-03-10 22:30:29 +00006661# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006662{ echo "$as_me:$LINENO: checking for mode_t" >&5
6663echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006664if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006666else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006667 cat >conftest.$ac_ext <<_ACEOF
6668/* confdefs.h. */
6669_ACEOF
6670cat confdefs.h >>conftest.$ac_ext
6671cat >>conftest.$ac_ext <<_ACEOF
6672/* end confdefs.h. */
6673$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006675int
6676main ()
6677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006678if ((ac__type_new_ *) 0)
6679 return 0;
6680if (sizeof (ac__type_new_))
6681 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
6687if { (ac_try="$ac_compile"
6688case "(($ac_try" in
6689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6690 *) ac_try_echo=$ac_try;;
6691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006693 (eval "$ac_compile") 2>conftest.er1
6694 ac_status=$?
6695 grep -v '^ *+' conftest.er1 >conftest.err
6696 rm -f conftest.er1
6697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006699 (exit $ac_status); } && {
6700 test -z "$ac_c_werror_flag" ||
6701 test ! -s conftest.err
6702 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006706sed 's/^/| /' conftest.$ac_ext >&5
6707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006708 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710
6711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006713{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6714echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6715if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717else
Martin v. Löwis11437992002-04-12 09:54:03 +00006718
6719cat >>confdefs.h <<_ACEOF
6720#define mode_t int
6721_ACEOF
6722
6723fi
6724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006725{ echo "$as_me:$LINENO: checking for off_t" >&5
6726echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006727if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006730 cat >conftest.$ac_ext <<_ACEOF
6731/* confdefs.h. */
6732_ACEOF
6733cat confdefs.h >>conftest.$ac_ext
6734cat >>conftest.$ac_ext <<_ACEOF
6735/* end confdefs.h. */
6736$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006737typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006738int
6739main ()
6740{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006741if ((ac__type_new_ *) 0)
6742 return 0;
6743if (sizeof (ac__type_new_))
6744 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006745 ;
6746 return 0;
6747}
6748_ACEOF
6749rm -f conftest.$ac_objext
6750if { (ac_try="$ac_compile"
6751case "(($ac_try" in
6752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6753 *) ac_try_echo=$ac_try;;
6754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006756 (eval "$ac_compile") 2>conftest.er1
6757 ac_status=$?
6758 grep -v '^ *+' conftest.er1 >conftest.err
6759 rm -f conftest.er1
6760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006762 (exit $ac_status); } && {
6763 test -z "$ac_c_werror_flag" ||
6764 test ! -s conftest.err
6765 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006766 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006769sed 's/^/| /' conftest.$ac_ext >&5
6770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006771 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6777echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6778if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006780else
Martin v. Löwis11437992002-04-12 09:54:03 +00006781
6782cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
6785
6786fi
6787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006788{ echo "$as_me:$LINENO: checking for pid_t" >&5
6789echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006790if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006793 cat >conftest.$ac_ext <<_ACEOF
6794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
6799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801int
6802main ()
6803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006804if ((ac__type_new_ *) 0)
6805 return 0;
6806if (sizeof (ac__type_new_))
6807 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (ac_try="$ac_compile"
6814case "(($ac_try" in
6815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6816 *) ac_try_echo=$ac_try;;
6817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006819 (eval "$ac_compile") 2>conftest.er1
6820 ac_status=$?
6821 grep -v '^ *+' conftest.er1 >conftest.err
6822 rm -f conftest.er1
6823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006825 (exit $ac_status); } && {
6826 test -z "$ac_c_werror_flag" ||
6827 test ! -s conftest.err
6828 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006832sed 's/^/| /' conftest.$ac_ext >&5
6833
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006834 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836
6837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006838fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6840echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6841if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844
6845cat >>confdefs.h <<_ACEOF
6846#define pid_t int
6847_ACEOF
6848
6849fi
6850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006851{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6852echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006853if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006854 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
6856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006857/* confdefs.h. */
6858_ACEOF
6859cat confdefs.h >>conftest.$ac_ext
6860cat >>conftest.$ac_ext <<_ACEOF
6861/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006862#include <sys/types.h>
6863#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865int
6866main ()
6867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874if { (ac_try="$ac_compile"
6875case "(($ac_try" in
6876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6877 *) ac_try_echo=$ac_try;;
6878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006882 grep -v '^ *+' conftest.er1 >conftest.err
6883 rm -f conftest.er1
6884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 (exit $ac_status); } && {
6887 test -z "$ac_c_werror_flag" ||
6888 test ! -s conftest.err
6889 } && test -s conftest.$ac_objext; then
6890 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006893sed 's/^/| /' conftest.$ac_ext >&5
6894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6901echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006904#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: checking for size_t" >&5
6909echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006910if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006913 cat >conftest.$ac_ext <<_ACEOF
6914/* confdefs.h. */
6915_ACEOF
6916cat confdefs.h >>conftest.$ac_ext
6917cat >>conftest.$ac_ext <<_ACEOF
6918/* end confdefs.h. */
6919$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006921int
6922main ()
6923{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006924if ((ac__type_new_ *) 0)
6925 return 0;
6926if (sizeof (ac__type_new_))
6927 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006928 ;
6929 return 0;
6930}
6931_ACEOF
6932rm -f conftest.$ac_objext
6933if { (ac_try="$ac_compile"
6934case "(($ac_try" in
6935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6936 *) ac_try_echo=$ac_try;;
6937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006939 (eval "$ac_compile") 2>conftest.er1
6940 ac_status=$?
6941 grep -v '^ *+' conftest.er1 >conftest.err
6942 rm -f conftest.er1
6943 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006945 (exit $ac_status); } && {
6946 test -z "$ac_c_werror_flag" ||
6947 test ! -s conftest.err
6948 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006949 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956
6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6960echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6961if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006963else
Martin v. Löwis11437992002-04-12 09:54:03 +00006964
6965cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006967_ACEOF
6968
6969fi
6970
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006971{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6972echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006973if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006975else
6976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006977/* confdefs.h. */
6978_ACEOF
6979cat confdefs.h >>conftest.$ac_ext
6980cat >>conftest.$ac_ext <<_ACEOF
6981/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006983
6984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006986 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987 ac_cv_type_uid_t=yes
6988else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989 ac_cv_type_uid_t=no
6990fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006991rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006994{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6995echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006996if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998cat >>confdefs.h <<\_ACEOF
6999#define uid_t int
7000_ACEOF
7001
7002
7003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006
7007fi
7008
Mark Dickinsonbd792642009-03-18 20:06:12 +00007009
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007010 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7011echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007012if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007014else
7015 ac_cv_c_uint32_t=no
7016 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7017 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7018 cat >conftest.$ac_ext <<_ACEOF
7019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
7024$ac_includes_default
7025int
7026main ()
7027{
7028static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7029test_array [0] = 0
7030
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035rm -f conftest.$ac_objext
7036if { (ac_try="$ac_compile"
7037case "(($ac_try" in
7038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7039 *) ac_try_echo=$ac_try;;
7040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007042 (eval "$ac_compile") 2>conftest.er1
7043 ac_status=$?
7044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007048 (exit $ac_status); } && {
7049 test -z "$ac_c_werror_flag" ||
7050 test ! -s conftest.err
7051 } && test -s conftest.$ac_objext; then
7052 case $ac_type in
7053 uint32_t) ac_cv_c_uint32_t=yes ;;
7054 *) ac_cv_c_uint32_t=$ac_type ;;
7055esac
7056
7057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007058 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059sed 's/^/| /' conftest.$ac_ext >&5
7060
7061
7062fi
7063
7064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7065 test "$ac_cv_c_uint32_t" != no && break
7066 done
7067fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7069echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070 case $ac_cv_c_uint32_t in #(
7071 no|yes) ;; #(
7072 *)
7073
7074cat >>confdefs.h <<\_ACEOF
7075#define _UINT32_T 1
7076_ACEOF
7077
7078
7079cat >>confdefs.h <<_ACEOF
7080#define uint32_t $ac_cv_c_uint32_t
7081_ACEOF
7082;;
7083 esac
7084
7085
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007086 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7087echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007089 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090else
7091 ac_cv_c_uint64_t=no
7092 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7093 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7094 cat >conftest.$ac_ext <<_ACEOF
7095/* confdefs.h. */
7096_ACEOF
7097cat confdefs.h >>conftest.$ac_ext
7098cat >>conftest.$ac_ext <<_ACEOF
7099/* end confdefs.h. */
7100$ac_includes_default
7101int
7102main ()
7103{
7104static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7105test_array [0] = 0
7106
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007118 (eval "$ac_compile") 2>conftest.er1
7119 ac_status=$?
7120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
7128 case $ac_type in
7129 uint64_t) ac_cv_c_uint64_t=yes ;;
7130 *) ac_cv_c_uint64_t=$ac_type ;;
7131esac
7132
7133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007134 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135sed 's/^/| /' conftest.$ac_ext >&5
7136
7137
7138fi
7139
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 test "$ac_cv_c_uint64_t" != no && break
7142 done
7143fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7145echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146 case $ac_cv_c_uint64_t in #(
7147 no|yes) ;; #(
7148 *)
7149
7150cat >>confdefs.h <<\_ACEOF
7151#define _UINT64_T 1
7152_ACEOF
7153
7154
7155cat >>confdefs.h <<_ACEOF
7156#define uint64_t $ac_cv_c_uint64_t
7157_ACEOF
7158;;
7159 esac
7160
7161
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007162 { echo "$as_me:$LINENO: checking for int32_t" >&5
7163echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007165 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166else
7167 ac_cv_c_int32_t=no
7168 for ac_type in 'int32_t' 'int' 'long int' \
7169 'long long int' 'short int' 'signed char'; do
7170 cat >conftest.$ac_ext <<_ACEOF
7171/* confdefs.h. */
7172_ACEOF
7173cat confdefs.h >>conftest.$ac_ext
7174cat >>conftest.$ac_ext <<_ACEOF
7175/* end confdefs.h. */
7176$ac_includes_default
7177int
7178main ()
7179{
7180static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
7188if { (ac_try="$ac_compile"
7189case "(($ac_try" in
7190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7191 *) ac_try_echo=$ac_try;;
7192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007194 (eval "$ac_compile") 2>conftest.er1
7195 ac_status=$?
7196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200 (exit $ac_status); } && {
7201 test -z "$ac_c_werror_flag" ||
7202 test ! -s conftest.err
7203 } && test -s conftest.$ac_objext; then
7204 cat >conftest.$ac_ext <<_ACEOF
7205/* confdefs.h. */
7206_ACEOF
7207cat confdefs.h >>conftest.$ac_ext
7208cat >>conftest.$ac_ext <<_ACEOF
7209/* end confdefs.h. */
7210$ac_includes_default
7211int
7212main ()
7213{
7214static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007215 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007216test_array [0] = 0
7217
7218 ;
7219 return 0;
7220}
7221_ACEOF
7222rm -f conftest.$ac_objext
7223if { (ac_try="$ac_compile"
7224case "(($ac_try" in
7225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7226 *) ac_try_echo=$ac_try;;
7227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007229 (eval "$ac_compile") 2>conftest.er1
7230 ac_status=$?
7231 grep -v '^ *+' conftest.er1 >conftest.err
7232 rm -f conftest.er1
7233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235 (exit $ac_status); } && {
7236 test -z "$ac_c_werror_flag" ||
7237 test ! -s conftest.err
7238 } && test -s conftest.$ac_objext; then
7239 :
7240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007241 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242sed 's/^/| /' conftest.$ac_ext >&5
7243
7244 case $ac_type in
7245 int32_t) ac_cv_c_int32_t=yes ;;
7246 *) ac_cv_c_int32_t=$ac_type ;;
7247esac
7248
7249fi
7250
7251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007253 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
7256
7257fi
7258
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260 test "$ac_cv_c_int32_t" != no && break
7261 done
7262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007263{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7264echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265 case $ac_cv_c_int32_t in #(
7266 no|yes) ;; #(
7267 *)
7268
7269cat >>confdefs.h <<_ACEOF
7270#define int32_t $ac_cv_c_int32_t
7271_ACEOF
7272;;
7273 esac
7274
7275
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007276 { echo "$as_me:$LINENO: checking for int64_t" >&5
7277echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007279 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007280else
7281 ac_cv_c_int64_t=no
7282 for ac_type in 'int64_t' 'int' 'long int' \
7283 'long long int' 'short int' 'signed char'; do
7284 cat >conftest.$ac_ext <<_ACEOF
7285/* confdefs.h. */
7286_ACEOF
7287cat confdefs.h >>conftest.$ac_ext
7288cat >>conftest.$ac_ext <<_ACEOF
7289/* end confdefs.h. */
7290$ac_includes_default
7291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (ac_try="$ac_compile"
7303case "(($ac_try" in
7304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7305 *) ac_try_echo=$ac_try;;
7306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007308 (eval "$ac_compile") 2>conftest.er1
7309 ac_status=$?
7310 grep -v '^ *+' conftest.er1 >conftest.err
7311 rm -f conftest.er1
7312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007314 (exit $ac_status); } && {
7315 test -z "$ac_c_werror_flag" ||
7316 test ! -s conftest.err
7317 } && test -s conftest.$ac_objext; then
7318 cat >conftest.$ac_ext <<_ACEOF
7319/* confdefs.h. */
7320_ACEOF
7321cat confdefs.h >>conftest.$ac_ext
7322cat >>conftest.$ac_ext <<_ACEOF
7323/* end confdefs.h. */
7324$ac_includes_default
7325int
7326main ()
7327{
7328static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007329 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330test_array [0] = 0
7331
7332 ;
7333 return 0;
7334}
7335_ACEOF
7336rm -f conftest.$ac_objext
7337if { (ac_try="$ac_compile"
7338case "(($ac_try" in
7339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7340 *) ac_try_echo=$ac_try;;
7341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007343 (eval "$ac_compile") 2>conftest.er1
7344 ac_status=$?
7345 grep -v '^ *+' conftest.er1 >conftest.err
7346 rm -f conftest.er1
7347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349 (exit $ac_status); } && {
7350 test -z "$ac_c_werror_flag" ||
7351 test ! -s conftest.err
7352 } && test -s conftest.$ac_objext; then
7353 :
7354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007355 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
7358 case $ac_type in
7359 int64_t) ac_cv_c_int64_t=yes ;;
7360 *) ac_cv_c_int64_t=$ac_type ;;
7361esac
7362
7363fi
7364
7365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007367 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007368sed 's/^/| /' conftest.$ac_ext >&5
7369
7370
7371fi
7372
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 test "$ac_cv_c_int64_t" != no && break
7375 done
7376fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007377{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7378echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379 case $ac_cv_c_int64_t in #(
7380 no|yes) ;; #(
7381 *)
7382
7383cat >>confdefs.h <<_ACEOF
7384#define int64_t $ac_cv_c_int64_t
7385_ACEOF
7386;;
7387 esac
7388
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007389{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7390echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007391if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007393else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007394 cat >conftest.$ac_ext <<_ACEOF
7395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
7400$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007401typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007402int
7403main ()
7404{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007405if ((ac__type_new_ *) 0)
7406 return 0;
7407if (sizeof (ac__type_new_))
7408 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (ac_try="$ac_compile"
7415case "(($ac_try" in
7416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7417 *) ac_try_echo=$ac_try;;
7418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007420 (eval "$ac_compile") 2>conftest.er1
7421 ac_status=$?
7422 grep -v '^ *+' conftest.er1 >conftest.err
7423 rm -f conftest.er1
7424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007426 (exit $ac_status); } && {
7427 test -z "$ac_c_werror_flag" ||
7428 test ! -s conftest.err
7429 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007430 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007435 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007440{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7441echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7442if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007443
7444cat >>confdefs.h <<\_ACEOF
7445#define HAVE_SSIZE_T 1
7446_ACEOF
7447
7448fi
7449
Jack Jansendd19cf82001-12-06 22:36:17 +00007450
Michael W. Hudson54241132001-12-07 15:38:26 +00007451# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007452# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007453{ echo "$as_me:$LINENO: checking for int" >&5
7454echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7455if test "${ac_cv_type_int+set}" = set; then
7456 echo $ECHO_N "(cached) $ECHO_C" >&6
7457else
7458 cat >conftest.$ac_ext <<_ACEOF
7459/* confdefs.h. */
7460_ACEOF
7461cat confdefs.h >>conftest.$ac_ext
7462cat >>conftest.$ac_ext <<_ACEOF
7463/* end confdefs.h. */
7464$ac_includes_default
7465typedef int ac__type_new_;
7466int
7467main ()
7468{
7469if ((ac__type_new_ *) 0)
7470 return 0;
7471if (sizeof (ac__type_new_))
7472 return 0;
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477rm -f conftest.$ac_objext
7478if { (ac_try="$ac_compile"
7479case "(($ac_try" in
7480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7481 *) ac_try_echo=$ac_try;;
7482esac
7483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7484 (eval "$ac_compile") 2>conftest.er1
7485 ac_status=$?
7486 grep -v '^ *+' conftest.er1 >conftest.err
7487 rm -f conftest.er1
7488 cat conftest.err >&5
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); } && {
7491 test -z "$ac_c_werror_flag" ||
7492 test ! -s conftest.err
7493 } && test -s conftest.$ac_objext; then
7494 ac_cv_type_int=yes
7495else
7496 echo "$as_me: failed program was:" >&5
7497sed 's/^/| /' conftest.$ac_ext >&5
7498
7499 ac_cv_type_int=no
7500fi
7501
7502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7503fi
7504{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7505echo "${ECHO_T}$ac_cv_type_int" >&6; }
7506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507# The cast to long int works around a bug in the HP C Compiler
7508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7510# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007511{ echo "$as_me:$LINENO: checking size of int" >&5
7512echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007513if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007515else
Martin v. Löwis11437992002-04-12 09:54:03 +00007516 if test "$cross_compiling" = yes; then
7517 # Depending upon the size, compute the lo and hi bounds.
7518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007519/* confdefs.h. */
7520_ACEOF
7521cat confdefs.h >>conftest.$ac_ext
7522cat >>conftest.$ac_ext <<_ACEOF
7523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007524$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007525 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007526int
7527main ()
7528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007530test_array [0] = 0
7531
7532 ;
7533 return 0;
7534}
7535_ACEOF
7536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537if { (ac_try="$ac_compile"
7538case "(($ac_try" in
7539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7540 *) ac_try_echo=$ac_try;;
7541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549 (exit $ac_status); } && {
7550 test -z "$ac_c_werror_flag" ||
7551 test ! -s conftest.err
7552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_lo=0 ac_mid=0
7554 while :; do
7555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007561$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007562 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007563int
7564main ()
7565{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007567test_array [0] = 0
7568
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574if { (ac_try="$ac_compile"
7575case "(($ac_try" in
7576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7577 *) ac_try_echo=$ac_try;;
7578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007582 grep -v '^ *+' conftest.er1 >conftest.err
7583 rm -f conftest.er1
7584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586 (exit $ac_status); } && {
7587 test -z "$ac_c_werror_flag" ||
7588 test ! -s conftest.err
7589 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_hi=$ac_mid; break
7591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 ac_lo=`expr $ac_mid + 1`
7596 if test $ac_lo -le $ac_mid; then
7597 ac_lo= ac_hi=
7598 break
7599 fi
7600 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602
7603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 done
7605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007607sed 's/^/| /' conftest.$ac_ext >&5
7608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007610/* confdefs.h. */
7611_ACEOF
7612cat confdefs.h >>conftest.$ac_ext
7613cat >>conftest.$ac_ext <<_ACEOF
7614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007616 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007617int
7618main ()
7619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007621test_array [0] = 0
7622
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628if { (ac_try="$ac_compile"
7629case "(($ac_try" in
7630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631 *) ac_try_echo=$ac_try;;
7632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007636 grep -v '^ *+' conftest.er1 >conftest.err
7637 rm -f conftest.er1
7638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640 (exit $ac_status); } && {
7641 test -z "$ac_c_werror_flag" ||
7642 test ! -s conftest.err
7643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_hi=-1 ac_mid=-1
7645 while :; do
7646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007653 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007658test_array [0] = 0
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665if { (ac_try="$ac_compile"
7666case "(($ac_try" in
7667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7668 *) ac_try_echo=$ac_try;;
7669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007673 grep -v '^ *+' conftest.er1 >conftest.err
7674 rm -f conftest.er1
7675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677 (exit $ac_status); } && {
7678 test -z "$ac_c_werror_flag" ||
7679 test ! -s conftest.err
7680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_lo=$ac_mid; break
7682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007684sed 's/^/| /' conftest.$ac_ext >&5
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 ac_hi=`expr '(' $ac_mid ')' - 1`
7687 if test $ac_mid -le $ac_hi; then
7688 ac_lo= ac_hi=
7689 break
7690 fi
7691 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693
7694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 done
7696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007698sed 's/^/| /' conftest.$ac_ext >&5
7699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705
7706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007707# Binary search between lo and hi bounds.
7708while test "x$ac_lo" != "x$ac_hi"; do
7709 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007711/* confdefs.h. */
7712_ACEOF
7713cat confdefs.h >>conftest.$ac_ext
7714cat >>conftest.$ac_ext <<_ACEOF
7715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007716$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007717 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007718int
7719main ()
7720{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007722test_array [0] = 0
7723
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729if { (ac_try="$ac_compile"
7730case "(($ac_try" in
7731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7732 *) ac_try_echo=$ac_try;;
7733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007737 grep -v '^ *+' conftest.er1 >conftest.err
7738 rm -f conftest.er1
7739 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741 (exit $ac_status); } && {
7742 test -z "$ac_c_werror_flag" ||
7743 test ! -s conftest.err
7744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_hi=$ac_mid
7746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007748sed 's/^/| /' conftest.$ac_ext >&5
7749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752
7753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007754done
7755case $ac_lo in
7756?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007761See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007762 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 else
7764 ac_cv_sizeof_int=0
7765 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007766esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007769/* confdefs.h. */
7770_ACEOF
7771cat confdefs.h >>conftest.$ac_ext
7772cat >>conftest.$ac_ext <<_ACEOF
7773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007775 typedef int ac__type_sizeof_;
7776static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7777static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007778#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007780int
7781main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007782{
Martin v. Löwis11437992002-04-12 09:54:03 +00007783
7784 FILE *f = fopen ("conftest.val", "w");
7785 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007787 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007792 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 }
7794 else
7795 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007797 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
7803 ;
7804 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007805}
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
7807rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808if { (ac_try="$ac_link"
7809case "(($ac_try" in
7810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7811 *) ac_try_echo=$ac_try;;
7812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 { (case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 (exit $ac_status); }; }; then
7827 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829 echo "$as_me: program exited with status $ac_status" >&5
7830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007838See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007839 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 else
7841 ac_cv_sizeof_int=0
7842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844rm -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 +00007845fi
7846rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007848{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7849echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850
7851
7852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007855_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856
7857
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007858{ echo "$as_me:$LINENO: checking for long" >&5
7859echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7860if test "${ac_cv_type_long+set}" = set; then
7861 echo $ECHO_N "(cached) $ECHO_C" >&6
7862else
7863 cat >conftest.$ac_ext <<_ACEOF
7864/* confdefs.h. */
7865_ACEOF
7866cat confdefs.h >>conftest.$ac_ext
7867cat >>conftest.$ac_ext <<_ACEOF
7868/* end confdefs.h. */
7869$ac_includes_default
7870typedef long ac__type_new_;
7871int
7872main ()
7873{
7874if ((ac__type_new_ *) 0)
7875 return 0;
7876if (sizeof (ac__type_new_))
7877 return 0;
7878 ;
7879 return 0;
7880}
7881_ACEOF
7882rm -f conftest.$ac_objext
7883if { (ac_try="$ac_compile"
7884case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
7888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7889 (eval "$ac_compile") 2>conftest.er1
7890 ac_status=$?
7891 grep -v '^ *+' conftest.er1 >conftest.err
7892 rm -f conftest.er1
7893 cat conftest.err >&5
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); } && {
7896 test -z "$ac_c_werror_flag" ||
7897 test ! -s conftest.err
7898 } && test -s conftest.$ac_objext; then
7899 ac_cv_type_long=yes
7900else
7901 echo "$as_me: failed program was:" >&5
7902sed 's/^/| /' conftest.$ac_ext >&5
7903
7904 ac_cv_type_long=no
7905fi
7906
7907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7908fi
7909{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7910echo "${ECHO_T}$ac_cv_type_long" >&6; }
7911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912# The cast to long int works around a bug in the HP C Compiler
7913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7915# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007916{ echo "$as_me:$LINENO: checking size of long" >&5
7917echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007918if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 if test "$cross_compiling" = yes; then
7922 # Depending upon the size, compute the lo and hi bounds.
7923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* confdefs.h. */
7925_ACEOF
7926cat confdefs.h >>conftest.$ac_ext
7927cat >>conftest.$ac_ext <<_ACEOF
7928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007930 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007935test_array [0] = 0
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942if { (ac_try="$ac_compile"
7943case "(($ac_try" in
7944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7945 *) ac_try_echo=$ac_try;;
7946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007950 grep -v '^ *+' conftest.er1 >conftest.err
7951 rm -f conftest.er1
7952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954 (exit $ac_status); } && {
7955 test -z "$ac_c_werror_flag" ||
7956 test ! -s conftest.err
7957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_lo=0 ac_mid=0
7959 while :; do
7960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* confdefs.h. */
7962_ACEOF
7963cat confdefs.h >>conftest.$ac_ext
7964cat >>conftest.$ac_ext <<_ACEOF
7965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007967 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007972test_array [0] = 0
7973
7974 ;
7975 return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979if { (ac_try="$ac_compile"
7980case "(($ac_try" in
7981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7982 *) ac_try_echo=$ac_try;;
7983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007987 grep -v '^ *+' conftest.er1 >conftest.err
7988 rm -f conftest.er1
7989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 (exit $ac_status); } && {
7992 test -z "$ac_c_werror_flag" ||
7993 test ! -s conftest.err
7994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_hi=$ac_mid; break
7996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007998sed 's/^/| /' conftest.$ac_ext >&5
7999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 ac_lo=`expr $ac_mid + 1`
8001 if test $ac_lo -le $ac_mid; then
8002 ac_lo= ac_hi=
8003 break
8004 fi
8005 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007
8008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 done
8010else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008012sed 's/^/| /' conftest.$ac_ext >&5
8013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* confdefs.h. */
8016_ACEOF
8017cat confdefs.h >>conftest.$ac_ext
8018cat >>conftest.$ac_ext <<_ACEOF
8019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008021 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008022int
8023main ()
8024{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008026test_array [0] = 0
8027
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033if { (ac_try="$ac_compile"
8034case "(($ac_try" in
8035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8036 *) ac_try_echo=$ac_try;;
8037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041 grep -v '^ *+' conftest.er1 >conftest.err
8042 rm -f conftest.er1
8043 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045 (exit $ac_status); } && {
8046 test -z "$ac_c_werror_flag" ||
8047 test ! -s conftest.err
8048 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_hi=-1 ac_mid=-1
8050 while :; do
8051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008058 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008059int
8060main ()
8061{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008063test_array [0] = 0
8064
8065 ;
8066 return 0;
8067}
8068_ACEOF
8069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070if { (ac_try="$ac_compile"
8071case "(($ac_try" in
8072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8073 *) ac_try_echo=$ac_try;;
8074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008078 grep -v '^ *+' conftest.er1 >conftest.err
8079 rm -f conftest.er1
8080 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 (exit $ac_status); } && {
8083 test -z "$ac_c_werror_flag" ||
8084 test ! -s conftest.err
8085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_lo=$ac_mid; break
8087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008089sed 's/^/| /' conftest.$ac_ext >&5
8090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091 ac_hi=`expr '(' $ac_mid ')' - 1`
8092 if test $ac_mid -le $ac_hi; then
8093 ac_lo= ac_hi=
8094 break
8095 fi
8096 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098
8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 done
8101else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110
8111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008112# Binary search between lo and hi bounds.
8113while test "x$ac_lo" != "x$ac_hi"; do
8114 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008116/* confdefs.h. */
8117_ACEOF
8118cat confdefs.h >>conftest.$ac_ext
8119cat >>conftest.$ac_ext <<_ACEOF
8120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008122 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008127test_array [0] = 0
8128
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134if { (ac_try="$ac_compile"
8135case "(($ac_try" in
8136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8137 *) ac_try_echo=$ac_try;;
8138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008142 grep -v '^ *+' conftest.er1 >conftest.err
8143 rm -f conftest.er1
8144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146 (exit $ac_status); } && {
8147 test -z "$ac_c_werror_flag" ||
8148 test ! -s conftest.err
8149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_hi=$ac_mid
8151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157
8158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008159done
8160case $ac_lo in
8161?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008166See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008167 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168 else
8169 ac_cv_sizeof_long=0
8170 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008171esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008172else
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* confdefs.h. */
8175_ACEOF
8176cat confdefs.h >>conftest.$ac_ext
8177cat >>conftest.$ac_ext <<_ACEOF
8178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008179$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008180 typedef long ac__type_sizeof_;
8181static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8182static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008185int
8186main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008187{
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
8189 FILE *f = fopen ("conftest.val", "w");
8190 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008192 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008197 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 }
8199 else
8200 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208 ;
8209 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008210}
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
8212rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213if { (ac_try="$ac_link"
8214case "(($ac_try" in
8215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8216 *) ac_try_echo=$ac_try;;
8217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 { (case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 (exit $ac_status); }; }; then
8232 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234 echo "$as_me: program exited with status $ac_status" >&5
8235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008243See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008244 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 else
8246 ac_cv_sizeof_long=0
8247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249rm -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 +00008250fi
8251rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008253{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8254echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255
8256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261
8262
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008263{ echo "$as_me:$LINENO: checking for void *" >&5
8264echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8265if test "${ac_cv_type_void_p+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
8267else
8268 cat >conftest.$ac_ext <<_ACEOF
8269/* confdefs.h. */
8270_ACEOF
8271cat confdefs.h >>conftest.$ac_ext
8272cat >>conftest.$ac_ext <<_ACEOF
8273/* end confdefs.h. */
8274$ac_includes_default
8275typedef void * ac__type_new_;
8276int
8277main ()
8278{
8279if ((ac__type_new_ *) 0)
8280 return 0;
8281if (sizeof (ac__type_new_))
8282 return 0;
8283 ;
8284 return 0;
8285}
8286_ACEOF
8287rm -f conftest.$ac_objext
8288if { (ac_try="$ac_compile"
8289case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
8293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8294 (eval "$ac_compile") 2>conftest.er1
8295 ac_status=$?
8296 grep -v '^ *+' conftest.er1 >conftest.err
8297 rm -f conftest.er1
8298 cat conftest.err >&5
8299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8300 (exit $ac_status); } && {
8301 test -z "$ac_c_werror_flag" ||
8302 test ! -s conftest.err
8303 } && test -s conftest.$ac_objext; then
8304 ac_cv_type_void_p=yes
8305else
8306 echo "$as_me: failed program was:" >&5
8307sed 's/^/| /' conftest.$ac_ext >&5
8308
8309 ac_cv_type_void_p=no
8310fi
8311
8312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8313fi
8314{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8315echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008321{ echo "$as_me:$LINENO: checking size of void *" >&5
8322echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008323if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 if test "$cross_compiling" = yes; then
8327 # Depending upon the size, compute the lo and hi bounds.
8328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* confdefs.h. */
8330_ACEOF
8331cat confdefs.h >>conftest.$ac_ext
8332cat >>conftest.$ac_ext <<_ACEOF
8333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008334$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008335 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008336int
8337main ()
8338{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008340test_array [0] = 0
8341
8342 ;
8343 return 0;
8344}
8345_ACEOF
8346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347if { (ac_try="$ac_compile"
8348case "(($ac_try" in
8349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8350 *) ac_try_echo=$ac_try;;
8351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008355 grep -v '^ *+' conftest.er1 >conftest.err
8356 rm -f conftest.er1
8357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359 (exit $ac_status); } && {
8360 test -z "$ac_c_werror_flag" ||
8361 test ! -s conftest.err
8362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_lo=0 ac_mid=0
8364 while :; do
8365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008371$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008372 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008377test_array [0] = 0
8378
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384if { (ac_try="$ac_compile"
8385case "(($ac_try" in
8386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8387 *) ac_try_echo=$ac_try;;
8388esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008392 grep -v '^ *+' conftest.er1 >conftest.err
8393 rm -f conftest.er1
8394 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 (exit $ac_status); } && {
8397 test -z "$ac_c_werror_flag" ||
8398 test ! -s conftest.err
8399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_hi=$ac_mid; break
8401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008403sed 's/^/| /' conftest.$ac_ext >&5
8404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 ac_lo=`expr $ac_mid + 1`
8406 if test $ac_lo -le $ac_mid; then
8407 ac_lo= ac_hi=
8408 break
8409 fi
8410 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412
8413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 done
8415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008417sed 's/^/| /' conftest.$ac_ext >&5
8418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008420/* confdefs.h. */
8421_ACEOF
8422cat confdefs.h >>conftest.$ac_ext
8423cat >>conftest.$ac_ext <<_ACEOF
8424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008425$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008426 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008431test_array [0] = 0
8432
8433 ;
8434 return 0;
8435}
8436_ACEOF
8437rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438if { (ac_try="$ac_compile"
8439case "(($ac_try" in
8440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8441 *) ac_try_echo=$ac_try;;
8442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008446 grep -v '^ *+' conftest.er1 >conftest.err
8447 rm -f conftest.er1
8448 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 (exit $ac_status); } && {
8451 test -z "$ac_c_werror_flag" ||
8452 test ! -s conftest.err
8453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_hi=-1 ac_mid=-1
8455 while :; do
8456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008463 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008483 grep -v '^ *+' conftest.er1 >conftest.err
8484 rm -f conftest.er1
8485 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 (exit $ac_status); } && {
8488 test -z "$ac_c_werror_flag" ||
8489 test ! -s conftest.err
8490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_lo=$ac_mid; break
8492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008494sed 's/^/| /' conftest.$ac_ext >&5
8495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 ac_hi=`expr '(' $ac_mid ')' - 1`
8497 if test $ac_mid -le $ac_hi; then
8498 ac_lo= ac_hi=
8499 break
8500 fi
8501 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 done
8506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008508sed 's/^/| /' conftest.$ac_ext >&5
8509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008517# Binary search between lo and hi bounds.
8518while test "x$ac_lo" != "x$ac_hi"; do
8519 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008521/* confdefs.h. */
8522_ACEOF
8523cat confdefs.h >>conftest.$ac_ext
8524cat >>conftest.$ac_ext <<_ACEOF
8525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008526$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008527 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
8530{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008532test_array [0] = 0
8533
8534 ;
8535 return 0;
8536}
8537_ACEOF
8538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539if { (ac_try="$ac_compile"
8540case "(($ac_try" in
8541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8542 *) ac_try_echo=$ac_try;;
8543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008547 grep -v '^ *+' conftest.er1 >conftest.err
8548 rm -f conftest.er1
8549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 (exit $ac_status); } && {
8552 test -z "$ac_c_werror_flag" ||
8553 test ! -s conftest.err
8554 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_hi=$ac_mid
8556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008558sed 's/^/| /' conftest.$ac_ext >&5
8559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008564done
8565case $ac_lo in
8566?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008571See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008572 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_void_p=0
8575 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008576esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008579/* confdefs.h. */
8580_ACEOF
8581cat confdefs.h >>conftest.$ac_ext
8582cat >>conftest.$ac_ext <<_ACEOF
8583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008584$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008585 typedef void * ac__type_sizeof_;
8586static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8587static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008588#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008590int
8591main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008592{
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
8594 FILE *f = fopen ("conftest.val", "w");
8595 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008597 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008602 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 }
8604 else
8605 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008607 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
8613 ;
8614 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008615}
Martin v. Löwis11437992002-04-12 09:54:03 +00008616_ACEOF
8617rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618if { (ac_try="$ac_link"
8619case "(($ac_try" in
8620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8621 *) ac_try_echo=$ac_try;;
8622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 { (case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 (exit $ac_status); }; }; then
8637 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639 echo "$as_me: program exited with status $ac_status" >&5
8640echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008648See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008649 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_void_p=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654rm -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 +00008655fi
8656rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008657fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008658{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8659echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660
8661
8662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008664#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008666
8667
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008668{ echo "$as_me:$LINENO: checking for short" >&5
8669echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8670if test "${ac_cv_type_short+set}" = set; then
8671 echo $ECHO_N "(cached) $ECHO_C" >&6
8672else
8673 cat >conftest.$ac_ext <<_ACEOF
8674/* confdefs.h. */
8675_ACEOF
8676cat confdefs.h >>conftest.$ac_ext
8677cat >>conftest.$ac_ext <<_ACEOF
8678/* end confdefs.h. */
8679$ac_includes_default
8680typedef short ac__type_new_;
8681int
8682main ()
8683{
8684if ((ac__type_new_ *) 0)
8685 return 0;
8686if (sizeof (ac__type_new_))
8687 return 0;
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
8693if { (ac_try="$ac_compile"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
8698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8699 (eval "$ac_compile") 2>conftest.er1
8700 ac_status=$?
8701 grep -v '^ *+' conftest.er1 >conftest.err
8702 rm -f conftest.er1
8703 cat conftest.err >&5
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); } && {
8706 test -z "$ac_c_werror_flag" ||
8707 test ! -s conftest.err
8708 } && test -s conftest.$ac_objext; then
8709 ac_cv_type_short=yes
8710else
8711 echo "$as_me: failed program was:" >&5
8712sed 's/^/| /' conftest.$ac_ext >&5
8713
8714 ac_cv_type_short=no
8715fi
8716
8717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8718fi
8719{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8720echo "${ECHO_T}$ac_cv_type_short" >&6; }
8721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722# The cast to long int works around a bug in the HP C Compiler
8723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8725# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008726{ echo "$as_me:$LINENO: checking size of short" >&5
8727echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008728if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 if test "$cross_compiling" = yes; then
8732 # Depending upon the size, compute the lo and hi bounds.
8733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* confdefs.h. */
8735_ACEOF
8736cat confdefs.h >>conftest.$ac_ext
8737cat >>conftest.$ac_ext <<_ACEOF
8738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008740 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008745test_array [0] = 0
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752if { (ac_try="$ac_compile"
8753case "(($ac_try" in
8754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8755 *) ac_try_echo=$ac_try;;
8756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008760 grep -v '^ *+' conftest.er1 >conftest.err
8761 rm -f conftest.er1
8762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764 (exit $ac_status); } && {
8765 test -z "$ac_c_werror_flag" ||
8766 test ! -s conftest.err
8767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_lo=0 ac_mid=0
8769 while :; do
8770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* confdefs.h. */
8772_ACEOF
8773cat confdefs.h >>conftest.$ac_ext
8774cat >>conftest.$ac_ext <<_ACEOF
8775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008777 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789if { (ac_try="$ac_compile"
8790case "(($ac_try" in
8791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8792 *) ac_try_echo=$ac_try;;
8793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008797 grep -v '^ *+' conftest.er1 >conftest.err
8798 rm -f conftest.er1
8799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 (exit $ac_status); } && {
8802 test -z "$ac_c_werror_flag" ||
8803 test ! -s conftest.err
8804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_hi=$ac_mid; break
8806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 ac_lo=`expr $ac_mid + 1`
8811 if test $ac_lo -le $ac_mid; then
8812 ac_lo= ac_hi=
8813 break
8814 fi
8815 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
8818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 done
8820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008822sed 's/^/| /' conftest.$ac_ext >&5
8823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008831 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008836test_array [0] = 0
8837
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843if { (ac_try="$ac_compile"
8844case "(($ac_try" in
8845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8846 *) ac_try_echo=$ac_try;;
8847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008851 grep -v '^ *+' conftest.er1 >conftest.err
8852 rm -f conftest.er1
8853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855 (exit $ac_status); } && {
8856 test -z "$ac_c_werror_flag" ||
8857 test ! -s conftest.err
8858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_hi=-1 ac_mid=-1
8860 while :; do
8861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008868 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008873test_array [0] = 0
8874
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880if { (ac_try="$ac_compile"
8881case "(($ac_try" in
8882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883 *) ac_try_echo=$ac_try;;
8884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008888 grep -v '^ *+' conftest.er1 >conftest.err
8889 rm -f conftest.er1
8890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892 (exit $ac_status); } && {
8893 test -z "$ac_c_werror_flag" ||
8894 test ! -s conftest.err
8895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_lo=$ac_mid; break
8897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 ac_hi=`expr '(' $ac_mid ')' - 1`
8902 if test $ac_mid -le $ac_hi; then
8903 ac_lo= ac_hi=
8904 break
8905 fi
8906 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908
8909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 done
8911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920
8921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008922# Binary search between lo and hi bounds.
8923while test "x$ac_lo" != "x$ac_hi"; do
8924 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* confdefs.h. */
8927_ACEOF
8928cat confdefs.h >>conftest.$ac_ext
8929cat >>conftest.$ac_ext <<_ACEOF
8930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008932 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008937test_array [0] = 0
8938
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944if { (ac_try="$ac_compile"
8945case "(($ac_try" in
8946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8947 *) ac_try_echo=$ac_try;;
8948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008952 grep -v '^ *+' conftest.er1 >conftest.err
8953 rm -f conftest.er1
8954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 (exit $ac_status); } && {
8957 test -z "$ac_c_werror_flag" ||
8958 test ! -s conftest.err
8959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_hi=$ac_mid
8961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008963sed 's/^/| /' conftest.$ac_ext >&5
8964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967
8968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008969done
8970case $ac_lo in
8971?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008976See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008977 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978 else
8979 ac_cv_sizeof_short=0
8980 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008990 typedef short ac__type_sizeof_;
8991static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8992static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008995int
8996main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008997{
Martin v. Löwis11437992002-04-12 09:54:03 +00008998
8999 FILE *f = fopen ("conftest.val", "w");
9000 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009002 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009007 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 }
9009 else
9010 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
9018 ;
9019 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009020}
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
9022rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023if { (ac_try="$ac_link"
9024case "(($ac_try" in
9025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9026 *) ac_try_echo=$ac_try;;
9027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 { (case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 (exit $ac_status); }; }; then
9042 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044 echo "$as_me: program exited with status $ac_status" >&5
9045echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009053See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009054 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 else
9056 ac_cv_sizeof_short=0
9057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059rm -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 +00009060fi
9061rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009063{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9064echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065
9066
9067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071
9072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009073{ echo "$as_me:$LINENO: checking for float" >&5
9074echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9075if test "${ac_cv_type_float+set}" = set; then
9076 echo $ECHO_N "(cached) $ECHO_C" >&6
9077else
9078 cat >conftest.$ac_ext <<_ACEOF
9079/* confdefs.h. */
9080_ACEOF
9081cat confdefs.h >>conftest.$ac_ext
9082cat >>conftest.$ac_ext <<_ACEOF
9083/* end confdefs.h. */
9084$ac_includes_default
9085typedef float ac__type_new_;
9086int
9087main ()
9088{
9089if ((ac__type_new_ *) 0)
9090 return 0;
9091if (sizeof (ac__type_new_))
9092 return 0;
9093 ;
9094 return 0;
9095}
9096_ACEOF
9097rm -f conftest.$ac_objext
9098if { (ac_try="$ac_compile"
9099case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
9103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9104 (eval "$ac_compile") 2>conftest.er1
9105 ac_status=$?
9106 grep -v '^ *+' conftest.er1 >conftest.err
9107 rm -f conftest.er1
9108 cat conftest.err >&5
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } && {
9111 test -z "$ac_c_werror_flag" ||
9112 test ! -s conftest.err
9113 } && test -s conftest.$ac_objext; then
9114 ac_cv_type_float=yes
9115else
9116 echo "$as_me: failed program was:" >&5
9117sed 's/^/| /' conftest.$ac_ext >&5
9118
9119 ac_cv_type_float=no
9120fi
9121
9122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123fi
9124{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9125echo "${ECHO_T}$ac_cv_type_float" >&6; }
9126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127# The cast to long int works around a bug in the HP C Compiler
9128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9130# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009131{ echo "$as_me:$LINENO: checking size of float" >&5
9132echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009135else
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 if test "$cross_compiling" = yes; then
9137 # Depending upon the size, compute the lo and hi bounds.
9138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009145 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009150test_array [0] = 0
9151
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157if { (ac_try="$ac_compile"
9158case "(($ac_try" in
9159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9160 *) ac_try_echo=$ac_try;;
9161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009165 grep -v '^ *+' conftest.er1 >conftest.err
9166 rm -f conftest.er1
9167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 (exit $ac_status); } && {
9170 test -z "$ac_c_werror_flag" ||
9171 test ! -s conftest.err
9172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_lo=0 ac_mid=0
9174 while :; do
9175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* confdefs.h. */
9177_ACEOF
9178cat confdefs.h >>conftest.$ac_ext
9179cat >>conftest.$ac_ext <<_ACEOF
9180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009182 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009183int
9184main ()
9185{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009187test_array [0] = 0
9188
9189 ;
9190 return 0;
9191}
9192_ACEOF
9193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194if { (ac_try="$ac_compile"
9195case "(($ac_try" in
9196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9197 *) ac_try_echo=$ac_try;;
9198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 (exit $ac_status); } && {
9207 test -z "$ac_c_werror_flag" ||
9208 test ! -s conftest.err
9209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_hi=$ac_mid; break
9211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009213sed 's/^/| /' conftest.$ac_ext >&5
9214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 ac_lo=`expr $ac_mid + 1`
9216 if test $ac_lo -le $ac_mid; then
9217 ac_lo= ac_hi=
9218 break
9219 fi
9220 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222
9223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 done
9225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009230/* confdefs.h. */
9231_ACEOF
9232cat confdefs.h >>conftest.$ac_ext
9233cat >>conftest.$ac_ext <<_ACEOF
9234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009235$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009236 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009237int
9238main ()
9239{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009241test_array [0] = 0
9242
9243 ;
9244 return 0;
9245}
9246_ACEOF
9247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248if { (ac_try="$ac_compile"
9249case "(($ac_try" in
9250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9251 *) ac_try_echo=$ac_try;;
9252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009256 grep -v '^ *+' conftest.er1 >conftest.err
9257 rm -f conftest.er1
9258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 (exit $ac_status); } && {
9261 test -z "$ac_c_werror_flag" ||
9262 test ! -s conftest.err
9263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 ac_hi=-1 ac_mid=-1
9265 while :; do
9266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009273 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009274int
9275main ()
9276{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009278test_array [0] = 0
9279
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285if { (ac_try="$ac_compile"
9286case "(($ac_try" in
9287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288 *) ac_try_echo=$ac_try;;
9289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009293 grep -v '^ *+' conftest.er1 >conftest.err
9294 rm -f conftest.er1
9295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009297 (exit $ac_status); } && {
9298 test -z "$ac_c_werror_flag" ||
9299 test ! -s conftest.err
9300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_lo=$ac_mid; break
9302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009304sed 's/^/| /' conftest.$ac_ext >&5
9305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 ac_hi=`expr '(' $ac_mid ')' - 1`
9307 if test $ac_mid -le $ac_hi; then
9308 ac_lo= ac_hi=
9309 break
9310 fi
9311 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313
9314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 done
9316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009318sed 's/^/| /' conftest.$ac_ext >&5
9319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325
9326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009327# Binary search between lo and hi bounds.
9328while test "x$ac_lo" != "x$ac_hi"; do
9329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009331/* confdefs.h. */
9332_ACEOF
9333cat confdefs.h >>conftest.$ac_ext
9334cat >>conftest.$ac_ext <<_ACEOF
9335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009337 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009338int
9339main ()
9340{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009342test_array [0] = 0
9343
9344 ;
9345 return 0;
9346}
9347_ACEOF
9348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349if { (ac_try="$ac_compile"
9350case "(($ac_try" in
9351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9352 *) ac_try_echo=$ac_try;;
9353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009357 grep -v '^ *+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361 (exit $ac_status); } && {
9362 test -z "$ac_c_werror_flag" ||
9363 test ! -s conftest.err
9364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_hi=$ac_mid
9366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009368sed 's/^/| /' conftest.$ac_ext >&5
9369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372
9373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009374done
9375case $ac_lo in
9376?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009381See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009382 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383 else
9384 ac_cv_sizeof_float=0
9385 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009387else
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009395 typedef float ac__type_sizeof_;
9396static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9397static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009398#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009402{
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
9404 FILE *f = fopen ("conftest.val", "w");
9405 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009407 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009412 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 }
9414 else
9415 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009417 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
9423 ;
9424 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009425}
Martin v. Löwis11437992002-04-12 09:54:03 +00009426_ACEOF
9427rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428if { (ac_try="$ac_link"
9429case "(($ac_try" in
9430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9431 *) ac_try_echo=$ac_try;;
9432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 { (case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 (exit $ac_status); }; }; then
9447 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449 echo "$as_me: program exited with status $ac_status" >&5
9450echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009458See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009459 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 else
9461 ac_cv_sizeof_float=0
9462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464rm -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 +00009465fi
9466rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009468{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9469echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470
9471
9472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476
9477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009478{ echo "$as_me:$LINENO: checking for double" >&5
9479echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9480if test "${ac_cv_type_double+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482else
9483 cat >conftest.$ac_ext <<_ACEOF
9484/* confdefs.h. */
9485_ACEOF
9486cat confdefs.h >>conftest.$ac_ext
9487cat >>conftest.$ac_ext <<_ACEOF
9488/* end confdefs.h. */
9489$ac_includes_default
9490typedef double ac__type_new_;
9491int
9492main ()
9493{
9494if ((ac__type_new_ *) 0)
9495 return 0;
9496if (sizeof (ac__type_new_))
9497 return 0;
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502rm -f conftest.$ac_objext
9503if { (ac_try="$ac_compile"
9504case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
9508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9509 (eval "$ac_compile") 2>conftest.er1
9510 ac_status=$?
9511 grep -v '^ *+' conftest.er1 >conftest.err
9512 rm -f conftest.er1
9513 cat conftest.err >&5
9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9515 (exit $ac_status); } && {
9516 test -z "$ac_c_werror_flag" ||
9517 test ! -s conftest.err
9518 } && test -s conftest.$ac_objext; then
9519 ac_cv_type_double=yes
9520else
9521 echo "$as_me: failed program was:" >&5
9522sed 's/^/| /' conftest.$ac_ext >&5
9523
9524 ac_cv_type_double=no
9525fi
9526
9527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9528fi
9529{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9530echo "${ECHO_T}$ac_cv_type_double" >&6; }
9531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532# The cast to long int works around a bug in the HP C Compiler
9533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9535# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009536{ echo "$as_me:$LINENO: checking size of double" >&5
9537echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009538if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009539 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 if test "$cross_compiling" = yes; then
9542 # Depending upon the size, compute the lo and hi bounds.
9543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009550 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551int
9552main ()
9553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009555test_array [0] = 0
9556
9557 ;
9558 return 0;
9559}
9560_ACEOF
9561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562if { (ac_try="$ac_compile"
9563case "(($ac_try" in
9564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9565 *) ac_try_echo=$ac_try;;
9566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009570 grep -v '^ *+' conftest.er1 >conftest.err
9571 rm -f conftest.er1
9572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 (exit $ac_status); } && {
9575 test -z "$ac_c_werror_flag" ||
9576 test ! -s conftest.err
9577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_lo=0 ac_mid=0
9579 while :; do
9580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* confdefs.h. */
9582_ACEOF
9583cat confdefs.h >>conftest.$ac_ext
9584cat >>conftest.$ac_ext <<_ACEOF
9585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009586$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009587 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009588int
9589main ()
9590{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009592test_array [0] = 0
9593
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599if { (ac_try="$ac_compile"
9600case "(($ac_try" in
9601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9602 *) ac_try_echo=$ac_try;;
9603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009607 grep -v '^ *+' conftest.er1 >conftest.err
9608 rm -f conftest.er1
9609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 (exit $ac_status); } && {
9612 test -z "$ac_c_werror_flag" ||
9613 test ! -s conftest.err
9614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_hi=$ac_mid; break
9616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009618sed 's/^/| /' conftest.$ac_ext >&5
9619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 ac_lo=`expr $ac_mid + 1`
9621 if test $ac_lo -le $ac_mid; then
9622 ac_lo= ac_hi=
9623 break
9624 fi
9625 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627
9628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 done
9630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009632sed 's/^/| /' conftest.$ac_ext >&5
9633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009641 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009642int
9643main ()
9644{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009646test_array [0] = 0
9647
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653if { (ac_try="$ac_compile"
9654case "(($ac_try" in
9655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9656 *) ac_try_echo=$ac_try;;
9657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009661 grep -v '^ *+' conftest.er1 >conftest.err
9662 rm -f conftest.er1
9663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665 (exit $ac_status); } && {
9666 test -z "$ac_c_werror_flag" ||
9667 test ! -s conftest.err
9668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_hi=-1 ac_mid=-1
9670 while :; do
9671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009678 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009679int
9680main ()
9681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009683test_array [0] = 0
9684
9685 ;
9686 return 0;
9687}
9688_ACEOF
9689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690if { (ac_try="$ac_compile"
9691case "(($ac_try" in
9692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9693 *) ac_try_echo=$ac_try;;
9694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009698 grep -v '^ *+' conftest.er1 >conftest.err
9699 rm -f conftest.er1
9700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702 (exit $ac_status); } && {
9703 test -z "$ac_c_werror_flag" ||
9704 test ! -s conftest.err
9705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_lo=$ac_mid; break
9707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009709sed 's/^/| /' conftest.$ac_ext >&5
9710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 ac_hi=`expr '(' $ac_mid ')' - 1`
9712 if test $ac_mid -le $ac_hi; then
9713 ac_lo= ac_hi=
9714 break
9715 fi
9716 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718
9719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 done
9721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009723sed 's/^/| /' conftest.$ac_ext >&5
9724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730
9731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009732# Binary search between lo and hi bounds.
9733while test "x$ac_lo" != "x$ac_hi"; do
9734 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* confdefs.h. */
9737_ACEOF
9738cat confdefs.h >>conftest.$ac_ext
9739cat >>conftest.$ac_ext <<_ACEOF
9740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009742 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009747test_array [0] = 0
9748
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754if { (ac_try="$ac_compile"
9755case "(($ac_try" in
9756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9757 *) ac_try_echo=$ac_try;;
9758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009762 grep -v '^ *+' conftest.er1 >conftest.err
9763 rm -f conftest.er1
9764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766 (exit $ac_status); } && {
9767 test -z "$ac_c_werror_flag" ||
9768 test ! -s conftest.err
9769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_hi=$ac_mid
9771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009773sed 's/^/| /' conftest.$ac_ext >&5
9774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777
9778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009779done
9780case $ac_lo in
9781?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009786See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009787 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788 else
9789 ac_cv_sizeof_double=0
9790 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009791esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* confdefs.h. */
9795_ACEOF
9796cat confdefs.h >>conftest.$ac_ext
9797cat >>conftest.$ac_ext <<_ACEOF
9798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009800 typedef double ac__type_sizeof_;
9801static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9802static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009807{
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
9809 FILE *f = fopen ("conftest.val", "w");
9810 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009812 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009817 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 }
9819 else
9820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
9828 ;
9829 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009830}
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
9832rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833if { (ac_try="$ac_link"
9834case "(($ac_try" in
9835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9836 *) ac_try_echo=$ac_try;;
9837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 { (case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 (exit $ac_status); }; }; then
9852 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854 echo "$as_me: program exited with status $ac_status" >&5
9855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwis11437992002-04-12 09:54:03 +00009858( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009863See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009864 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 else
9866 ac_cv_sizeof_double=0
9867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869rm -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 +00009870fi
9871rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009873{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9874echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875
9876
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881
9882
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009883{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9884echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9885if test "${ac_cv_type_fpos_t+set}" = set; then
9886 echo $ECHO_N "(cached) $ECHO_C" >&6
9887else
9888 cat >conftest.$ac_ext <<_ACEOF
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
9894$ac_includes_default
9895typedef fpos_t ac__type_new_;
9896int
9897main ()
9898{
9899if ((ac__type_new_ *) 0)
9900 return 0;
9901if (sizeof (ac__type_new_))
9902 return 0;
9903 ;
9904 return 0;
9905}
9906_ACEOF
9907rm -f conftest.$ac_objext
9908if { (ac_try="$ac_compile"
9909case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
9913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9914 (eval "$ac_compile") 2>conftest.er1
9915 ac_status=$?
9916 grep -v '^ *+' conftest.er1 >conftest.err
9917 rm -f conftest.er1
9918 cat conftest.err >&5
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } && {
9921 test -z "$ac_c_werror_flag" ||
9922 test ! -s conftest.err
9923 } && test -s conftest.$ac_objext; then
9924 ac_cv_type_fpos_t=yes
9925else
9926 echo "$as_me: failed program was:" >&5
9927sed 's/^/| /' conftest.$ac_ext >&5
9928
9929 ac_cv_type_fpos_t=no
9930fi
9931
9932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9933fi
9934{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9935echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937# The cast to long int works around a bug in the HP C Compiler
9938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9940# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009941{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9942echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009943if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009944 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009945else
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 if test "$cross_compiling" = yes; then
9947 # Depending upon the size, compute the lo and hi bounds.
9948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* confdefs.h. */
9950_ACEOF
9951cat confdefs.h >>conftest.$ac_ext
9952cat >>conftest.$ac_ext <<_ACEOF
9953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009955 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009956int
9957main ()
9958{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009960test_array [0] = 0
9961
9962 ;
9963 return 0;
9964}
9965_ACEOF
9966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967if { (ac_try="$ac_compile"
9968case "(($ac_try" in
9969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9970 *) ac_try_echo=$ac_try;;
9971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009975 grep -v '^ *+' conftest.er1 >conftest.err
9976 rm -f conftest.er1
9977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979 (exit $ac_status); } && {
9980 test -z "$ac_c_werror_flag" ||
9981 test ! -s conftest.err
9982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_lo=0 ac_mid=0
9984 while :; do
9985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* confdefs.h. */
9987_ACEOF
9988cat confdefs.h >>conftest.$ac_ext
9989cat >>conftest.$ac_ext <<_ACEOF
9990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009991$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009992 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009993int
9994main ()
9995{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009997test_array [0] = 0
9998
9999 ;
10000 return 0;
10001}
10002_ACEOF
10003rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004if { (ac_try="$ac_compile"
10005case "(($ac_try" in
10006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10007 *) ac_try_echo=$ac_try;;
10008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010012 grep -v '^ *+' conftest.er1 >conftest.err
10013 rm -f conftest.er1
10014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016 (exit $ac_status); } && {
10017 test -z "$ac_c_werror_flag" ||
10018 test ! -s conftest.err
10019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_hi=$ac_mid; break
10021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010023sed 's/^/| /' conftest.$ac_ext >&5
10024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 ac_lo=`expr $ac_mid + 1`
10026 if test $ac_lo -le $ac_mid; then
10027 ac_lo= ac_hi=
10028 break
10029 fi
10030 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032
10033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 done
10035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010037sed 's/^/| /' conftest.$ac_ext >&5
10038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010045$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010046 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010047int
10048main ()
10049{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010051test_array [0] = 0
10052
10053 ;
10054 return 0;
10055}
10056_ACEOF
10057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058if { (ac_try="$ac_compile"
10059case "(($ac_try" in
10060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10061 *) ac_try_echo=$ac_try;;
10062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010066 grep -v '^ *+' conftest.er1 >conftest.err
10067 rm -f conftest.er1
10068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 (exit $ac_status); } && {
10071 test -z "$ac_c_werror_flag" ||
10072 test ! -s conftest.err
10073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_hi=-1 ac_mid=-1
10075 while :; do
10076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010083 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010084int
10085main ()
10086{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010088test_array [0] = 0
10089
10090 ;
10091 return 0;
10092}
10093_ACEOF
10094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095if { (ac_try="$ac_compile"
10096case "(($ac_try" in
10097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10098 *) ac_try_echo=$ac_try;;
10099esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010103 grep -v '^ *+' conftest.er1 >conftest.err
10104 rm -f conftest.er1
10105 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107 (exit $ac_status); } && {
10108 test -z "$ac_c_werror_flag" ||
10109 test ! -s conftest.err
10110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_lo=$ac_mid; break
10112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010114sed 's/^/| /' conftest.$ac_ext >&5
10115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 ac_hi=`expr '(' $ac_mid ')' - 1`
10117 if test $ac_mid -le $ac_hi; then
10118 ac_lo= ac_hi=
10119 break
10120 fi
10121 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123
10124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 done
10126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010128sed 's/^/| /' conftest.$ac_ext >&5
10129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135
10136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010137# Binary search between lo and hi bounds.
10138while test "x$ac_lo" != "x$ac_hi"; do
10139 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* confdefs.h. */
10142_ACEOF
10143cat confdefs.h >>conftest.$ac_ext
10144cat >>conftest.$ac_ext <<_ACEOF
10145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010147 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010152test_array [0] = 0
10153
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159if { (ac_try="$ac_compile"
10160case "(($ac_try" in
10161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10162 *) ac_try_echo=$ac_try;;
10163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010167 grep -v '^ *+' conftest.er1 >conftest.err
10168 rm -f conftest.er1
10169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 (exit $ac_status); } && {
10172 test -z "$ac_c_werror_flag" ||
10173 test ! -s conftest.err
10174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_hi=$ac_mid
10176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010178sed 's/^/| /' conftest.$ac_ext >&5
10179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182
10183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010184done
10185case $ac_lo in
10186?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010189See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010191See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010192 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193 else
10194 ac_cv_sizeof_fpos_t=0
10195 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010196esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010197else
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* confdefs.h. */
10200_ACEOF
10201cat confdefs.h >>conftest.$ac_ext
10202cat >>conftest.$ac_ext <<_ACEOF
10203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010205 typedef fpos_t ac__type_sizeof_;
10206static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10207static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010210int
10211main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010212{
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
10214 FILE *f = fopen ("conftest.val", "w");
10215 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010217 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010222 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 }
10224 else
10225 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232
10233 ;
10234 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010235}
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
10237rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238if { (ac_try="$ac_link"
10239case "(($ac_try" in
10240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10241 *) ac_try_echo=$ac_try;;
10242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 { (case "(($ac_try" in
10249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10250 *) ac_try_echo=$ac_try;;
10251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 (exit $ac_status); }; }; then
10257 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259 echo "$as_me: program exited with status $ac_status" >&5
10260echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwis11437992002-04-12 09:54:03 +000010263( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010268See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010269 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 else
10271 ac_cv_sizeof_fpos_t=0
10272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274rm -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 +000010275fi
10276rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010278{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10279echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280
10281
10282
Martin v. Löwis11437992002-04-12 09:54:03 +000010283cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286
Michael W. Hudson54241132001-12-07 15:38:26 +000010287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010288{ echo "$as_me:$LINENO: checking for size_t" >&5
10289echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10290if test "${ac_cv_type_size_t+set}" = set; then
10291 echo $ECHO_N "(cached) $ECHO_C" >&6
10292else
10293 cat >conftest.$ac_ext <<_ACEOF
10294/* confdefs.h. */
10295_ACEOF
10296cat confdefs.h >>conftest.$ac_ext
10297cat >>conftest.$ac_ext <<_ACEOF
10298/* end confdefs.h. */
10299$ac_includes_default
10300typedef size_t ac__type_new_;
10301int
10302main ()
10303{
10304if ((ac__type_new_ *) 0)
10305 return 0;
10306if (sizeof (ac__type_new_))
10307 return 0;
10308 ;
10309 return 0;
10310}
10311_ACEOF
10312rm -f conftest.$ac_objext
10313if { (ac_try="$ac_compile"
10314case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
10318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10319 (eval "$ac_compile") 2>conftest.er1
10320 ac_status=$?
10321 grep -v '^ *+' conftest.er1 >conftest.err
10322 rm -f conftest.er1
10323 cat conftest.err >&5
10324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10325 (exit $ac_status); } && {
10326 test -z "$ac_c_werror_flag" ||
10327 test ! -s conftest.err
10328 } && test -s conftest.$ac_objext; then
10329 ac_cv_type_size_t=yes
10330else
10331 echo "$as_me: failed program was:" >&5
10332sed 's/^/| /' conftest.$ac_ext >&5
10333
10334 ac_cv_type_size_t=no
10335fi
10336
10337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10338fi
10339{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10340echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342# The cast to long int works around a bug in the HP C Compiler
10343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10345# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010346{ echo "$as_me:$LINENO: checking size of size_t" >&5
10347echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010349 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010351 if test "$cross_compiling" = yes; then
10352 # Depending upon the size, compute the lo and hi bounds.
10353cat >conftest.$ac_ext <<_ACEOF
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
10359$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010360 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361int
10362main ()
10363{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010365test_array [0] = 0
10366
10367 ;
10368 return 0;
10369}
10370_ACEOF
10371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372if { (ac_try="$ac_compile"
10373case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010379 ac_status=$?
10380 grep -v '^ *+' conftest.er1 >conftest.err
10381 rm -f conftest.er1
10382 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384 (exit $ac_status); } && {
10385 test -z "$ac_c_werror_flag" ||
10386 test ! -s conftest.err
10387 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010388 ac_lo=0 ac_mid=0
10389 while :; do
10390 cat >conftest.$ac_ext <<_ACEOF
10391/* confdefs.h. */
10392_ACEOF
10393cat confdefs.h >>conftest.$ac_ext
10394cat >>conftest.$ac_ext <<_ACEOF
10395/* end confdefs.h. */
10396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010397 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010398int
10399main ()
10400{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010402test_array [0] = 0
10403
10404 ;
10405 return 0;
10406}
10407_ACEOF
10408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409if { (ac_try="$ac_compile"
10410case "(($ac_try" in
10411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10412 *) ac_try_echo=$ac_try;;
10413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416 ac_status=$?
10417 grep -v '^ *+' conftest.er1 >conftest.err
10418 rm -f conftest.er1
10419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421 (exit $ac_status); } && {
10422 test -z "$ac_c_werror_flag" ||
10423 test ! -s conftest.err
10424 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 ac_hi=$ac_mid; break
10426else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010427 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010428sed 's/^/| /' conftest.$ac_ext >&5
10429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 ac_lo=`expr $ac_mid + 1`
10431 if test $ac_lo -le $ac_mid; then
10432 ac_lo= ac_hi=
10433 break
10434 fi
10435 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437
10438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439 done
10440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010441 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010442sed 's/^/| /' conftest.$ac_ext >&5
10443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
10450$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010451 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452int
10453main ()
10454{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456test_array [0] = 0
10457
10458 ;
10459 return 0;
10460}
10461_ACEOF
10462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463if { (ac_try="$ac_compile"
10464case "(($ac_try" in
10465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10466 *) ac_try_echo=$ac_try;;
10467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470 ac_status=$?
10471 grep -v '^ *+' conftest.er1 >conftest.err
10472 rm -f conftest.er1
10473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475 (exit $ac_status); } && {
10476 test -z "$ac_c_werror_flag" ||
10477 test ! -s conftest.err
10478 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010479 ac_hi=-1 ac_mid=-1
10480 while :; do
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010488 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489int
10490main ()
10491{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010493test_array [0] = 0
10494
10495 ;
10496 return 0;
10497}
10498_ACEOF
10499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500if { (ac_try="$ac_compile"
10501case "(($ac_try" in
10502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10503 *) ac_try_echo=$ac_try;;
10504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507 ac_status=$?
10508 grep -v '^ *+' conftest.er1 >conftest.err
10509 rm -f conftest.er1
10510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512 (exit $ac_status); } && {
10513 test -z "$ac_c_werror_flag" ||
10514 test ! -s conftest.err
10515 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 ac_lo=$ac_mid; break
10517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010518 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 ac_hi=`expr '(' $ac_mid ')' - 1`
10522 if test $ac_mid -le $ac_hi; then
10523 ac_lo= ac_hi=
10524 break
10525 fi
10526 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528
10529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 done
10531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010532 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533sed 's/^/| /' conftest.$ac_ext >&5
10534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540
10541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010542# Binary search between lo and hi bounds.
10543while test "x$ac_lo" != "x$ac_hi"; do
10544 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10545 cat >conftest.$ac_ext <<_ACEOF
10546/* confdefs.h. */
10547_ACEOF
10548cat confdefs.h >>conftest.$ac_ext
10549cat >>conftest.$ac_ext <<_ACEOF
10550/* end confdefs.h. */
10551$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010552 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553int
10554main ()
10555{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557test_array [0] = 0
10558
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564if { (ac_try="$ac_compile"
10565case "(($ac_try" in
10566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10567 *) ac_try_echo=$ac_try;;
10568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571 ac_status=$?
10572 grep -v '^ *+' conftest.er1 >conftest.err
10573 rm -f conftest.er1
10574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576 (exit $ac_status); } && {
10577 test -z "$ac_c_werror_flag" ||
10578 test ! -s conftest.err
10579 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_hi=$ac_mid
10581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010582 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583sed 's/^/| /' conftest.$ac_ext >&5
10584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587
10588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589done
10590case $ac_lo in
10591?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010597 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598 else
10599 ac_cv_sizeof_size_t=0
10600 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601esac
10602else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 cat >conftest.$ac_ext <<_ACEOF
10604/* confdefs.h. */
10605_ACEOF
10606cat confdefs.h >>conftest.$ac_ext
10607cat >>conftest.$ac_ext <<_ACEOF
10608/* end confdefs.h. */
10609$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010610 typedef size_t ac__type_sizeof_;
10611static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10612static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613#include <stdio.h>
10614#include <stdlib.h>
10615int
10616main ()
10617{
10618
10619 FILE *f = fopen ("conftest.val", "w");
10620 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010622 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010627 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628 }
10629 else
10630 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643if { (ac_try="$ac_link"
10644case "(($ac_try" in
10645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10646 *) ac_try_echo=$ac_try;;
10647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 { (case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 (exit $ac_status); }; }; then
10662 ac_cv_sizeof_size_t=`cat conftest.val`
10663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664 echo "$as_me: program exited with status $ac_status" >&5
10665echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
10668( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010674 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 else
10676 ac_cv_sizeof_size_t=0
10677 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679rm -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 +000010680fi
10681rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010683{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10684echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685
10686
10687
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688cat >>confdefs.h <<_ACEOF
10689#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10690_ACEOF
10691
10692
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010693{ echo "$as_me:$LINENO: checking for pid_t" >&5
10694echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10695if test "${ac_cv_type_pid_t+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
10697else
10698 cat >conftest.$ac_ext <<_ACEOF
10699/* confdefs.h. */
10700_ACEOF
10701cat confdefs.h >>conftest.$ac_ext
10702cat >>conftest.$ac_ext <<_ACEOF
10703/* end confdefs.h. */
10704$ac_includes_default
10705typedef pid_t ac__type_new_;
10706int
10707main ()
10708{
10709if ((ac__type_new_ *) 0)
10710 return 0;
10711if (sizeof (ac__type_new_))
10712 return 0;
10713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext
10718if { (ac_try="$ac_compile"
10719case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
10723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10724 (eval "$ac_compile") 2>conftest.er1
10725 ac_status=$?
10726 grep -v '^ *+' conftest.er1 >conftest.err
10727 rm -f conftest.er1
10728 cat conftest.err >&5
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } && {
10731 test -z "$ac_c_werror_flag" ||
10732 test ! -s conftest.err
10733 } && test -s conftest.$ac_objext; then
10734 ac_cv_type_pid_t=yes
10735else
10736 echo "$as_me: failed program was:" >&5
10737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739 ac_cv_type_pid_t=no
10740fi
10741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743fi
10744{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10745echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10746
Christian Heimes400adb02008-02-01 08:12:03 +000010747# The cast to long int works around a bug in the HP C Compiler
10748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10750# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010751{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10752echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010753if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010754 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010755else
10756 if test "$cross_compiling" = yes; then
10757 # Depending upon the size, compute the lo and hi bounds.
10758cat >conftest.$ac_ext <<_ACEOF
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
10764$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010765 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010766int
10767main ()
10768{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010770test_array [0] = 0
10771
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext
10777if { (ac_try="$ac_compile"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010783 (eval "$ac_compile") 2>conftest.er1
10784 ac_status=$?
10785 grep -v '^ *+' conftest.er1 >conftest.err
10786 rm -f conftest.er1
10787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010789 (exit $ac_status); } && {
10790 test -z "$ac_c_werror_flag" ||
10791 test ! -s conftest.err
10792 } && test -s conftest.$ac_objext; then
10793 ac_lo=0 ac_mid=0
10794 while :; do
10795 cat >conftest.$ac_ext <<_ACEOF
10796/* confdefs.h. */
10797_ACEOF
10798cat confdefs.h >>conftest.$ac_ext
10799cat >>conftest.$ac_ext <<_ACEOF
10800/* end confdefs.h. */
10801$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010802 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010803int
10804main ()
10805{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010807test_array [0] = 0
10808
10809 ;
10810 return 0;
10811}
10812_ACEOF
10813rm -f conftest.$ac_objext
10814if { (ac_try="$ac_compile"
10815case "(($ac_try" in
10816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10817 *) ac_try_echo=$ac_try;;
10818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010820 (eval "$ac_compile") 2>conftest.er1
10821 ac_status=$?
10822 grep -v '^ *+' conftest.er1 >conftest.err
10823 rm -f conftest.er1
10824 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010826 (exit $ac_status); } && {
10827 test -z "$ac_c_werror_flag" ||
10828 test ! -s conftest.err
10829 } && test -s conftest.$ac_objext; then
10830 ac_hi=$ac_mid; break
10831else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010832 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010833sed 's/^/| /' conftest.$ac_ext >&5
10834
10835 ac_lo=`expr $ac_mid + 1`
10836 if test $ac_lo -le $ac_mid; then
10837 ac_lo= ac_hi=
10838 break
10839 fi
10840 ac_mid=`expr 2 '*' $ac_mid + 1`
10841fi
10842
10843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844 done
10845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010846 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010847sed 's/^/| /' conftest.$ac_ext >&5
10848
10849 cat >conftest.$ac_ext <<_ACEOF
10850/* confdefs.h. */
10851_ACEOF
10852cat confdefs.h >>conftest.$ac_ext
10853cat >>conftest.$ac_ext <<_ACEOF
10854/* end confdefs.h. */
10855$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010856 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010857int
10858main ()
10859{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010861test_array [0] = 0
10862
10863 ;
10864 return 0;
10865}
10866_ACEOF
10867rm -f conftest.$ac_objext
10868if { (ac_try="$ac_compile"
10869case "(($ac_try" in
10870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10871 *) ac_try_echo=$ac_try;;
10872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010874 (eval "$ac_compile") 2>conftest.er1
10875 ac_status=$?
10876 grep -v '^ *+' conftest.er1 >conftest.err
10877 rm -f conftest.er1
10878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010880 (exit $ac_status); } && {
10881 test -z "$ac_c_werror_flag" ||
10882 test ! -s conftest.err
10883 } && test -s conftest.$ac_objext; then
10884 ac_hi=-1 ac_mid=-1
10885 while :; do
10886 cat >conftest.$ac_ext <<_ACEOF
10887/* confdefs.h. */
10888_ACEOF
10889cat confdefs.h >>conftest.$ac_ext
10890cat >>conftest.$ac_ext <<_ACEOF
10891/* end confdefs.h. */
10892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010893 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010894int
10895main ()
10896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010898test_array [0] = 0
10899
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904rm -f conftest.$ac_objext
10905if { (ac_try="$ac_compile"
10906case "(($ac_try" in
10907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10908 *) ac_try_echo=$ac_try;;
10909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010911 (eval "$ac_compile") 2>conftest.er1
10912 ac_status=$?
10913 grep -v '^ *+' conftest.er1 >conftest.err
10914 rm -f conftest.er1
10915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010917 (exit $ac_status); } && {
10918 test -z "$ac_c_werror_flag" ||
10919 test ! -s conftest.err
10920 } && test -s conftest.$ac_objext; then
10921 ac_lo=$ac_mid; break
10922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010923 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924sed 's/^/| /' conftest.$ac_ext >&5
10925
10926 ac_hi=`expr '(' $ac_mid ')' - 1`
10927 if test $ac_mid -le $ac_hi; then
10928 ac_lo= ac_hi=
10929 break
10930 fi
10931 ac_mid=`expr 2 '*' $ac_mid`
10932fi
10933
10934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10935 done
10936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010937 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010938sed 's/^/| /' conftest.$ac_ext >&5
10939
10940 ac_lo= ac_hi=
10941fi
10942
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944fi
10945
10946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947# Binary search between lo and hi bounds.
10948while test "x$ac_lo" != "x$ac_hi"; do
10949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10950 cat >conftest.$ac_ext <<_ACEOF
10951/* confdefs.h. */
10952_ACEOF
10953cat confdefs.h >>conftest.$ac_ext
10954cat >>conftest.$ac_ext <<_ACEOF
10955/* end confdefs.h. */
10956$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010957 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010958int
10959main ()
10960{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010962test_array [0] = 0
10963
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968rm -f conftest.$ac_objext
10969if { (ac_try="$ac_compile"
10970case "(($ac_try" in
10971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10972 *) ac_try_echo=$ac_try;;
10973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010975 (eval "$ac_compile") 2>conftest.er1
10976 ac_status=$?
10977 grep -v '^ *+' conftest.er1 >conftest.err
10978 rm -f conftest.er1
10979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010981 (exit $ac_status); } && {
10982 test -z "$ac_c_werror_flag" ||
10983 test ! -s conftest.err
10984 } && test -s conftest.$ac_objext; then
10985 ac_hi=$ac_mid
10986else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010987 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010988sed 's/^/| /' conftest.$ac_ext >&5
10989
10990 ac_lo=`expr '(' $ac_mid ')' + 1`
10991fi
10992
10993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10994done
10995case $ac_lo in
10996?*) ac_cv_sizeof_pid_t=$ac_lo;;
10997'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010999See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011001See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011002 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011003 else
11004 ac_cv_sizeof_pid_t=0
11005 fi ;;
11006esac
11007else
11008 cat >conftest.$ac_ext <<_ACEOF
11009/* confdefs.h. */
11010_ACEOF
11011cat confdefs.h >>conftest.$ac_ext
11012cat >>conftest.$ac_ext <<_ACEOF
11013/* end confdefs.h. */
11014$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011015 typedef pid_t ac__type_sizeof_;
11016static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11017static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011018#include <stdio.h>
11019#include <stdlib.h>
11020int
11021main ()
11022{
11023
11024 FILE *f = fopen ("conftest.val", "w");
11025 if (! f)
11026 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011027 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011028 {
11029 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011031 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011032 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011033 }
11034 else
11035 {
11036 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011038 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011040 }
11041 return ferror (f) || fclose (f) != 0;
11042
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047rm -f conftest$ac_exeext
11048if { (ac_try="$ac_link"
11049case "(($ac_try" in
11050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11051 *) ac_try_echo=$ac_try;;
11052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011054 (eval "$ac_link") 2>&5
11055 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11058 { (case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011063 (eval "$ac_try") 2>&5
11064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011066 (exit $ac_status); }; }; then
11067 ac_cv_sizeof_pid_t=`cat conftest.val`
11068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069 echo "$as_me: program exited with status $ac_status" >&5
11070echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073( exit $ac_status )
11074if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011076See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011078See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011079 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011080 else
11081 ac_cv_sizeof_pid_t=0
11082 fi
11083fi
11084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11085fi
11086rm -f conftest.val
11087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011088{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11089echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011090
11091
11092
11093cat >>confdefs.h <<_ACEOF
11094#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11095_ACEOF
11096
11097
Michael W. Hudson54241132001-12-07 15:38:26 +000011098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099{ echo "$as_me:$LINENO: checking for long long support" >&5
11100echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011101have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* confdefs.h. */
11104_ACEOF
11105cat confdefs.h >>conftest.$ac_ext
11106cat >>conftest.$ac_ext <<_ACEOF
11107/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108
Martin v. Löwis11437992002-04-12 09:54:03 +000011109int
11110main ()
11111{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
11117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118if { (ac_try="$ac_compile"
11119case "(($ac_try" in
11120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11121 *) ac_try_echo=$ac_try;;
11122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011126 grep -v '^ *+' conftest.er1 >conftest.err
11127 rm -f conftest.er1
11128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130 (exit $ac_status); } && {
11131 test -z "$ac_c_werror_flag" ||
11132 test ! -s conftest.err
11133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
11135
11136cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011137#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
11139
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011140 have_long_long=yes
11141
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011144sed 's/^/| /' conftest.$ac_ext >&5
11145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148
11149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011150{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11151echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011152if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153{ echo "$as_me:$LINENO: checking for long long" >&5
11154echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11155if test "${ac_cv_type_long_long+set}" = set; then
11156 echo $ECHO_N "(cached) $ECHO_C" >&6
11157else
11158 cat >conftest.$ac_ext <<_ACEOF
11159/* confdefs.h. */
11160_ACEOF
11161cat confdefs.h >>conftest.$ac_ext
11162cat >>conftest.$ac_ext <<_ACEOF
11163/* end confdefs.h. */
11164$ac_includes_default
11165typedef long long ac__type_new_;
11166int
11167main ()
11168{
11169if ((ac__type_new_ *) 0)
11170 return 0;
11171if (sizeof (ac__type_new_))
11172 return 0;
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
11178if { (ac_try="$ac_compile"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_compile") 2>conftest.er1
11185 ac_status=$?
11186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest.$ac_objext; then
11194 ac_cv_type_long_long=yes
11195else
11196 echo "$as_me: failed program was:" >&5
11197sed 's/^/| /' conftest.$ac_ext >&5
11198
11199 ac_cv_type_long_long=no
11200fi
11201
11202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11203fi
11204{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11205echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207# The cast to long int works around a bug in the HP C Compiler
11208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11210# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011211{ echo "$as_me:$LINENO: checking size of long long" >&5
11212echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011213if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 if test "$cross_compiling" = yes; then
11217 # Depending upon the size, compute the lo and hi bounds.
11218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011225 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011230test_array [0] = 0
11231
11232 ;
11233 return 0;
11234}
11235_ACEOF
11236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237if { (ac_try="$ac_compile"
11238case "(($ac_try" in
11239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11240 *) ac_try_echo=$ac_try;;
11241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011245 grep -v '^ *+' conftest.er1 >conftest.err
11246 rm -f conftest.er1
11247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249 (exit $ac_status); } && {
11250 test -z "$ac_c_werror_flag" ||
11251 test ! -s conftest.err
11252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_lo=0 ac_mid=0
11254 while :; do
11255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* confdefs.h. */
11257_ACEOF
11258cat confdefs.h >>conftest.$ac_ext
11259cat >>conftest.$ac_ext <<_ACEOF
11260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011262 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011267test_array [0] = 0
11268
11269 ;
11270 return 0;
11271}
11272_ACEOF
11273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274if { (ac_try="$ac_compile"
11275case "(($ac_try" in
11276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11277 *) ac_try_echo=$ac_try;;
11278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011282 grep -v '^ *+' conftest.er1 >conftest.err
11283 rm -f conftest.er1
11284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286 (exit $ac_status); } && {
11287 test -z "$ac_c_werror_flag" ||
11288 test ! -s conftest.err
11289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_hi=$ac_mid; break
11291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011293sed 's/^/| /' conftest.$ac_ext >&5
11294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 ac_lo=`expr $ac_mid + 1`
11296 if test $ac_lo -le $ac_mid; then
11297 ac_lo= ac_hi=
11298 break
11299 fi
11300 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302
11303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 done
11305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011315$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011316 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317int
11318main ()
11319{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011321test_array [0] = 0
11322
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328if { (ac_try="$ac_compile"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ac_hi=-1 ac_mid=-1
11345 while :; do
11346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011352$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011353 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011358test_array [0] = 0
11359
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365if { (ac_try="$ac_compile"
11366case "(($ac_try" in
11367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11368 *) ac_try_echo=$ac_try;;
11369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011373 grep -v '^ *+' conftest.er1 >conftest.err
11374 rm -f conftest.er1
11375 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377 (exit $ac_status); } && {
11378 test -z "$ac_c_werror_flag" ||
11379 test ! -s conftest.err
11380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_lo=$ac_mid; break
11382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011384sed 's/^/| /' conftest.$ac_ext >&5
11385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 ac_hi=`expr '(' $ac_mid ')' - 1`
11387 if test $ac_mid -le $ac_hi; then
11388 ac_lo= ac_hi=
11389 break
11390 fi
11391 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393
11394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 done
11396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011398sed 's/^/| /' conftest.$ac_ext >&5
11399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405
11406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011407# Binary search between lo and hi bounds.
11408while test "x$ac_lo" != "x$ac_hi"; do
11409 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011417 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011418int
11419main ()
11420{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011422test_array [0] = 0
11423
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429if { (ac_try="$ac_compile"
11430case "(($ac_try" in
11431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11432 *) ac_try_echo=$ac_try;;
11433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011437 grep -v '^ *+' conftest.er1 >conftest.err
11438 rm -f conftest.er1
11439 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441 (exit $ac_status); } && {
11442 test -z "$ac_c_werror_flag" ||
11443 test ! -s conftest.err
11444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_hi=$ac_mid
11446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011448sed 's/^/| /' conftest.$ac_ext >&5
11449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452
11453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454done
11455case $ac_lo in
11456?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463 else
11464 ac_cv_sizeof_long_long=0
11465 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011466esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011475 typedef long long ac__type_sizeof_;
11476static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11477static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011482{
Martin v. Löwis11437992002-04-12 09:54:03 +000011483
11484 FILE *f = fopen ("conftest.val", "w");
11485 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011487 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011492 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 }
11494 else
11495 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
11503 ;
11504 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011505}
Martin v. Löwis11437992002-04-12 09:54:03 +000011506_ACEOF
11507rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508if { (ac_try="$ac_link"
11509case "(($ac_try" in
11510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11511 *) ac_try_echo=$ac_try;;
11512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 { (case "(($ac_try" in
11519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11520 *) ac_try_echo=$ac_try;;
11521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 (exit $ac_status); }; }; then
11527 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529 echo "$as_me: program exited with status $ac_status" >&5
11530echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011538See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011539 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 else
11541 ac_cv_sizeof_long_long=0
11542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -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 +000011545fi
11546rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011548{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11549echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550
11551
11552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011555_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556
Michael W. Hudson54241132001-12-07 15:38:26 +000011557
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
11559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011560{ echo "$as_me:$LINENO: checking for long double support" >&5
11561echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011562have_long_double=no
11563cat >conftest.$ac_ext <<_ACEOF
11564/* confdefs.h. */
11565_ACEOF
11566cat confdefs.h >>conftest.$ac_ext
11567cat >>conftest.$ac_ext <<_ACEOF
11568/* end confdefs.h. */
11569
11570int
11571main ()
11572{
11573long double x; x = (long double)0;
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
11579if { (ac_try="$ac_compile"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011585 (eval "$ac_compile") 2>conftest.er1
11586 ac_status=$?
11587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011591 (exit $ac_status); } && {
11592 test -z "$ac_c_werror_flag" ||
11593 test ! -s conftest.err
11594 } && test -s conftest.$ac_objext; then
11595
11596
11597cat >>confdefs.h <<\_ACEOF
11598#define HAVE_LONG_DOUBLE 1
11599_ACEOF
11600
11601 have_long_double=yes
11602
11603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
11607
11608fi
11609
11610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011611{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11612echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011613if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011614{ echo "$as_me:$LINENO: checking for long double" >&5
11615echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11616if test "${ac_cv_type_long_double+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
11619 cat >conftest.$ac_ext <<_ACEOF
11620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
11625$ac_includes_default
11626typedef long double ac__type_new_;
11627int
11628main ()
11629{
11630if ((ac__type_new_ *) 0)
11631 return 0;
11632if (sizeof (ac__type_new_))
11633 return 0;
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
11639if { (ac_try="$ac_compile"
11640case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
11644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11645 (eval "$ac_compile") 2>conftest.er1
11646 ac_status=$?
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } && {
11652 test -z "$ac_c_werror_flag" ||
11653 test ! -s conftest.err
11654 } && test -s conftest.$ac_objext; then
11655 ac_cv_type_long_double=yes
11656else
11657 echo "$as_me: failed program was:" >&5
11658sed 's/^/| /' conftest.$ac_ext >&5
11659
11660 ac_cv_type_long_double=no
11661fi
11662
11663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11664fi
11665{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11666echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11667
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011668# The cast to long int works around a bug in the HP C Compiler
11669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11671# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011672{ echo "$as_me:$LINENO: checking size of long double" >&5
11673echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011675 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676else
11677 if test "$cross_compiling" = yes; then
11678 # Depending upon the size, compute the lo and hi bounds.
11679cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011686 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687int
11688main ()
11689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011691test_array [0] = 0
11692
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext
11698if { (ac_try="$ac_compile"
11699case "(($ac_try" in
11700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11701 *) ac_try_echo=$ac_try;;
11702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011704 (eval "$ac_compile") 2>conftest.er1
11705 ac_status=$?
11706 grep -v '^ *+' conftest.er1 >conftest.err
11707 rm -f conftest.er1
11708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011710 (exit $ac_status); } && {
11711 test -z "$ac_c_werror_flag" ||
11712 test ! -s conftest.err
11713 } && test -s conftest.$ac_objext; then
11714 ac_lo=0 ac_mid=0
11715 while :; do
11716 cat >conftest.$ac_ext <<_ACEOF
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
11722$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011723 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011724int
11725main ()
11726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011728test_array [0] = 0
11729
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734rm -f conftest.$ac_objext
11735if { (ac_try="$ac_compile"
11736case "(($ac_try" in
11737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11738 *) ac_try_echo=$ac_try;;
11739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741 (eval "$ac_compile") 2>conftest.er1
11742 ac_status=$?
11743 grep -v '^ *+' conftest.er1 >conftest.err
11744 rm -f conftest.er1
11745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011747 (exit $ac_status); } && {
11748 test -z "$ac_c_werror_flag" ||
11749 test ! -s conftest.err
11750 } && test -s conftest.$ac_objext; then
11751 ac_hi=$ac_mid; break
11752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011753 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754sed 's/^/| /' conftest.$ac_ext >&5
11755
11756 ac_lo=`expr $ac_mid + 1`
11757 if test $ac_lo -le $ac_mid; then
11758 ac_lo= ac_hi=
11759 break
11760 fi
11761 ac_mid=`expr 2 '*' $ac_mid + 1`
11762fi
11763
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765 done
11766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011767 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768sed 's/^/| /' conftest.$ac_ext >&5
11769
11770 cat >conftest.$ac_ext <<_ACEOF
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
11776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011777 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011778int
11779main ()
11780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011782test_array [0] = 0
11783
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext
11789if { (ac_try="$ac_compile"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795 (eval "$ac_compile") 2>conftest.er1
11796 ac_status=$?
11797 grep -v '^ *+' conftest.er1 >conftest.err
11798 rm -f conftest.er1
11799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011801 (exit $ac_status); } && {
11802 test -z "$ac_c_werror_flag" ||
11803 test ! -s conftest.err
11804 } && test -s conftest.$ac_objext; then
11805 ac_hi=-1 ac_mid=-1
11806 while :; do
11807 cat >conftest.$ac_ext <<_ACEOF
11808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
11813$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011814 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011815int
11816main ()
11817{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011819test_array [0] = 0
11820
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825rm -f conftest.$ac_objext
11826if { (ac_try="$ac_compile"
11827case "(($ac_try" in
11828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11829 *) ac_try_echo=$ac_try;;
11830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011832 (eval "$ac_compile") 2>conftest.er1
11833 ac_status=$?
11834 grep -v '^ *+' conftest.er1 >conftest.err
11835 rm -f conftest.er1
11836 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011838 (exit $ac_status); } && {
11839 test -z "$ac_c_werror_flag" ||
11840 test ! -s conftest.err
11841 } && test -s conftest.$ac_objext; then
11842 ac_lo=$ac_mid; break
11843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011844 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845sed 's/^/| /' conftest.$ac_ext >&5
11846
11847 ac_hi=`expr '(' $ac_mid ')' - 1`
11848 if test $ac_mid -le $ac_hi; then
11849 ac_lo= ac_hi=
11850 break
11851 fi
11852 ac_mid=`expr 2 '*' $ac_mid`
11853fi
11854
11855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11856 done
11857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011858 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859sed 's/^/| /' conftest.$ac_ext >&5
11860
11861 ac_lo= ac_hi=
11862fi
11863
11864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11865fi
11866
11867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868# Binary search between lo and hi bounds.
11869while test "x$ac_lo" != "x$ac_hi"; do
11870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11871 cat >conftest.$ac_ext <<_ACEOF
11872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
11877$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011878 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879int
11880main ()
11881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011883test_array [0] = 0
11884
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889rm -f conftest.$ac_objext
11890if { (ac_try="$ac_compile"
11891case "(($ac_try" in
11892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893 *) ac_try_echo=$ac_try;;
11894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011896 (eval "$ac_compile") 2>conftest.er1
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011902 (exit $ac_status); } && {
11903 test -z "$ac_c_werror_flag" ||
11904 test ! -s conftest.err
11905 } && test -s conftest.$ac_objext; then
11906 ac_hi=$ac_mid
11907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011908 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011909sed 's/^/| /' conftest.$ac_ext >&5
11910
11911 ac_lo=`expr '(' $ac_mid ')' + 1`
11912fi
11913
11914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915done
11916case $ac_lo in
11917?*) ac_cv_sizeof_long_double=$ac_lo;;
11918'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011923 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011924 else
11925 ac_cv_sizeof_long_double=0
11926 fi ;;
11927esac
11928else
11929 cat >conftest.$ac_ext <<_ACEOF
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
11935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011936 typedef long double ac__type_sizeof_;
11937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011939#include <stdio.h>
11940#include <stdlib.h>
11941int
11942main ()
11943{
11944
11945 FILE *f = fopen ("conftest.val", "w");
11946 if (! f)
11947 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011949 {
11950 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011953 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 }
11955 else
11956 {
11957 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 }
11962 return ferror (f) || fclose (f) != 0;
11963
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest$ac_exeext
11969if { (ac_try="$ac_link"
11970case "(($ac_try" in
11971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11972 *) ac_try_echo=$ac_try;;
11973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975 (eval "$ac_link") 2>&5
11976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11979 { (case "(($ac_try" in
11980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11981 *) ac_try_echo=$ac_try;;
11982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984 (eval "$ac_try") 2>&5
11985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987 (exit $ac_status); }; }; then
11988 ac_cv_sizeof_long_double=`cat conftest.val`
11989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990 echo "$as_me: program exited with status $ac_status" >&5
11991echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994( exit $ac_status )
11995if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012000 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001 else
12002 ac_cv_sizeof_long_double=0
12003 fi
12004fi
12005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12006fi
12007rm -f conftest.val
12008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12010echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012011
12012
12013
12014cat >>confdefs.h <<_ACEOF
12015#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12016_ACEOF
12017
12018
12019fi
12020
12021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12023echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012024have_c99_bool=no
12025cat >conftest.$ac_ext <<_ACEOF
12026/* confdefs.h. */
12027_ACEOF
12028cat confdefs.h >>conftest.$ac_ext
12029cat >>conftest.$ac_ext <<_ACEOF
12030/* end confdefs.h. */
12031
12032int
12033main ()
12034{
12035_Bool x; x = (_Bool)0;
12036 ;
12037 return 0;
12038}
12039_ACEOF
12040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041if { (ac_try="$ac_compile"
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012048 ac_status=$?
12049 grep -v '^ *+' conftest.er1 >conftest.err
12050 rm -f conftest.er1
12051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053 (exit $ac_status); } && {
12054 test -z "$ac_c_werror_flag" ||
12055 test ! -s conftest.err
12056 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012057
12058
12059cat >>confdefs.h <<\_ACEOF
12060#define HAVE_C99_BOOL 1
12061_ACEOF
12062
12063 have_c99_bool=yes
12064
12065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012066 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
Thomas Woutersb2137042007-02-01 18:02:27 +000012070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071
12072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012073{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12074echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012075if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076{ echo "$as_me:$LINENO: checking for _Bool" >&5
12077echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12078if test "${ac_cv_type__Bool+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
12080else
12081 cat >conftest.$ac_ext <<_ACEOF
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
12087$ac_includes_default
12088typedef _Bool ac__type_new_;
12089int
12090main ()
12091{
12092if ((ac__type_new_ *) 0)
12093 return 0;
12094if (sizeof (ac__type_new_))
12095 return 0;
12096 ;
12097 return 0;
12098}
12099_ACEOF
12100rm -f conftest.$ac_objext
12101if { (ac_try="$ac_compile"
12102case "(($ac_try" in
12103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12104 *) ac_try_echo=$ac_try;;
12105esac
12106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12107 (eval "$ac_compile") 2>conftest.er1
12108 ac_status=$?
12109 grep -v '^ *+' conftest.er1 >conftest.err
12110 rm -f conftest.er1
12111 cat conftest.err >&5
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); } && {
12114 test -z "$ac_c_werror_flag" ||
12115 test ! -s conftest.err
12116 } && test -s conftest.$ac_objext; then
12117 ac_cv_type__Bool=yes
12118else
12119 echo "$as_me: failed program was:" >&5
12120sed 's/^/| /' conftest.$ac_ext >&5
12121
12122 ac_cv_type__Bool=no
12123fi
12124
12125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12126fi
12127{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12128echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130# The cast to long int works around a bug in the HP C Compiler
12131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12133# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012134{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12135echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012136if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012137 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012138else
12139 if test "$cross_compiling" = yes; then
12140 # Depending upon the size, compute the lo and hi bounds.
12141cat >conftest.$ac_ext <<_ACEOF
12142/* confdefs.h. */
12143_ACEOF
12144cat confdefs.h >>conftest.$ac_ext
12145cat >>conftest.$ac_ext <<_ACEOF
12146/* end confdefs.h. */
12147$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012148 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012149int
12150main ()
12151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012153test_array [0] = 0
12154
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160if { (ac_try="$ac_compile"
12161case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012167 ac_status=$?
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012176 ac_lo=0 ac_mid=0
12177 while :; do
12178 cat >conftest.$ac_ext <<_ACEOF
12179/* confdefs.h. */
12180_ACEOF
12181cat confdefs.h >>conftest.$ac_ext
12182cat >>conftest.$ac_ext <<_ACEOF
12183/* end confdefs.h. */
12184$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012185 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012186int
12187main ()
12188{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012190test_array [0] = 0
12191
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197if { (ac_try="$ac_compile"
12198case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012204 ac_status=$?
12205 grep -v '^ *+' conftest.er1 >conftest.err
12206 rm -f conftest.er1
12207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209 (exit $ac_status); } && {
12210 test -z "$ac_c_werror_flag" ||
12211 test ! -s conftest.err
12212 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012213 ac_hi=$ac_mid; break
12214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012215 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012216sed 's/^/| /' conftest.$ac_ext >&5
12217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 ac_lo=`expr $ac_mid + 1`
12219 if test $ac_lo -le $ac_mid; then
12220 ac_lo= ac_hi=
12221 break
12222 fi
12223 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225
12226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012227 done
12228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012229 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012230sed 's/^/| /' conftest.$ac_ext >&5
12231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012233/* confdefs.h. */
12234_ACEOF
12235cat confdefs.h >>conftest.$ac_ext
12236cat >>conftest.$ac_ext <<_ACEOF
12237/* end confdefs.h. */
12238$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012239 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012240int
12241main ()
12242{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012244test_array [0] = 0
12245
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251if { (ac_try="$ac_compile"
12252case "(($ac_try" in
12253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12254 *) ac_try_echo=$ac_try;;
12255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012258 ac_status=$?
12259 grep -v '^ *+' conftest.er1 >conftest.err
12260 rm -f conftest.er1
12261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263 (exit $ac_status); } && {
12264 test -z "$ac_c_werror_flag" ||
12265 test ! -s conftest.err
12266 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012267 ac_hi=-1 ac_mid=-1
12268 while :; do
12269 cat >conftest.$ac_ext <<_ACEOF
12270/* confdefs.h. */
12271_ACEOF
12272cat confdefs.h >>conftest.$ac_ext
12273cat >>conftest.$ac_ext <<_ACEOF
12274/* end confdefs.h. */
12275$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012276 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012277int
12278main ()
12279{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012281test_array [0] = 0
12282
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288if { (ac_try="$ac_compile"
12289case "(($ac_try" in
12290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12291 *) ac_try_echo=$ac_try;;
12292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012295 ac_status=$?
12296 grep -v '^ *+' conftest.er1 >conftest.err
12297 rm -f conftest.er1
12298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300 (exit $ac_status); } && {
12301 test -z "$ac_c_werror_flag" ||
12302 test ! -s conftest.err
12303 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012304 ac_lo=$ac_mid; break
12305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012306 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012307sed 's/^/| /' conftest.$ac_ext >&5
12308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 ac_hi=`expr '(' $ac_mid ')' - 1`
12310 if test $ac_mid -le $ac_hi; then
12311 ac_lo= ac_hi=
12312 break
12313 fi
12314 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316
12317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012318 done
12319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012320 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012321sed 's/^/| /' conftest.$ac_ext >&5
12322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012330# Binary search between lo and hi bounds.
12331while test "x$ac_lo" != "x$ac_hi"; do
12332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12333 cat >conftest.$ac_ext <<_ACEOF
12334/* confdefs.h. */
12335_ACEOF
12336cat confdefs.h >>conftest.$ac_ext
12337cat >>conftest.$ac_ext <<_ACEOF
12338/* end confdefs.h. */
12339$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012340 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012341int
12342main ()
12343{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012344static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012345test_array [0] = 0
12346
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352if { (ac_try="$ac_compile"
12353case "(($ac_try" in
12354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12355 *) ac_try_echo=$ac_try;;
12356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012359 ac_status=$?
12360 grep -v '^ *+' conftest.er1 >conftest.err
12361 rm -f conftest.er1
12362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364 (exit $ac_status); } && {
12365 test -z "$ac_c_werror_flag" ||
12366 test ! -s conftest.err
12367 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012368 ac_hi=$ac_mid
12369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012370 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012371sed 's/^/| /' conftest.$ac_ext >&5
12372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375
12376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012377done
12378case $ac_lo in
12379?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012382See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012384See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012385 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386 else
12387 ac_cv_sizeof__Bool=0
12388 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012389esac
12390else
12391 cat >conftest.$ac_ext <<_ACEOF
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
12397$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012398 typedef _Bool ac__type_sizeof_;
12399static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12400static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012401#include <stdio.h>
12402#include <stdlib.h>
12403int
12404main ()
12405{
12406
12407 FILE *f = fopen ("conftest.val", "w");
12408 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012410 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012415 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012416 }
12417 else
12418 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012423 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012425
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431if { (ac_try="$ac_link"
12432case "(($ac_try" in
12433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12434 *) ac_try_echo=$ac_try;;
12435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 { (case "(($ac_try" in
12442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12443 *) ac_try_echo=$ac_try;;
12444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 (exit $ac_status); }; }; then
12450 ac_cv_sizeof__Bool=`cat conftest.val`
12451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452 echo "$as_me: program exited with status $ac_status" >&5
12453echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454sed 's/^/| /' conftest.$ac_ext >&5
12455
12456( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 else
12464 ac_cv_sizeof__Bool=0
12465 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -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 +000012468fi
12469rm -f conftest.val
12470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012471{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12472echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473
12474
12475
Thomas Woutersb2137042007-02-01 18:02:27 +000012476cat >>confdefs.h <<_ACEOF
12477#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12478_ACEOF
12479
12480
12481fi
12482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012483{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12484echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012485if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012486 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012487else
12488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* confdefs.h. */
12490_ACEOF
12491cat confdefs.h >>conftest.$ac_ext
12492cat >>conftest.$ac_ext <<_ACEOF
12493/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012494#ifdef HAVE_STDINT_H
12495 #include <stdint.h>
12496 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012498typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012502if ((ac__type_new_ *) 0)
12503 return 0;
12504if (sizeof (ac__type_new_))
12505 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511if { (ac_try="$ac_compile"
12512case "(($ac_try" in
12513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12514 *) ac_try_echo=$ac_try;;
12515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012519 grep -v '^ *+' conftest.er1 >conftest.err
12520 rm -f conftest.er1
12521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 (exit $ac_status); } && {
12524 test -z "$ac_c_werror_flag" ||
12525 test ! -s conftest.err
12526 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012530sed 's/^/| /' conftest.$ac_ext >&5
12531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012532 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534
12535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12538echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12539if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012540
12541cat >>confdefs.h <<_ACEOF
12542#define HAVE_UINTPTR_T 1
12543_ACEOF
12544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012545{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12546echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12547if test "${ac_cv_type_uintptr_t+set}" = set; then
12548 echo $ECHO_N "(cached) $ECHO_C" >&6
12549else
12550 cat >conftest.$ac_ext <<_ACEOF
12551/* confdefs.h. */
12552_ACEOF
12553cat confdefs.h >>conftest.$ac_ext
12554cat >>conftest.$ac_ext <<_ACEOF
12555/* end confdefs.h. */
12556$ac_includes_default
12557typedef uintptr_t ac__type_new_;
12558int
12559main ()
12560{
12561if ((ac__type_new_ *) 0)
12562 return 0;
12563if (sizeof (ac__type_new_))
12564 return 0;
12565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
12570if { (ac_try="$ac_compile"
12571case "(($ac_try" in
12572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12573 *) ac_try_echo=$ac_try;;
12574esac
12575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12576 (eval "$ac_compile") 2>conftest.er1
12577 ac_status=$?
12578 grep -v '^ *+' conftest.er1 >conftest.err
12579 rm -f conftest.er1
12580 cat conftest.err >&5
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); } && {
12583 test -z "$ac_c_werror_flag" ||
12584 test ! -s conftest.err
12585 } && test -s conftest.$ac_objext; then
12586 ac_cv_type_uintptr_t=yes
12587else
12588 echo "$as_me: failed program was:" >&5
12589sed 's/^/| /' conftest.$ac_ext >&5
12590
12591 ac_cv_type_uintptr_t=no
12592fi
12593
12594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12595fi
12596{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12597echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599# The cast to long int works around a bug in the HP C Compiler
12600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12602# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012603{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12604echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012605if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 if test "$cross_compiling" = yes; then
12609 # Depending upon the size, compute the lo and hi bounds.
12610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012617 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012622test_array [0] = 0
12623
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629if { (ac_try="$ac_compile"
12630case "(($ac_try" in
12631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12632 *) ac_try_echo=$ac_try;;
12633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012637 grep -v '^ *+' conftest.er1 >conftest.err
12638 rm -f conftest.er1
12639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 (exit $ac_status); } && {
12642 test -z "$ac_c_werror_flag" ||
12643 test ! -s conftest.err
12644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_lo=0 ac_mid=0
12646 while :; do
12647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012654 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012659test_array [0] = 0
12660
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666if { (ac_try="$ac_compile"
12667case "(($ac_try" in
12668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12669 *) ac_try_echo=$ac_try;;
12670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012674 grep -v '^ *+' conftest.er1 >conftest.err
12675 rm -f conftest.er1
12676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678 (exit $ac_status); } && {
12679 test -z "$ac_c_werror_flag" ||
12680 test ! -s conftest.err
12681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_hi=$ac_mid; break
12683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012685sed 's/^/| /' conftest.$ac_ext >&5
12686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 ac_lo=`expr $ac_mid + 1`
12688 if test $ac_lo -le $ac_mid; then
12689 ac_lo= ac_hi=
12690 break
12691 fi
12692 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694
12695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 done
12697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012699sed 's/^/| /' conftest.$ac_ext >&5
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012708 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012713test_array [0] = 0
12714
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720if { (ac_try="$ac_compile"
12721case "(($ac_try" in
12722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12723 *) ac_try_echo=$ac_try;;
12724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012728 grep -v '^ *+' conftest.er1 >conftest.err
12729 rm -f conftest.er1
12730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732 (exit $ac_status); } && {
12733 test -z "$ac_c_werror_flag" ||
12734 test ! -s conftest.err
12735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ac_hi=-1 ac_mid=-1
12737 while :; do
12738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* confdefs.h. */
12740_ACEOF
12741cat confdefs.h >>conftest.$ac_ext
12742cat >>conftest.$ac_ext <<_ACEOF
12743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012745 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012750test_array [0] = 0
12751
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757if { (ac_try="$ac_compile"
12758case "(($ac_try" in
12759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12760 *) ac_try_echo=$ac_try;;
12761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012765 grep -v '^ *+' conftest.er1 >conftest.err
12766 rm -f conftest.er1
12767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769 (exit $ac_status); } && {
12770 test -z "$ac_c_werror_flag" ||
12771 test ! -s conftest.err
12772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_lo=$ac_mid; break
12774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012776sed 's/^/| /' conftest.$ac_ext >&5
12777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 ac_hi=`expr '(' $ac_mid ')' - 1`
12779 if test $ac_mid -le $ac_hi; then
12780 ac_lo= ac_hi=
12781 break
12782 fi
12783 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785
12786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 done
12788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012790sed 's/^/| /' conftest.$ac_ext >&5
12791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797
12798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012799# Binary search between lo and hi bounds.
12800while test "x$ac_lo" != "x$ac_hi"; do
12801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* confdefs.h. */
12804_ACEOF
12805cat confdefs.h >>conftest.$ac_ext
12806cat >>conftest.$ac_ext <<_ACEOF
12807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012809 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012814test_array [0] = 0
12815
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821if { (ac_try="$ac_compile"
12822case "(($ac_try" in
12823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12824 *) ac_try_echo=$ac_try;;
12825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012829 grep -v '^ *+' conftest.er1 >conftest.err
12830 rm -f conftest.er1
12831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833 (exit $ac_status); } && {
12834 test -z "$ac_c_werror_flag" ||
12835 test ! -s conftest.err
12836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_hi=$ac_mid
12838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012840sed 's/^/| /' conftest.$ac_ext >&5
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846done
12847case $ac_lo in
12848?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012854 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855 else
12856 ac_cv_sizeof_uintptr_t=0
12857 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012858esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* confdefs.h. */
12862_ACEOF
12863cat confdefs.h >>conftest.$ac_ext
12864cat >>conftest.$ac_ext <<_ACEOF
12865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012867 typedef uintptr_t ac__type_sizeof_;
12868static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12869static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872int
12873main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012874{
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
12876 FILE *f = fopen ("conftest.val", "w");
12877 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012879 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012884 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 }
12886 else
12887 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
12895 ;
12896 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012897}
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
12899rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900if { (ac_try="$ac_link"
12901case "(($ac_try" in
12902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12903 *) ac_try_echo=$ac_try;;
12904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 { (case "(($ac_try" in
12911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12912 *) ac_try_echo=$ac_try;;
12913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 (exit $ac_status); }; }; then
12919 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921 echo "$as_me: program exited with status $ac_status" >&5
12922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012923sed 's/^/| /' conftest.$ac_ext >&5
12924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012928See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012930See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012931 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 else
12933 ac_cv_sizeof_uintptr_t=0
12934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936rm -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 +000012937fi
12938rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012940{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12941echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942
12943
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012947_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948
Michael W. Hudson54241132001-12-07 15:38:26 +000012949
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
12951
Thomas Wouters89f507f2006-12-13 04:49:30 +000012952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953{ echo "$as_me:$LINENO: checking for off_t" >&5
12954echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12955if test "${ac_cv_type_off_t+set}" = set; then
12956 echo $ECHO_N "(cached) $ECHO_C" >&6
12957else
12958 cat >conftest.$ac_ext <<_ACEOF
12959/* confdefs.h. */
12960_ACEOF
12961cat confdefs.h >>conftest.$ac_ext
12962cat >>conftest.$ac_ext <<_ACEOF
12963/* end confdefs.h. */
12964
12965#ifdef HAVE_SYS_TYPES_H
12966#include <sys/types.h>
12967#endif
12968
12969
12970typedef off_t ac__type_new_;
12971int
12972main ()
12973{
12974if ((ac__type_new_ *) 0)
12975 return 0;
12976if (sizeof (ac__type_new_))
12977 return 0;
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
12983if { (ac_try="$ac_compile"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
12988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12989 (eval "$ac_compile") 2>conftest.er1
12990 ac_status=$?
12991 grep -v '^ *+' conftest.er1 >conftest.err
12992 rm -f conftest.er1
12993 cat conftest.err >&5
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } && {
12996 test -z "$ac_c_werror_flag" ||
12997 test ! -s conftest.err
12998 } && test -s conftest.$ac_objext; then
12999 ac_cv_type_off_t=yes
13000else
13001 echo "$as_me: failed program was:" >&5
13002sed 's/^/| /' conftest.$ac_ext >&5
13003
13004 ac_cv_type_off_t=no
13005fi
13006
13007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13008fi
13009{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13010echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012# The cast to long int works around a bug in the HP C Compiler
13013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13015# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013016{ echo "$as_me:$LINENO: checking size of off_t" >&5
13017echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013019 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013020else
13021 if test "$cross_compiling" = yes; then
13022 # Depending upon the size, compute the lo and hi bounds.
13023cat >conftest.$ac_ext <<_ACEOF
13024/* confdefs.h. */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h. */
13029
13030#ifdef HAVE_SYS_TYPES_H
13031#include <sys/types.h>
13032#endif
13033
13034
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013035 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036int
13037main ()
13038{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013040test_array [0] = 0
13041
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046rm -f conftest.$ac_objext
13047if { (ac_try="$ac_compile"
13048case "(($ac_try" in
13049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13050 *) ac_try_echo=$ac_try;;
13051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013053 (eval "$ac_compile") 2>conftest.er1
13054 ac_status=$?
13055 grep -v '^ *+' conftest.er1 >conftest.err
13056 rm -f conftest.er1
13057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013059 (exit $ac_status); } && {
13060 test -z "$ac_c_werror_flag" ||
13061 test ! -s conftest.err
13062 } && test -s conftest.$ac_objext; then
13063 ac_lo=0 ac_mid=0
13064 while :; do
13065 cat >conftest.$ac_ext <<_ACEOF
13066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
13071
13072#ifdef HAVE_SYS_TYPES_H
13073#include <sys/types.h>
13074#endif
13075
13076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013077 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078int
13079main ()
13080{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013081static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013082test_array [0] = 0
13083
13084 ;
13085 return 0;
13086}
13087_ACEOF
13088rm -f conftest.$ac_objext
13089if { (ac_try="$ac_compile"
13090case "(($ac_try" in
13091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13092 *) ac_try_echo=$ac_try;;
13093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013095 (eval "$ac_compile") 2>conftest.er1
13096 ac_status=$?
13097 grep -v '^ *+' conftest.er1 >conftest.err
13098 rm -f conftest.er1
13099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101 (exit $ac_status); } && {
13102 test -z "$ac_c_werror_flag" ||
13103 test ! -s conftest.err
13104 } && test -s conftest.$ac_objext; then
13105 ac_hi=$ac_mid; break
13106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013107 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108sed 's/^/| /' conftest.$ac_ext >&5
13109
13110 ac_lo=`expr $ac_mid + 1`
13111 if test $ac_lo -le $ac_mid; then
13112 ac_lo= ac_hi=
13113 break
13114 fi
13115 ac_mid=`expr 2 '*' $ac_mid + 1`
13116fi
13117
13118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13119 done
13120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122sed 's/^/| /' conftest.$ac_ext >&5
13123
13124 cat >conftest.$ac_ext <<_ACEOF
13125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
13130
13131#ifdef HAVE_SYS_TYPES_H
13132#include <sys/types.h>
13133#endif
13134
13135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137int
13138main ()
13139{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141test_array [0] = 0
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147rm -f conftest.$ac_objext
13148if { (ac_try="$ac_compile"
13149case "(($ac_try" in
13150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13151 *) ac_try_echo=$ac_try;;
13152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013154 (eval "$ac_compile") 2>conftest.er1
13155 ac_status=$?
13156 grep -v '^ *+' conftest.er1 >conftest.err
13157 rm -f conftest.er1
13158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160 (exit $ac_status); } && {
13161 test -z "$ac_c_werror_flag" ||
13162 test ! -s conftest.err
13163 } && test -s conftest.$ac_objext; then
13164 ac_hi=-1 ac_mid=-1
13165 while :; do
13166 cat >conftest.$ac_ext <<_ACEOF
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
13172
13173#ifdef HAVE_SYS_TYPES_H
13174#include <sys/types.h>
13175#endif
13176
13177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179int
13180main ()
13181{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183test_array [0] = 0
13184
13185 ;
13186 return 0;
13187}
13188_ACEOF
13189rm -f conftest.$ac_objext
13190if { (ac_try="$ac_compile"
13191case "(($ac_try" in
13192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13193 *) ac_try_echo=$ac_try;;
13194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196 (eval "$ac_compile") 2>conftest.er1
13197 ac_status=$?
13198 grep -v '^ *+' conftest.er1 >conftest.err
13199 rm -f conftest.er1
13200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 (exit $ac_status); } && {
13203 test -z "$ac_c_werror_flag" ||
13204 test ! -s conftest.err
13205 } && test -s conftest.$ac_objext; then
13206 ac_lo=$ac_mid; break
13207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013208 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209sed 's/^/| /' conftest.$ac_ext >&5
13210
13211 ac_hi=`expr '(' $ac_mid ')' - 1`
13212 if test $ac_mid -le $ac_hi; then
13213 ac_lo= ac_hi=
13214 break
13215 fi
13216 ac_mid=`expr 2 '*' $ac_mid`
13217fi
13218
13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220 done
13221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223sed 's/^/| /' conftest.$ac_ext >&5
13224
13225 ac_lo= ac_hi=
13226fi
13227
13228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229fi
13230
13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232# Binary search between lo and hi bounds.
13233while test "x$ac_lo" != "x$ac_hi"; do
13234 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13235 cat >conftest.$ac_ext <<_ACEOF
13236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
13241
13242#ifdef HAVE_SYS_TYPES_H
13243#include <sys/types.h>
13244#endif
13245
13246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248int
13249main ()
13250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252test_array [0] = 0
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 (eval "$ac_compile") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
13275 ac_hi=$ac_mid
13276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013277 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_lo=`expr '(' $ac_mid ')' + 1`
13281fi
13282
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284done
13285case $ac_lo in
13286?*) ac_cv_sizeof_off_t=$ac_lo;;
13287'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013290echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013292 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293 else
13294 ac_cv_sizeof_off_t=0
13295 fi ;;
13296esac
13297else
13298 cat >conftest.$ac_ext <<_ACEOF
13299/* confdefs.h. */
13300_ACEOF
13301cat confdefs.h >>conftest.$ac_ext
13302cat >>conftest.$ac_ext <<_ACEOF
13303/* end confdefs.h. */
13304
13305#ifdef HAVE_SYS_TYPES_H
13306#include <sys/types.h>
13307#endif
13308
13309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013310 typedef off_t ac__type_sizeof_;
13311static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13312static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013313#include <stdio.h>
13314#include <stdlib.h>
13315int
13316main ()
13317{
13318
13319 FILE *f = fopen ("conftest.val", "w");
13320 if (! f)
13321 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013322 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013323 {
13324 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013327 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328 }
13329 else
13330 {
13331 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013334 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013335 }
13336 return ferror (f) || fclose (f) != 0;
13337
13338 ;
13339 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013340}
Martin v. Löwis11437992002-04-12 09:54:03 +000013341_ACEOF
13342rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343if { (ac_try="$ac_link"
13344case "(($ac_try" in
13345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13346 *) ac_try_echo=$ac_try;;
13347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 { (case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013364 echo "$as_me: program exited with status $ac_status" >&5
13365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013366sed 's/^/| /' conftest.$ac_ext >&5
13367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013374 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013375 else
13376 ac_cv_sizeof_off_t=0
13377 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379rm -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 +000013380fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013383{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13384echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386
13387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013390_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13395echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013396if test "$have_long_long" = yes
13397then
13398if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013399 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401cat >>confdefs.h <<\_ACEOF
13402#define HAVE_LARGEFILE_SUPPORT 1
13403_ACEOF
13404
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013405 { echo "$as_me:$LINENO: result: yes" >&5
13406echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013408 { echo "$as_me:$LINENO: result: no" >&5
13409echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013410fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013411else
13412 { echo "$as_me:$LINENO: result: no" >&5
13413echo "${ECHO_T}no" >&6; }
13414fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013416{ echo "$as_me:$LINENO: checking for time_t" >&5
13417echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13418if test "${ac_cv_type_time_t+set}" = set; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
13420else
13421 cat >conftest.$ac_ext <<_ACEOF
13422/* confdefs.h. */
13423_ACEOF
13424cat confdefs.h >>conftest.$ac_ext
13425cat >>conftest.$ac_ext <<_ACEOF
13426/* end confdefs.h. */
13427
13428#ifdef HAVE_SYS_TYPES_H
13429#include <sys/types.h>
13430#endif
13431#ifdef HAVE_TIME_H
13432#include <time.h>
13433#endif
13434
13435
13436typedef time_t ac__type_new_;
13437int
13438main ()
13439{
13440if ((ac__type_new_ *) 0)
13441 return 0;
13442if (sizeof (ac__type_new_))
13443 return 0;
13444 ;
13445 return 0;
13446}
13447_ACEOF
13448rm -f conftest.$ac_objext
13449if { (ac_try="$ac_compile"
13450case "(($ac_try" in
13451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13452 *) ac_try_echo=$ac_try;;
13453esac
13454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13455 (eval "$ac_compile") 2>conftest.er1
13456 ac_status=$?
13457 grep -v '^ *+' conftest.er1 >conftest.err
13458 rm -f conftest.er1
13459 cat conftest.err >&5
13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); } && {
13462 test -z "$ac_c_werror_flag" ||
13463 test ! -s conftest.err
13464 } && test -s conftest.$ac_objext; then
13465 ac_cv_type_time_t=yes
13466else
13467 echo "$as_me: failed program was:" >&5
13468sed 's/^/| /' conftest.$ac_ext >&5
13469
13470 ac_cv_type_time_t=no
13471fi
13472
13473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13474fi
13475{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13476echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478# The cast to long int works around a bug in the HP C Compiler
13479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13481# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013482{ echo "$as_me:$LINENO: checking size of time_t" >&5
13483echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013484if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013486else
13487 if test "$cross_compiling" = yes; then
13488 # Depending upon the size, compute the lo and hi bounds.
13489cat >conftest.$ac_ext <<_ACEOF
13490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
13495
13496#ifdef HAVE_SYS_TYPES_H
13497#include <sys/types.h>
13498#endif
13499#ifdef HAVE_TIME_H
13500#include <time.h>
13501#endif
13502
13503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013504 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013505int
13506main ()
13507{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013509test_array [0] = 0
13510
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext
13516if { (ac_try="$ac_compile"
13517case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 (eval "$ac_compile") 2>conftest.er1
13523 ac_status=$?
13524 grep -v '^ *+' conftest.er1 >conftest.err
13525 rm -f conftest.er1
13526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013528 (exit $ac_status); } && {
13529 test -z "$ac_c_werror_flag" ||
13530 test ! -s conftest.err
13531 } && test -s conftest.$ac_objext; then
13532 ac_lo=0 ac_mid=0
13533 while :; do
13534 cat >conftest.$ac_ext <<_ACEOF
13535/* confdefs.h. */
13536_ACEOF
13537cat confdefs.h >>conftest.$ac_ext
13538cat >>conftest.$ac_ext <<_ACEOF
13539/* end confdefs.h. */
13540
13541#ifdef HAVE_SYS_TYPES_H
13542#include <sys/types.h>
13543#endif
13544#ifdef HAVE_TIME_H
13545#include <time.h>
13546#endif
13547
13548
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013549 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013550int
13551main ()
13552{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013554test_array [0] = 0
13555
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560rm -f conftest.$ac_objext
13561if { (ac_try="$ac_compile"
13562case "(($ac_try" in
13563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13564 *) ac_try_echo=$ac_try;;
13565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 (eval "$ac_compile") 2>conftest.er1
13568 ac_status=$?
13569 grep -v '^ *+' conftest.er1 >conftest.err
13570 rm -f conftest.er1
13571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013573 (exit $ac_status); } && {
13574 test -z "$ac_c_werror_flag" ||
13575 test ! -s conftest.err
13576 } && test -s conftest.$ac_objext; then
13577 ac_hi=$ac_mid; break
13578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013579 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580sed 's/^/| /' conftest.$ac_ext >&5
13581
13582 ac_lo=`expr $ac_mid + 1`
13583 if test $ac_lo -le $ac_mid; then
13584 ac_lo= ac_hi=
13585 break
13586 fi
13587 ac_mid=`expr 2 '*' $ac_mid + 1`
13588fi
13589
13590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591 done
13592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013593 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013594sed 's/^/| /' conftest.$ac_ext >&5
13595
13596 cat >conftest.$ac_ext <<_ACEOF
13597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
13602
13603#ifdef HAVE_SYS_TYPES_H
13604#include <sys/types.h>
13605#endif
13606#ifdef HAVE_TIME_H
13607#include <time.h>
13608#endif
13609
13610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013611 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013612int
13613main ()
13614{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013615static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013616test_array [0] = 0
13617
13618 ;
13619 return 0;
13620}
13621_ACEOF
13622rm -f conftest.$ac_objext
13623if { (ac_try="$ac_compile"
13624case "(($ac_try" in
13625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13626 *) ac_try_echo=$ac_try;;
13627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629 (eval "$ac_compile") 2>conftest.er1
13630 ac_status=$?
13631 grep -v '^ *+' conftest.er1 >conftest.err
13632 rm -f conftest.er1
13633 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013635 (exit $ac_status); } && {
13636 test -z "$ac_c_werror_flag" ||
13637 test ! -s conftest.err
13638 } && test -s conftest.$ac_objext; then
13639 ac_hi=-1 ac_mid=-1
13640 while :; do
13641 cat >conftest.$ac_ext <<_ACEOF
13642/* confdefs.h. */
13643_ACEOF
13644cat confdefs.h >>conftest.$ac_ext
13645cat >>conftest.$ac_ext <<_ACEOF
13646/* end confdefs.h. */
13647
13648#ifdef HAVE_SYS_TYPES_H
13649#include <sys/types.h>
13650#endif
13651#ifdef HAVE_TIME_H
13652#include <time.h>
13653#endif
13654
13655
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013656 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657int
13658main ()
13659{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661test_array [0] = 0
13662
13663 ;
13664 return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext
13668if { (ac_try="$ac_compile"
13669case "(($ac_try" in
13670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13671 *) ac_try_echo=$ac_try;;
13672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674 (eval "$ac_compile") 2>conftest.er1
13675 ac_status=$?
13676 grep -v '^ *+' conftest.er1 >conftest.err
13677 rm -f conftest.er1
13678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013680 (exit $ac_status); } && {
13681 test -z "$ac_c_werror_flag" ||
13682 test ! -s conftest.err
13683 } && test -s conftest.$ac_objext; then
13684 ac_lo=$ac_mid; break
13685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013686 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687sed 's/^/| /' conftest.$ac_ext >&5
13688
13689 ac_hi=`expr '(' $ac_mid ')' - 1`
13690 if test $ac_mid -le $ac_hi; then
13691 ac_lo= ac_hi=
13692 break
13693 fi
13694 ac_mid=`expr 2 '*' $ac_mid`
13695fi
13696
13697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13698 done
13699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013700 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701sed 's/^/| /' conftest.$ac_ext >&5
13702
13703 ac_lo= ac_hi=
13704fi
13705
13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13707fi
13708
13709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710# Binary search between lo and hi bounds.
13711while test "x$ac_lo" != "x$ac_hi"; do
13712 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13713 cat >conftest.$ac_ext <<_ACEOF
13714/* confdefs.h. */
13715_ACEOF
13716cat confdefs.h >>conftest.$ac_ext
13717cat >>conftest.$ac_ext <<_ACEOF
13718/* end confdefs.h. */
13719
13720#ifdef HAVE_SYS_TYPES_H
13721#include <sys/types.h>
13722#endif
13723#ifdef HAVE_TIME_H
13724#include <time.h>
13725#endif
13726
13727
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013728 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729int
13730main ()
13731{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013733test_array [0] = 0
13734
13735 ;
13736 return 0;
13737}
13738_ACEOF
13739rm -f conftest.$ac_objext
13740if { (ac_try="$ac_compile"
13741case "(($ac_try" in
13742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13743 *) ac_try_echo=$ac_try;;
13744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746 (eval "$ac_compile") 2>conftest.er1
13747 ac_status=$?
13748 grep -v '^ *+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752 (exit $ac_status); } && {
13753 test -z "$ac_c_werror_flag" ||
13754 test ! -s conftest.err
13755 } && test -s conftest.$ac_objext; then
13756 ac_hi=$ac_mid
13757else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013758 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013759sed 's/^/| /' conftest.$ac_ext >&5
13760
13761 ac_lo=`expr '(' $ac_mid ')' + 1`
13762fi
13763
13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13765done
13766case $ac_lo in
13767?*) ac_cv_sizeof_time_t=$ac_lo;;
13768'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013771echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013772See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013773 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013774 else
13775 ac_cv_sizeof_time_t=0
13776 fi ;;
13777esac
13778else
13779 cat >conftest.$ac_ext <<_ACEOF
13780/* confdefs.h. */
13781_ACEOF
13782cat confdefs.h >>conftest.$ac_ext
13783cat >>conftest.$ac_ext <<_ACEOF
13784/* end confdefs.h. */
13785
13786#ifdef HAVE_SYS_TYPES_H
13787#include <sys/types.h>
13788#endif
13789#ifdef HAVE_TIME_H
13790#include <time.h>
13791#endif
13792
13793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013794 typedef time_t ac__type_sizeof_;
13795static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13796static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013797#include <stdio.h>
13798#include <stdlib.h>
13799int
13800main ()
13801{
13802
13803 FILE *f = fopen ("conftest.val", "w");
13804 if (! f)
13805 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013806 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807 {
13808 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013809 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013810 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013811 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013812 }
13813 else
13814 {
13815 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013818 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013819 }
13820 return ferror (f) || fclose (f) != 0;
13821
13822 ;
13823 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013824}
Martin v. Löwis11437992002-04-12 09:54:03 +000013825_ACEOF
13826rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827if { (ac_try="$ac_link"
13828case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 { (case "(($ac_try" in
13838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13839 *) ac_try_echo=$ac_try;;
13840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 echo "$as_me: program exited with status $ac_status" >&5
13849echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013850sed 's/^/| /' conftest.$ac_ext >&5
13851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013854 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013855See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013856echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013858 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859 else
13860 ac_cv_sizeof_time_t=0
13861 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863rm -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 +000013864fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013867{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13868echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013870
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013873#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013874_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013875
Michael W. Hudson54241132001-12-07 15:38:26 +000013876
13877
Trent Mick635f6fb2000-08-23 21:33:05 +000013878# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013879ac_save_cc="$CC"
13880if test "$ac_cv_kpthread" = "yes"
13881then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013882elif test "$ac_cv_kthread" = "yes"
13883then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013884elif test "$ac_cv_pthread" = "yes"
13885then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013886fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013888{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13889echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013890have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892/* confdefs.h. */
13893_ACEOF
13894cat confdefs.h >>conftest.$ac_ext
13895cat >>conftest.$ac_ext <<_ACEOF
13896/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013897#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013898int
13899main ()
13900{
Guido van Rossum12580492000-09-24 16:47:19 +000013901pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ;
13903 return 0;
13904}
13905_ACEOF
13906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907if { (ac_try="$ac_compile"
13908case "(($ac_try" in
13909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13910 *) ac_try_echo=$ac_try;;
13911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013915 grep -v '^ *+' conftest.er1 >conftest.err
13916 rm -f conftest.er1
13917 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 (exit $ac_status); } && {
13920 test -z "$ac_c_werror_flag" ||
13921 test ! -s conftest.err
13922 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013923 have_pthread_t=yes
13924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013926sed 's/^/| /' conftest.$ac_ext >&5
13927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928
Trent Mick635f6fb2000-08-23 21:33:05 +000013929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930
13931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013932{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13933echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013934if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013935 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13936echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13937if test "${ac_cv_type_pthread_t+set}" = set; then
13938 echo $ECHO_N "(cached) $ECHO_C" >&6
13939else
13940 cat >conftest.$ac_ext <<_ACEOF
13941/* confdefs.h. */
13942_ACEOF
13943cat confdefs.h >>conftest.$ac_ext
13944cat >>conftest.$ac_ext <<_ACEOF
13945/* end confdefs.h. */
13946
13947#ifdef HAVE_PTHREAD_H
13948#include <pthread.h>
13949#endif
13950
13951
13952typedef pthread_t ac__type_new_;
13953int
13954main ()
13955{
13956if ((ac__type_new_ *) 0)
13957 return 0;
13958if (sizeof (ac__type_new_))
13959 return 0;
13960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext
13965if { (ac_try="$ac_compile"
13966case "(($ac_try" in
13967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13968 *) ac_try_echo=$ac_try;;
13969esac
13970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13971 (eval "$ac_compile") 2>conftest.er1
13972 ac_status=$?
13973 grep -v '^ *+' conftest.er1 >conftest.err
13974 rm -f conftest.er1
13975 cat conftest.err >&5
13976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977 (exit $ac_status); } && {
13978 test -z "$ac_c_werror_flag" ||
13979 test ! -s conftest.err
13980 } && test -s conftest.$ac_objext; then
13981 ac_cv_type_pthread_t=yes
13982else
13983 echo "$as_me: failed program was:" >&5
13984sed 's/^/| /' conftest.$ac_ext >&5
13985
13986 ac_cv_type_pthread_t=no
13987fi
13988
13989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13990fi
13991{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13992echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13993
13994# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13997# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013998{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13999echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014000if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014001 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014002else
14003 if test "$cross_compiling" = yes; then
14004 # Depending upon the size, compute the lo and hi bounds.
14005cat >conftest.$ac_ext <<_ACEOF
14006/* confdefs.h. */
14007_ACEOF
14008cat confdefs.h >>conftest.$ac_ext
14009cat >>conftest.$ac_ext <<_ACEOF
14010/* end confdefs.h. */
14011
14012#ifdef HAVE_PTHREAD_H
14013#include <pthread.h>
14014#endif
14015
14016
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014017 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014018int
14019main ()
14020{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014022test_array [0] = 0
14023
14024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext
14029if { (ac_try="$ac_compile"
14030case "(($ac_try" in
14031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14032 *) ac_try_echo=$ac_try;;
14033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 (eval "$ac_compile") 2>conftest.er1
14036 ac_status=$?
14037 grep -v '^ *+' conftest.er1 >conftest.err
14038 rm -f conftest.er1
14039 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014041 (exit $ac_status); } && {
14042 test -z "$ac_c_werror_flag" ||
14043 test ! -s conftest.err
14044 } && test -s conftest.$ac_objext; then
14045 ac_lo=0 ac_mid=0
14046 while :; do
14047 cat >conftest.$ac_ext <<_ACEOF
14048/* confdefs.h. */
14049_ACEOF
14050cat confdefs.h >>conftest.$ac_ext
14051cat >>conftest.$ac_ext <<_ACEOF
14052/* end confdefs.h. */
14053
14054#ifdef HAVE_PTHREAD_H
14055#include <pthread.h>
14056#endif
14057
14058
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014059 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014060int
14061main ()
14062{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014064test_array [0] = 0
14065
14066 ;
14067 return 0;
14068}
14069_ACEOF
14070rm -f conftest.$ac_objext
14071if { (ac_try="$ac_compile"
14072case "(($ac_try" in
14073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14074 *) ac_try_echo=$ac_try;;
14075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 (eval "$ac_compile") 2>conftest.er1
14078 ac_status=$?
14079 grep -v '^ *+' conftest.er1 >conftest.err
14080 rm -f conftest.er1
14081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083 (exit $ac_status); } && {
14084 test -z "$ac_c_werror_flag" ||
14085 test ! -s conftest.err
14086 } && test -s conftest.$ac_objext; then
14087 ac_hi=$ac_mid; break
14088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014089 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090sed 's/^/| /' conftest.$ac_ext >&5
14091
14092 ac_lo=`expr $ac_mid + 1`
14093 if test $ac_lo -le $ac_mid; then
14094 ac_lo= ac_hi=
14095 break
14096 fi
14097 ac_mid=`expr 2 '*' $ac_mid + 1`
14098fi
14099
14100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14101 done
14102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104sed 's/^/| /' conftest.$ac_ext >&5
14105
14106 cat >conftest.$ac_ext <<_ACEOF
14107/* confdefs.h. */
14108_ACEOF
14109cat confdefs.h >>conftest.$ac_ext
14110cat >>conftest.$ac_ext <<_ACEOF
14111/* end confdefs.h. */
14112
14113#ifdef HAVE_PTHREAD_H
14114#include <pthread.h>
14115#endif
14116
14117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014118 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014119int
14120main ()
14121{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014123test_array [0] = 0
14124
14125 ;
14126 return 0;
14127}
14128_ACEOF
14129rm -f conftest.$ac_objext
14130if { (ac_try="$ac_compile"
14131case "(($ac_try" in
14132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14133 *) ac_try_echo=$ac_try;;
14134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 (eval "$ac_compile") 2>conftest.er1
14137 ac_status=$?
14138 grep -v '^ *+' conftest.er1 >conftest.err
14139 rm -f conftest.er1
14140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014142 (exit $ac_status); } && {
14143 test -z "$ac_c_werror_flag" ||
14144 test ! -s conftest.err
14145 } && test -s conftest.$ac_objext; then
14146 ac_hi=-1 ac_mid=-1
14147 while :; do
14148 cat >conftest.$ac_ext <<_ACEOF
14149/* confdefs.h. */
14150_ACEOF
14151cat confdefs.h >>conftest.$ac_ext
14152cat >>conftest.$ac_ext <<_ACEOF
14153/* end confdefs.h. */
14154
14155#ifdef HAVE_PTHREAD_H
14156#include <pthread.h>
14157#endif
14158
14159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014160 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014161int
14162main ()
14163{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014164static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014165test_array [0] = 0
14166
14167 ;
14168 return 0;
14169}
14170_ACEOF
14171rm -f conftest.$ac_objext
14172if { (ac_try="$ac_compile"
14173case "(($ac_try" in
14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14175 *) ac_try_echo=$ac_try;;
14176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 (eval "$ac_compile") 2>conftest.er1
14179 ac_status=$?
14180 grep -v '^ *+' conftest.er1 >conftest.err
14181 rm -f conftest.er1
14182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 (exit $ac_status); } && {
14185 test -z "$ac_c_werror_flag" ||
14186 test ! -s conftest.err
14187 } && test -s conftest.$ac_objext; then
14188 ac_lo=$ac_mid; break
14189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014190 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014191sed 's/^/| /' conftest.$ac_ext >&5
14192
14193 ac_hi=`expr '(' $ac_mid ')' - 1`
14194 if test $ac_mid -le $ac_hi; then
14195 ac_lo= ac_hi=
14196 break
14197 fi
14198 ac_mid=`expr 2 '*' $ac_mid`
14199fi
14200
14201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202 done
14203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014204 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014205sed 's/^/| /' conftest.$ac_ext >&5
14206
14207 ac_lo= ac_hi=
14208fi
14209
14210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211fi
14212
14213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214# Binary search between lo and hi bounds.
14215while test "x$ac_lo" != "x$ac_hi"; do
14216 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14217 cat >conftest.$ac_ext <<_ACEOF
14218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
14223
14224#ifdef HAVE_PTHREAD_H
14225#include <pthread.h>
14226#endif
14227
14228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014229 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230int
14231main ()
14232{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234test_array [0] = 0
14235
14236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext
14241if { (ac_try="$ac_compile"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (eval "$ac_compile") 2>conftest.er1
14248 ac_status=$?
14249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253 (exit $ac_status); } && {
14254 test -z "$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 } && test -s conftest.$ac_objext; then
14257 ac_hi=$ac_mid
14258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014259 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
14262 ac_lo=`expr '(' $ac_mid ')' + 1`
14263fi
14264
14265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14266done
14267case $ac_lo in
14268?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14269'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014270 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014271See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014272echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014274 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275 else
14276 ac_cv_sizeof_pthread_t=0
14277 fi ;;
14278esac
14279else
14280 cat >conftest.$ac_ext <<_ACEOF
14281/* confdefs.h. */
14282_ACEOF
14283cat confdefs.h >>conftest.$ac_ext
14284cat >>conftest.$ac_ext <<_ACEOF
14285/* end confdefs.h. */
14286
14287#ifdef HAVE_PTHREAD_H
14288#include <pthread.h>
14289#endif
14290
14291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014292 typedef pthread_t ac__type_sizeof_;
14293static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14294static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014295#include <stdio.h>
14296#include <stdlib.h>
14297int
14298main ()
14299{
14300
14301 FILE *f = fopen ("conftest.val", "w");
14302 if (! f)
14303 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014304 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014305 {
14306 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014309 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310 }
14311 else
14312 {
14313 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014314 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014315 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014316 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014317 }
14318 return ferror (f) || fclose (f) != 0;
14319
14320 ;
14321 return 0;
14322}
Martin v. Löwis11437992002-04-12 09:54:03 +000014323_ACEOF
14324rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325if { (ac_try="$ac_link"
14326case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 { (case "(($ac_try" in
14336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14337 *) ac_try_echo=$ac_try;;
14338esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 echo "$as_me: program exited with status $ac_status" >&5
14347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014348sed 's/^/| /' conftest.$ac_ext >&5
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014352 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014356 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357 else
14358 ac_cv_sizeof_pthread_t=0
14359 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361rm -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 +000014362fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014364fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014365{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14366echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368
14369
Martin v. Löwis11437992002-04-12 09:54:03 +000014370cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014371#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014372_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374
Trent Mick635f6fb2000-08-23 21:33:05 +000014375fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014376CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014377
Michael W. Hudson54241132001-12-07 15:38:26 +000014378
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014379case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014380 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014381 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14382 ;;
14383 Darwin/*)
14384 OTHER_LIBTOOL_OPT=""
14385 ;;
14386esac
14387
14388
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014389ARCH_RUN_32BIT=""
14390
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014391case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014392 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014393 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14394 if test "${enable_universalsdk}"; then
14395 :
14396 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014397 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014398 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014399 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014400 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014401 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014402 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14403 if test ${gcc_version} '<' 4.0
14404 then
14405 LIBTOOL_CRUFT="-lcc_dynamic"
14406 else
14407 LIBTOOL_CRUFT=""
14408 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014409 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014410 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014411else
14412 cat >conftest.$ac_ext <<_ACEOF
14413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014418
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014419 #include <unistd.h>
14420 int main(int argc, char*argv[])
14421 {
14422 if (sizeof(long) == 4) {
14423 return 0;
14424 } else {
14425 return 1;
14426 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014427 }
14428
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014429_ACEOF
14430rm -f conftest$ac_exeext
14431if { (ac_try="$ac_link"
14432case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
14441 { (case "(($ac_try" in
14442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14443 *) ac_try_echo=$ac_try;;
14444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014446 (eval "$ac_try") 2>&5
14447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014449 (exit $ac_status); }; }; then
14450 ac_osx_32bit=yes
14451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452 echo "$as_me: program exited with status $ac_status" >&5
14453echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014454sed 's/^/| /' conftest.$ac_ext >&5
14455
14456( exit $ac_status )
14457ac_osx_32bit=no
14458fi
14459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14460fi
14461
14462
14463
14464 if test "${ac_osx_32bit}" = "yes"; then
14465 case `arch` in
14466 i386)
14467 MACOSX_DEFAULT_ARCH="i386"
14468 ;;
14469 ppc)
14470 MACOSX_DEFAULT_ARCH="ppc"
14471 ;;
14472 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014473 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14474echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014475 { (exit 1); exit 1; }; }
14476 ;;
14477 esac
14478 else
14479 case `arch` in
14480 i386)
14481 MACOSX_DEFAULT_ARCH="x86_64"
14482 ;;
14483 ppc)
14484 MACOSX_DEFAULT_ARCH="ppc64"
14485 ;;
14486 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014487 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14488echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014489 { (exit 1); exit 1; }; }
14490 ;;
14491 esac
14492
14493 #ARCH_RUN_32BIT="true"
14494 fi
14495
14496 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014499esac
14500
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014501{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14502echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014503if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014504then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014505 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014507 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509cat >>confdefs.h <<\_ACEOF
14510#define WITH_NEXT_FRAMEWORK 1
14511_ACEOF
14512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014513 { echo "$as_me:$LINENO: result: yes" >&5
14514echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014515 if test $enable_shared = "yes"
14516 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14518echo "$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 +000014519 { (exit 1); exit 1; }; }
14520 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014522 { echo "$as_me:$LINENO: result: no" >&5
14523echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524fi
14525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014526{ echo "$as_me:$LINENO: checking for dyld" >&5
14527echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014528case $ac_sys_system/$ac_sys_release in
14529 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<\_ACEOF
14532#define WITH_DYLD 1
14533_ACEOF
14534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014535 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14536echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014537 ;;
14538 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014539 { echo "$as_me:$LINENO: result: no" >&5
14540echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014541 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014542esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545
Michael W. Hudson54241132001-12-07 15:38:26 +000014546
14547
14548
14549
Guido van Rossum0a516c91994-09-12 10:58:40 +000014550# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014551# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014552{ echo "$as_me:$LINENO: checking SO" >&5
14553echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014554if test -z "$SO"
14555then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014556 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014557 hp*|HP*)
14558 case `uname -m` in
14559 ia64) SO=.so;;
14560 *) SO=.sl;;
14561 esac
14562 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014563 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014564 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014566else
14567 # this might also be a termcap variable, see #610332
14568 echo
14569 echo '====================================================================='
14570 echo '+ +'
14571 echo '+ WARNING: You have set SO in your environment. +'
14572 echo '+ Do you really mean to change the extension for shared libraries? +'
14573 echo '+ Continuing in 10 seconds to let you to ponder. +'
14574 echo '+ +'
14575 echo '====================================================================='
14576 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014577fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014578{ echo "$as_me:$LINENO: result: $SO" >&5
14579echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014580
Georg Brandlb1441c72009-01-03 22:33:39 +000014581
Thomas Wouters477c8d52006-05-27 19:21:47 +000014582cat >>confdefs.h <<_ACEOF
14583#define SHLIB_EXT "$SO"
14584_ACEOF
14585
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014587# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588# (Shared libraries in this instance are shared modules to be loaded into
14589# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014590{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14591echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014592if test -z "$LDSHARED"
14593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014595 AIX*)
14596 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014597 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014598 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014599 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014600 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014602 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014603 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014604 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014605 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014606 hp*|HP*)
14607 if test "$GCC" = "yes"
14608 then LDSHARED='$(CC) -shared'
14609 else LDSHARED='ld -b';
14610 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014611 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014612 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014613 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14614 if test "$enable_framework" ; then
14615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014618 else
14619 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014620 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014621 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014622 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014623 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14624 if test "$enable_framework" ; then
14625 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014626 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14627 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014628 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014629 # No framework, use the Python app as bundle-loader
14630 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014631 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 Darwin/*)
14634 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14635 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014636
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014637 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014638 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014640 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014641 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014642 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14643 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 else
14645 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14646 if test "$enable_framework" ; then
14647 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014648 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14649 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014650 else
14651 # No framework, use the Python app as bundle-loader
14652 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14653 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14654 fi
14655 fi
14656 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014657 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014658 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014659 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014661 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014662 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014663 else
14664 LDSHARED="ld -Bshareable ${LDFLAGS}"
14665 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014666 OpenBSD*)
14667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14668 then
14669 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14670 else
14671 case `uname -r` in
14672 [01].* | 2.[0-7] | 2.[0-7].*)
14673 LDSHARED="ld -Bshareable ${LDFLAGS}"
14674 ;;
14675 *)
14676 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14677 ;;
14678 esac
14679 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014680 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014681 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014682 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014683 then LDSHARED='$(CC) -shared'
14684 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014685 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014686 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014687 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688 *) LDSHARED="ld";;
14689 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014691{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14692echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014693BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014695# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014696{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14697echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698if test -z "$CCSHARED"
14699then
Guido van Rossum07397971997-04-29 21:49:50 +000014700 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014701 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014702 then CCSHARED="-fPIC";
14703 elif test `uname -p` = sparc;
14704 then CCSHARED="-xcode=pic32";
14705 else CCSHARED="-Kpic";
14706 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014707 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014708 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014709 else CCSHARED="+z";
14710 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014711 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014712 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014713 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014714 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014715 if test "$GCC" = "yes"
14716 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014717 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014718 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014719 SCO_SV*)
14720 if test "$GCC" = "yes"
14721 then CCSHARED="-fPIC"
14722 else CCSHARED="-Kpic -belf"
14723 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014724 IRIX*/6*) case $CC in
14725 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014726 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014727 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014730{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14731echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014732# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014733# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014734{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14735echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014736if test -z "$LINKFORSHARED"
14737then
Guido van Rossum07397971997-04-29 21:49:50 +000014738 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014739 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014740 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014741 LINKFORSHARED="-Wl,-E -Wl,+s";;
14742# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014743 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014744 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014745 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014747 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014748 if test "$enable_framework"
14749 then
Jack Jansenda49e192005-01-07 13:08:22 +000014750 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014751 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014752 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014753 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014754 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014755 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014756 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014757 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14758 then
14759 LINKFORSHARED="-Wl,--export-dynamic"
14760 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014761 SunOS/5*) case $CC in
14762 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014763 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014764 then
14765 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014766 fi;;
14767 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014768 CYGWIN*)
14769 if test $enable_shared = "no"
14770 then
14771 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14772 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014773 QNX*)
14774 # -Wl,-E causes the symbols to be added to the dynamic
14775 # symbol table so that they can be found when a module
14776 # is loaded. -N 2048K causes the stack size to be set
14777 # to 2048 kilobytes so that the stack doesn't overflow
14778 # when running test_compile.py.
14779 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014782{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14783echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014784
Michael W. Hudson54241132001-12-07 15:38:26 +000014785
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014787{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14788echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014789if test ! "$LIBRARY" = "$LDLIBRARY"
14790then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014791 case $ac_sys_system in
14792 CYGWIN*)
14793 # Cygwin needs CCSHARED when building extension DLLs
14794 # but not when building the interpreter DLL.
14795 CFLAGSFORSHARED='';;
14796 *)
14797 CFLAGSFORSHARED='$(CCSHARED)'
14798 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014799fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014800{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14801echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014802
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014803# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14804# library (with --enable-shared).
14805# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014806# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14807# if it is not required, since it creates a dependency of the shared library
14808# to LIBS. This, in turn, means that applications linking the shared libpython
14809# don't need to link LIBS explicitly. The default should be only changed
14810# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14813echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014815 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014816 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14819echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014820
14821
Guido van Rossum627b2d71993-12-24 10:39:16 +000014822# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014824{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14825echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014826if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014828else
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014830LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014832/* confdefs.h. */
14833_ACEOF
14834cat confdefs.h >>conftest.$ac_ext
14835cat >>conftest.$ac_ext <<_ACEOF
14836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838/* Override any GCC internal prototype to avoid an error.
14839 Use char because int might match the return type of a GCC
14840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014841#ifdef __cplusplus
14842extern "C"
14843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014844char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014845int
14846main ()
14847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
14853rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854if { (ac_try="$ac_link"
14855case "(($ac_try" in
14856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14857 *) ac_try_echo=$ac_try;;
14858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014862 grep -v '^ *+' conftest.er1 >conftest.err
14863 rm -f conftest.er1
14864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 (exit $ac_status); } && {
14867 test -z "$ac_c_werror_flag" ||
14868 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869 } && test -s conftest$ac_exeext &&
14870 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014874sed 's/^/| /' conftest.$ac_ext >&5
14875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878
14879rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014881LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014883{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14884echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14885if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 cat >>confdefs.h <<_ACEOF
14887#define HAVE_LIBDL 1
14888_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014890 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014892fi
14893 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014895{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14896echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014897if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014901LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014903/* confdefs.h. */
14904_ACEOF
14905cat confdefs.h >>conftest.$ac_ext
14906cat >>conftest.$ac_ext <<_ACEOF
14907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909/* Override any GCC internal prototype to avoid an error.
14910 Use char because int might match the return type of a GCC
14911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014912#ifdef __cplusplus
14913extern "C"
14914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014915char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916int
14917main ()
14918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ;
14921 return 0;
14922}
14923_ACEOF
14924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925if { (ac_try="$ac_link"
14926case "(($ac_try" in
14927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14928 *) ac_try_echo=$ac_try;;
14929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014933 grep -v '^ *+' conftest.er1 >conftest.err
14934 rm -f conftest.er1
14935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 (exit $ac_status); } && {
14938 test -z "$ac_c_werror_flag" ||
14939 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940 } && test -s conftest$ac_exeext &&
14941 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014945sed 's/^/| /' conftest.$ac_ext >&5
14946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949
14950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014952LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014954{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14955echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14956if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 cat >>confdefs.h <<_ACEOF
14958#define HAVE_LIBDLD 1
14959_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014961 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963fi
14964 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014965
Georg Brandlb1441c72009-01-03 22:33:39 +000014966# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014967if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014968 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14969echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014970if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014972else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014973 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014975/* confdefs.h. */
14976_ACEOF
14977cat confdefs.h >>conftest.$ac_ext
14978cat >>conftest.$ac_ext <<_ACEOF
14979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981/* Override any GCC internal prototype to avoid an error.
14982 Use char because int might match the return type of a GCC
14983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014984#ifdef __cplusplus
14985extern "C"
14986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014987char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014988int
14989main ()
14990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ;
14993 return 0;
14994}
14995_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996for ac_lib in '' pthread rt posix4; do
14997 if test -z "$ac_lib"; then
14998 ac_res="none required"
14999 else
15000 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 fi
15003 rm -f conftest.$ac_objext conftest$ac_exeext
15004if { (ac_try="$ac_link"
15005case "(($ac_try" in
15006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15007 *) ac_try_echo=$ac_try;;
15008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015011 ac_status=$?
15012 grep -v '^ *+' conftest.er1 >conftest.err
15013 rm -f conftest.er1
15014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 (exit $ac_status); } && {
15017 test -z "$ac_c_werror_flag" ||
15018 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015019 } && test -s conftest$ac_exeext &&
15020 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015024sed 's/^/| /' conftest.$ac_ext >&5
15025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
Thomas Wouters477c8d52006-05-27 19:21:47 +000015027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028
15029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15030 conftest$ac_exeext
15031 if test "${ac_cv_search_sem_init+set}" = set; then
15032 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034done
15035if test "${ac_cv_search_sem_init+set}" = set; then
15036 :
15037else
15038 ac_cv_search_sem_init=no
15039fi
15040rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015041LIBS=$ac_func_search_save_LIBS
15042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015043{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15044echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045ac_res=$ac_cv_search_sem_init
15046if test "$ac_res" != no; then
15047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015048
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015049fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015050 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015051 # posix4 on Solaris 2.6
15052 # pthread (first!) on Linux
15053fi
15054
Martin v. Löwis19d17342003-06-14 21:03:05 +000015055# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015056{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15057echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015058if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015060else
15061 ac_check_lib_save_LIBS=$LIBS
15062LIBS="-lintl $LIBS"
15063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070/* Override any GCC internal prototype to avoid an error.
15071 Use char because int might match the return type of a GCC
15072 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073#ifdef __cplusplus
15074extern "C"
15075#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015077int
15078main ()
15079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015081 ;
15082 return 0;
15083}
15084_ACEOF
15085rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086if { (ac_try="$ac_link"
15087case "(($ac_try" in
15088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15089 *) ac_try_echo=$ac_try;;
15090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015094 grep -v '^ *+' conftest.er1 >conftest.err
15095 rm -f conftest.er1
15096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098 (exit $ac_status); } && {
15099 test -z "$ac_c_werror_flag" ||
15100 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015101 } && test -s conftest$ac_exeext &&
15102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015103 ac_cv_lib_intl_textdomain=yes
15104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015106sed 's/^/| /' conftest.$ac_ext >&5
15107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110
15111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015113LIBS=$ac_check_lib_save_LIBS
15114fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015115{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15116echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15117if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118
15119cat >>confdefs.h <<\_ACEOF
15120#define WITH_LIBINTL 1
15121_ACEOF
15122
Brett Cannonc6d936e2009-06-07 20:09:53 +000015123 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124fi
15125
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015126
15127# checks for system dependent C++ extensions support
15128case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015129 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15130echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015132/* confdefs.h. */
15133_ACEOF
15134cat confdefs.h >>conftest.$ac_ext
15135cat >>conftest.$ac_ext <<_ACEOF
15136/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015137#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015138int
15139main ()
15140{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015141loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ;
15143 return 0;
15144}
15145_ACEOF
15146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147if { (ac_try="$ac_link"
15148case "(($ac_try" in
15149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15150 *) ac_try_echo=$ac_try;;
15151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155 grep -v '^ *+' conftest.er1 >conftest.err
15156 rm -f conftest.er1
15157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159 (exit $ac_status); } && {
15160 test -z "$ac_c_werror_flag" ||
15161 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015162 } && test -s conftest$ac_exeext &&
15163 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015164
Martin v. Löwis11437992002-04-12 09:54:03 +000015165cat >>confdefs.h <<\_ACEOF
15166#define AIX_GENUINE_CPLUSPLUS 1
15167_ACEOF
15168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015169 { echo "$as_me:$LINENO: result: yes" >&5
15170echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015173sed 's/^/| /' conftest.$ac_ext >&5
15174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015175 { echo "$as_me:$LINENO: result: no" >&5
15176echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178
15179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015181 *) ;;
15182esac
15183
Guido van Rossum70c7f481998-03-26 18:44:10 +000015184# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015185{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15186echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015187if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015191LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015193/* confdefs.h. */
15194_ACEOF
15195cat confdefs.h >>conftest.$ac_ext
15196cat >>conftest.$ac_ext <<_ACEOF
15197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199/* Override any GCC internal prototype to avoid an error.
15200 Use char because int might match the return type of a GCC
15201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015202#ifdef __cplusplus
15203extern "C"
15204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015205char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015206int
15207main ()
15208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 ;
15211 return 0;
15212}
15213_ACEOF
15214rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215if { (ac_try="$ac_link"
15216case "(($ac_try" in
15217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15218 *) ac_try_echo=$ac_try;;
15219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015223 grep -v '^ *+' conftest.er1 >conftest.err
15224 rm -f conftest.er1
15225 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 (exit $ac_status); } && {
15228 test -z "$ac_c_werror_flag" ||
15229 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015230 } && test -s conftest$ac_exeext &&
15231 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015235sed 's/^/| /' conftest.$ac_ext >&5
15236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239
15240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015242LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015243fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15245echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15246if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015247 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015248fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015249 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015250{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15251echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015252if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015256LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015258/* confdefs.h. */
15259_ACEOF
15260cat confdefs.h >>conftest.$ac_ext
15261cat >>conftest.$ac_ext <<_ACEOF
15262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264/* Override any GCC internal prototype to avoid an error.
15265 Use char because int might match the return type of a GCC
15266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267#ifdef __cplusplus
15268extern "C"
15269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015270char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271int
15272main ()
15273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 ;
15276 return 0;
15277}
15278_ACEOF
15279rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280if { (ac_try="$ac_link"
15281case "(($ac_try" in
15282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15283 *) ac_try_echo=$ac_try;;
15284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015288 grep -v '^ *+' conftest.er1 >conftest.err
15289 rm -f conftest.er1
15290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 (exit $ac_status); } && {
15293 test -z "$ac_c_werror_flag" ||
15294 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 } && test -s conftest$ac_exeext &&
15296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015300sed 's/^/| /' conftest.$ac_ext >&5
15301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
15305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015307LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015309{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15310echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15311if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015312 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015313fi
15314 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15317echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015320if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322{ echo "$as_me:$LINENO: result: $withval" >&5
15323echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015324LIBS="$withval $LIBS"
15325
15326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015327 { echo "$as_me:$LINENO: result: no" >&5
15328echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329fi
15330
Guido van Rossum7f43da71994-08-01 12:15:30 +000015331
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015332# Check for use of the system expat library
15333{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15334echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15335
15336# Check whether --with-system_expat was given.
15337if test "${with_system_expat+set}" = set; then
15338 withval=$with_system_expat;
15339fi
15340
15341
15342{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15343echo "${ECHO_T}$with_system_expat" >&6; }
15344
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015345# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15347echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015350if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 withval=$with_system_ffi;
15352fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015354
Benjamin Petersond78735d2010-01-01 16:04:23 +000015355if test "$with_system_ffi" = "yes"; then
15356 if test -n "$ac_tool_prefix"; then
15357 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15358set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15359{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15361if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15362 echo $ECHO_N "(cached) $ECHO_C" >&6
15363else
15364 case $PKG_CONFIG in
15365 [\\/]* | ?:[\\/]*)
15366 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15367 ;;
15368 *)
15369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15370for as_dir in $PATH
15371do
15372 IFS=$as_save_IFS
15373 test -z "$as_dir" && as_dir=.
15374 for ac_exec_ext in '' $ac_executable_extensions; do
15375 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15376 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15377 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15378 break 2
15379 fi
15380done
15381done
15382IFS=$as_save_IFS
15383
15384 ;;
15385esac
15386fi
15387PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15388if test -n "$PKG_CONFIG"; then
15389 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15390echo "${ECHO_T}$PKG_CONFIG" >&6; }
15391else
15392 { echo "$as_me:$LINENO: result: no" >&5
15393echo "${ECHO_T}no" >&6; }
15394fi
15395
15396
15397fi
15398if test -z "$ac_cv_path_PKG_CONFIG"; then
15399 ac_pt_PKG_CONFIG=$PKG_CONFIG
15400 # Extract the first word of "pkg-config", so it can be a program name with args.
15401set dummy pkg-config; ac_word=$2
15402{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15404if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15405 echo $ECHO_N "(cached) $ECHO_C" >&6
15406else
15407 case $ac_pt_PKG_CONFIG in
15408 [\\/]* | ?:[\\/]*)
15409 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15410 ;;
15411 *)
15412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15413for as_dir in $PATH
15414do
15415 IFS=$as_save_IFS
15416 test -z "$as_dir" && as_dir=.
15417 for ac_exec_ext in '' $ac_executable_extensions; do
15418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15419 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15421 break 2
15422 fi
15423done
15424done
15425IFS=$as_save_IFS
15426
15427 ;;
15428esac
15429fi
15430ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15431if test -n "$ac_pt_PKG_CONFIG"; then
15432 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15433echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15434else
15435 { echo "$as_me:$LINENO: result: no" >&5
15436echo "${ECHO_T}no" >&6; }
15437fi
15438
15439 if test "x$ac_pt_PKG_CONFIG" = x; then
15440 PKG_CONFIG=""
15441 else
15442 case $cross_compiling:$ac_tool_warned in
15443yes:)
15444{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15445whose name does not start with the host triplet. If you think this
15446configuration is useful to you, please write to autoconf@gnu.org." >&5
15447echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15448whose name does not start with the host triplet. If you think this
15449configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15450ac_tool_warned=yes ;;
15451esac
15452 PKG_CONFIG=$ac_pt_PKG_CONFIG
15453 fi
15454else
15455 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15456fi
15457
15458 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15459else
15460 LIBFFI_INCLUDEDIR=""
15461fi
15462
15463
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015464{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15465echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015466
Matthias Klose55708cc2009-04-30 08:06:49 +000015467# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015468{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15469echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015470
15471# Check whether --with-dbmliborder was given.
15472if test "${with_dbmliborder+set}" = set; then
15473 withval=$with_dbmliborder;
15474if test x$with_dbmliborder = xyes
15475then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015476{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15477echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015478 { (exit 1); exit 1; }; }
15479else
15480 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15481 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15482 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015483 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15484echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015485 { (exit 1); exit 1; }; }
15486 fi
15487 done
15488fi
15489fi
15490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015491{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15492echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015493
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015494# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015495
15496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015497{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15498echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015501if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 withval=$with_signal_module;
15503fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015504
15505
15506if test -z "$with_signal_module"
15507then with_signal_module="yes"
15508fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015509{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15510echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015511
15512if test "${with_signal_module}" = "yes"; then
15513 USE_SIGNAL_MODULE=""
15514 SIGNAL_OBJS=""
15515else
15516 USE_SIGNAL_MODULE="#"
15517 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15518fi
15519
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015520# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015521
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015522USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015524{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15525echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Guido van Rossumec2f0731997-01-22 20:54:01 +000015527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015529if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531{ echo "$as_me:$LINENO: result: $withval" >&5
15532echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015533LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015534if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015535 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015536fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015538 { echo "$as_me:$LINENO: result: no" >&5
15539echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540fi
15541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
15543# Templates for things AC_DEFINEd more than once.
15544# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015545
15546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
15548
15549
15550
15551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15553echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015556if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 withval=$with_threads;
15558fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015559
15560
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015561# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015564if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 withval=$with_thread; with_threads=$with_thread
15566fi
15567
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015568
15569if test -z "$with_threads"
15570then with_threads="yes"
15571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015572{ echo "$as_me:$LINENO: result: $with_threads" >&5
15573echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015574
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015575
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015576if test "$with_threads" = "no"
15577then
15578 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015579elif test "$ac_cv_pthread_is_default" = yes
15580then
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015582#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015584
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015585 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015587#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015588_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015589
15590 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015592elif test "$ac_cv_kpthread" = "yes"
15593then
15594 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015595 if test "$ac_cv_cxx_thread" = "yes"; then
15596 CXX="$CXX -Kpthread"
15597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015599#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015600_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015602 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015603 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015604elif test "$ac_cv_kthread" = "yes"
15605then
15606 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015607 if test "$ac_cv_cxx_thread" = "yes"; then
15608 CXX="$CXX -Kthread"
15609 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015610 cat >>confdefs.h <<\_ACEOF
15611#define WITH_THREAD 1
15612_ACEOF
15613
15614 posix_threads=yes
15615 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015616elif test "$ac_cv_pthread" = "yes"
15617then
15618 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015619 if test "$ac_cv_cxx_thread" = "yes"; then
15620 CXX="$CXX -pthread"
15621 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015622 cat >>confdefs.h <<\_ACEOF
15623#define WITH_THREAD 1
15624_ACEOF
15625
15626 posix_threads=yes
15627 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015628else
15629 if test ! -z "$with_threads" -a -d "$with_threads"
15630 then LDFLAGS="$LDFLAGS -L$with_threads"
15631 fi
15632 if test ! -z "$withval" -a -d "$withval"
15633 then LDFLAGS="$LDFLAGS -L$withval"
15634 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015635
15636 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015637 # define _POSIX_THREADS in unistd.h. Some apparently don't
15638 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015639 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15640echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* confdefs.h. */
15643_ACEOF
15644cat confdefs.h >>conftest.$ac_ext
15645cat >>conftest.$ac_ext <<_ACEOF
15646/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015648#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015649#ifdef _POSIX_THREADS
15650yes
15651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
15653_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015655 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015656 unistd_defines_pthreads=yes
15657else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015658 unistd_defines_pthreads=no
15659fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015660rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015662 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15663echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015666#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015670 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15671echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015672if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015675{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15676echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015679{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15680echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015687$ac_includes_default
15688#include <cthreads.h>
15689_ACEOF
15690rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691if { (ac_try="$ac_compile"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
15706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 ac_header_compiler=yes
15708else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015710sed 's/^/| /' conftest.$ac_ext >&5
15711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714
15715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15717echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015718
15719# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015720{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15721echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* confdefs.h. */
15724_ACEOF
15725cat confdefs.h >>conftest.$ac_ext
15726cat >>conftest.$ac_ext <<_ACEOF
15727/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015728#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730if { (ac_try="$ac_cpp conftest.$ac_ext"
15731case "(($ac_try" in
15732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15733 *) ac_try_echo=$ac_try;;
15734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 rm -f conftest.er1
15740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 (exit $ac_status); } >/dev/null && {
15743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15744 test ! -s conftest.err
15745 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ac_header_preproc=yes
15747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015749sed 's/^/| /' conftest.$ac_ext >&5
15750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753
Martin v. Löwis11437992002-04-12 09:54:03 +000015754rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15756echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015757
15758# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15760 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15762echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15763 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15764echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015765 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015766 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15769echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15770 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15771echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15772 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15773echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15774 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15775echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15776 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15777echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15778 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15779echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015781## -------------------------------------- ##
15782## Report this to http://bugs.python.org/ ##
15783## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015784_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015786 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015787esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15789echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015790if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015792else
15793 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015795{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15796echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015797
15798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015799if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015805#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
15809cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015810#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015811_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015812
15813 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015814 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015815else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015818 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15819echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015820if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015822fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015823{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15824echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015825else
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15828echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015830/* confdefs.h. */
15831_ACEOF
15832cat confdefs.h >>conftest.$ac_ext
15833cat >>conftest.$ac_ext <<_ACEOF
15834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015835$ac_includes_default
15836#include <mach/cthreads.h>
15837_ACEOF
15838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839if { (ac_try="$ac_compile"
15840case "(($ac_try" in
15841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15842 *) ac_try_echo=$ac_try;;
15843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015847 grep -v '^ *+' conftest.er1 >conftest.err
15848 rm -f conftest.er1
15849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851 (exit $ac_status); } && {
15852 test -z "$ac_c_werror_flag" ||
15853 test ! -s conftest.err
15854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 ac_header_compiler=yes
15856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015858sed 's/^/| /' conftest.$ac_ext >&5
15859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862
15863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015864{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15865echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
15867# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015868{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15869echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015871/* confdefs.h. */
15872_ACEOF
15873cat confdefs.h >>conftest.$ac_ext
15874cat >>conftest.$ac_ext <<_ACEOF
15875/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015876#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878if { (ac_try="$ac_cpp conftest.$ac_ext"
15879case "(($ac_try" in
15880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15881 *) ac_try_echo=$ac_try;;
15882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015886 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 rm -f conftest.er1
15888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 (exit $ac_status); } >/dev/null && {
15891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15892 test ! -s conftest.err
15893 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 ac_header_preproc=yes
15895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015897sed 's/^/| /' conftest.$ac_ext >&5
15898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015903{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15904echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015905
15906# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15908 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15910echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15911 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15912echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015913 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015914 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015915 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015916 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15917echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15918 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15919echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15920 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15921echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15922 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15923echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15924 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15925echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15926 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15927echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015929## -------------------------------------- ##
15930## Report this to http://bugs.python.org/ ##
15931## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015932_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015934 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015936{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15937echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015938if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015939 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015940else
15941 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015942fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015943{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15944echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015945
15946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015947if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015949#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015951
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015953#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956
15957cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015958#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015960
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015961 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015962else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015963
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015964 # Just looking for pthread_create in libpthread is not enough:
15965 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15966 # So we really have to include pthread.h, and then link.
15967 _libs=$LIBS
15968 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015969 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15970echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015977#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015978
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015979void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015980int
15981main ()
15982{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015983
15984pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ;
15986 return 0;
15987}
15988_ACEOF
15989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990if { (ac_try="$ac_link"
15991case "(($ac_try" in
15992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15993 *) ac_try_echo=$ac_try;;
15994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015998 grep -v '^ *+' conftest.er1 >conftest.err
15999 rm -f conftest.er1
16000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002 (exit $ac_status); } && {
16003 test -z "$ac_c_werror_flag" ||
16004 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016005 } && test -s conftest$ac_exeext &&
16006 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016008 { echo "$as_me:$LINENO: result: yes" >&5
16009echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016011#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016012_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016013
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016014 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016015 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016018sed 's/^/| /' conftest.$ac_ext >&5
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016021 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016022 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16023echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016024if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016026else
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016028/* confdefs.h. */
16029_ACEOF
16030cat confdefs.h >>conftest.$ac_ext
16031cat >>conftest.$ac_ext <<_ACEOF
16032/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016033/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16034 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16035#define pthread_detach innocuous_pthread_detach
16036
Guido van Rossumad678af1998-10-02 14:42:15 +000016037/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016038 which can conflict with char pthread_detach (); below.
16039 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016040 <limits.h> exists even on freestanding compilers. */
16041
16042#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016043# include <limits.h>
16044#else
16045# include <assert.h>
16046#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016047
16048#undef pthread_detach
16049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050/* Override any GCC internal prototype to avoid an error.
16051 Use char because int might match the return type of a GCC
16052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016053#ifdef __cplusplus
16054extern "C"
16055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016056char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016057/* The GNU C library defines this for functions which it implements
16058 to always fail with ENOSYS. Some functions are actually named
16059 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016061choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016062#endif
16063
Skip Montanaro6dead952003-09-25 14:50:04 +000016064int
16065main ()
16066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016068 ;
16069 return 0;
16070}
16071_ACEOF
16072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073if { (ac_try="$ac_link"
16074case "(($ac_try" in
16075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16076 *) ac_try_echo=$ac_try;;
16077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016081 grep -v '^ *+' conftest.er1 >conftest.err
16082 rm -f conftest.er1
16083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085 (exit $ac_status); } && {
16086 test -z "$ac_c_werror_flag" ||
16087 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016088 } && test -s conftest$ac_exeext &&
16089 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016093sed 's/^/| /' conftest.$ac_ext >&5
16094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097
16098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016099 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016101{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16102echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16103if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016105#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016107
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016108 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016109 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016110else
Guido van Rossumad678af1998-10-02 14:42:15 +000016111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016112 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16113echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016114if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016116else
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016118LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016120/* confdefs.h. */
16121_ACEOF
16122cat confdefs.h >>conftest.$ac_ext
16123cat >>conftest.$ac_ext <<_ACEOF
16124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126/* Override any GCC internal prototype to avoid an error.
16127 Use char because int might match the return type of a GCC
16128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016129#ifdef __cplusplus
16130extern "C"
16131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016132char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016133int
16134main ()
16135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 ;
16138 return 0;
16139}
16140_ACEOF
16141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142if { (ac_try="$ac_link"
16143case "(($ac_try" in
16144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16145 *) ac_try_echo=$ac_try;;
16146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016150 grep -v '^ *+' conftest.er1 >conftest.err
16151 rm -f conftest.er1
16152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 (exit $ac_status); } && {
16155 test -z "$ac_c_werror_flag" ||
16156 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016157 } && test -s conftest$ac_exeext &&
16158 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016162sed 's/^/| /' conftest.$ac_ext >&5
16163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166
16167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016169LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016170fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16172echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16173if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016175#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016176_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016178 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016179 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016180 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016181else
Greg Steinadf63d62000-07-05 10:38:09 +000016182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016183 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16184echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016185if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016186 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016187else
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016189LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016191/* confdefs.h. */
16192_ACEOF
16193cat confdefs.h >>conftest.$ac_ext
16194cat >>conftest.$ac_ext <<_ACEOF
16195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197/* Override any GCC internal prototype to avoid an error.
16198 Use char because int might match the return type of a GCC
16199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016200#ifdef __cplusplus
16201extern "C"
16202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016203char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016204int
16205main ()
16206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 ;
16209 return 0;
16210}
16211_ACEOF
16212rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213if { (ac_try="$ac_link"
16214case "(($ac_try" in
16215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16216 *) ac_try_echo=$ac_try;;
16217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016221 grep -v '^ *+' conftest.er1 >conftest.err
16222 rm -f conftest.er1
16223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225 (exit $ac_status); } && {
16226 test -z "$ac_c_werror_flag" ||
16227 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016228 } && test -s conftest$ac_exeext &&
16229 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016233sed 's/^/| /' conftest.$ac_ext >&5
16234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237
16238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16243echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16244if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016250 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016251 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016252else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016254 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16255echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016256if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016258else
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016260LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268/* Override any GCC internal prototype to avoid an error.
16269 Use char because int might match the return type of a GCC
16270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016271#ifdef __cplusplus
16272extern "C"
16273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016274char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016275int
16276main ()
16277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ;
16280 return 0;
16281}
16282_ACEOF
16283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284if { (ac_try="$ac_link"
16285case "(($ac_try" in
16286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16287 *) ac_try_echo=$ac_try;;
16288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 grep -v '^ *+' conftest.er1 >conftest.err
16293 rm -f conftest.er1
16294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 (exit $ac_status); } && {
16297 test -z "$ac_c_werror_flag" ||
16298 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016299 } && test -s conftest$ac_exeext &&
16300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016304sed 's/^/| /' conftest.$ac_ext >&5
16305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308
16309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016313{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16314echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16315if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016317#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016318_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016320 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016321 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016322 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016323else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016324
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016325 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16326echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016331LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016333/* confdefs.h. */
16334_ACEOF
16335cat confdefs.h >>conftest.$ac_ext
16336cat >>conftest.$ac_ext <<_ACEOF
16337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339/* Override any GCC internal prototype to avoid an error.
16340 Use char because int might match the return type of a GCC
16341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016342#ifdef __cplusplus
16343extern "C"
16344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016345char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016346int
16347main ()
16348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ;
16351 return 0;
16352}
16353_ACEOF
16354rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355if { (ac_try="$ac_link"
16356case "(($ac_try" in
16357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16358 *) ac_try_echo=$ac_try;;
16359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 grep -v '^ *+' conftest.er1 >conftest.err
16364 rm -f conftest.er1
16365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 (exit $ac_status); } && {
16368 test -z "$ac_c_werror_flag" ||
16369 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016370 } && test -s conftest$ac_exeext &&
16371 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016375sed 's/^/| /' conftest.$ac_ext >&5
16376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016379
16380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016382LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016383fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016384{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16385echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16386if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016388#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016391 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016392 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016393 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016394else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016395
Martin v. Löwis130fb172001-07-19 11:00:41 +000016396 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016397fi
16398
Guido van Rossum627b2d71993-12-24 10:39:16 +000016399
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016400fi
16401
Guido van Rossum0be3e491997-05-22 20:33:33 +000016402fi
16403
Guido van Rossum49545951997-12-02 19:28:29 +000016404fi
16405
Guido van Rossumb93a8621998-05-07 13:27:32 +000016406fi
16407
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409
16410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016411 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412fi
16413
Martin v. Löwis11437992002-04-12 09:54:03 +000016414
16415fi
16416
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016417
Michael W. Hudson54241132001-12-07 15:38:26 +000016418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016419 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16420echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016421if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016423else
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016425LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016427/* confdefs.h. */
16428_ACEOF
16429cat confdefs.h >>conftest.$ac_ext
16430cat >>conftest.$ac_ext <<_ACEOF
16431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433/* Override any GCC internal prototype to avoid an error.
16434 Use char because int might match the return type of a GCC
16435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016436#ifdef __cplusplus
16437extern "C"
16438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016439char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016440int
16441main ()
16442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 ;
16445 return 0;
16446}
16447_ACEOF
16448rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449if { (ac_try="$ac_link"
16450case "(($ac_try" in
16451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16452 *) ac_try_echo=$ac_try;;
16453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 grep -v '^ *+' conftest.er1 >conftest.err
16458 rm -f conftest.er1
16459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461 (exit $ac_status); } && {
16462 test -z "$ac_c_werror_flag" ||
16463 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016464 } && test -s conftest$ac_exeext &&
16465 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016469sed 's/^/| /' conftest.$ac_ext >&5
16470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473
16474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016477fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16479echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16480if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016481 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016484
Martin v. Löwis130fb172001-07-19 11:00:41 +000016485 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016486 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016487 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016488fi
16489
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016490
Neal Norwitza978ab02002-11-02 16:58:05 +000016491 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016492 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16493echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016494if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016496else
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016498LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016500/* confdefs.h. */
16501_ACEOF
16502cat confdefs.h >>conftest.$ac_ext
16503cat >>conftest.$ac_ext <<_ACEOF
16504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506/* Override any GCC internal prototype to avoid an error.
16507 Use char because int might match the return type of a GCC
16508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016509#ifdef __cplusplus
16510extern "C"
16511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016512char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016513int
16514main ()
16515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ;
16518 return 0;
16519}
16520_ACEOF
16521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522if { (ac_try="$ac_link"
16523case "(($ac_try" in
16524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16525 *) ac_try_echo=$ac_try;;
16526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 grep -v '^ *+' conftest.er1 >conftest.err
16531 rm -f conftest.er1
16532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 (exit $ac_status); } && {
16535 test -z "$ac_c_werror_flag" ||
16536 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016537 } && test -s conftest$ac_exeext &&
16538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016542sed 's/^/| /' conftest.$ac_ext >&5
16543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546
16547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016551{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16552echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16553if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016555#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016557
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016558 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016559 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016560 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016561fi
16562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016563 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016564
Martin v. Löwis130fb172001-07-19 11:00:41 +000016565 if test "$USE_THREAD_MODULE" != "#"
16566 then
16567 # If the above checks didn't disable threads, (at least) OSF1
16568 # needs this '-threads' argument during linking.
16569 case $ac_sys_system in
16570 OSF1) LDLAST=-threads;;
16571 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016572 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016573fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016575if test "$posix_threads" = "yes"; then
16576 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016577
16578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016579#define _POSIX_THREADS 1
16580_ACEOF
16581
16582 fi
16583
16584 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16585 case $ac_sys_system/$ac_sys_release in
16586 SunOS/5.6)
16587cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016588#define HAVE_PTHREAD_DESTRUCTOR 1
16589_ACEOF
16590
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016591 ;;
16592 SunOS/5.8)
16593cat >>confdefs.h <<\_ACEOF
16594#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16595_ACEOF
16596
16597 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016598 AIX/5)
16599cat >>confdefs.h <<\_ACEOF
16600#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16601_ACEOF
16602
16603 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016604 esac
16605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016606 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16607echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016608 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016610else
16611 if test "$cross_compiling" = yes; then
16612 ac_cv_pthread_system_supported=no
16613else
16614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016620#include <pthread.h>
16621 void *foo(void *parm) {
16622 return NULL;
16623 }
16624 main() {
16625 pthread_attr_t attr;
16626 pthread_t id;
16627 if (pthread_attr_init(&attr)) exit(-1);
16628 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16629 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16630 exit(0);
16631 }
16632_ACEOF
16633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634if { (ac_try="$ac_link"
16635case "(($ac_try" in
16636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16637 *) ac_try_echo=$ac_try;;
16638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016641 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 { (case "(($ac_try" in
16645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646 *) ac_try_echo=$ac_try;;
16647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016652 (exit $ac_status); }; }; then
16653 ac_cv_pthread_system_supported=yes
16654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016655 echo "$as_me: program exited with status $ac_status" >&5
16656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016657sed 's/^/| /' conftest.$ac_ext >&5
16658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016659( exit $ac_status )
16660ac_cv_pthread_system_supported=no
16661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662rm -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 +000016663fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665
16666
Guido van Rossum627b2d71993-12-24 10:39:16 +000016667fi
16668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16670echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 if test "$ac_cv_pthread_system_supported" = "yes"; then
16672
16673cat >>confdefs.h <<\_ACEOF
16674#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16675_ACEOF
16676
16677 fi
16678
16679for ac_func in pthread_sigmask
16680do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016681as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16682{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16683echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016685 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016686else
16687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016688/* confdefs.h. */
16689_ACEOF
16690cat confdefs.h >>conftest.$ac_ext
16691cat >>conftest.$ac_ext <<_ACEOF
16692/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016693/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16695#define $ac_func innocuous_$ac_func
16696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016697/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016698 which can conflict with char $ac_func (); below.
16699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016700 <limits.h> exists even on freestanding compilers. */
16701
16702#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016703# include <limits.h>
16704#else
16705# include <assert.h>
16706#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016707
16708#undef $ac_func
16709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710/* Override any GCC internal prototype to avoid an error.
16711 Use char because int might match the return type of a GCC
16712 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713#ifdef __cplusplus
16714extern "C"
16715#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016716char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016717/* The GNU C library defines this for functions which it implements
16718 to always fail with ENOSYS. Some functions are actually named
16719 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016721choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722#endif
16723
Skip Montanaro6dead952003-09-25 14:50:04 +000016724int
16725main ()
16726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016728 ;
16729 return 0;
16730}
16731_ACEOF
16732rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733if { (ac_try="$ac_link"
16734case "(($ac_try" in
16735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16736 *) ac_try_echo=$ac_try;;
16737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016741 grep -v '^ *+' conftest.er1 >conftest.err
16742 rm -f conftest.er1
16743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 (exit $ac_status); } && {
16746 test -z "$ac_c_werror_flag" ||
16747 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016748 } && test -s conftest$ac_exeext &&
16749 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016750 eval "$as_ac_var=yes"
16751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016753sed 's/^/| /' conftest.$ac_ext >&5
16754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757
16758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016760fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016761ac_res=`eval echo '${'$as_ac_var'}'`
16762 { echo "$as_me:$LINENO: result: $ac_res" >&5
16763echo "${ECHO_T}$ac_res" >&6; }
16764if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016765 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016767_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016768 case $ac_sys_system in
16769 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016770
Jason Tishlerfac083d2003-07-22 15:20:49 +000016771cat >>confdefs.h <<\_ACEOF
16772#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16773_ACEOF
16774
16775 ;;
16776 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777fi
16778done
16779
16780fi
16781
16782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016783# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016784
16785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016786{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16787echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016789if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016791 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016792 { echo "$as_me:$LINENO: result: no" >&5
16793echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016794 ipv6=no
16795 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016796 *) { echo "$as_me:$LINENO: result: yes" >&5
16797echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016799#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016801
16802 ipv6=yes
16803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016805else
Martin v. Löwis11437992002-04-12 09:54:03 +000016806
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016807 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808 { echo "$as_me:$LINENO: result: no" >&5
16809echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016810 ipv6=no
16811
16812else
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016814/* confdefs.h. */
16815_ACEOF
16816cat confdefs.h >>conftest.$ac_ext
16817cat >>conftest.$ac_ext <<_ACEOF
16818/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016819 /* AF_INET6 available check */
16820#include <sys/types.h>
16821#include <sys/socket.h>
16822main()
16823{
16824 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16825 exit(1);
16826 else
16827 exit(0);
16828}
16829
Martin v. Löwis11437992002-04-12 09:54:03 +000016830_ACEOF
16831rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832if { (ac_try="$ac_link"
16833case "(($ac_try" in
16834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16835 *) ac_try_echo=$ac_try;;
16836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842 { (case "(($ac_try" in
16843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16844 *) ac_try_echo=$ac_try;;
16845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016851 { echo "$as_me:$LINENO: result: yes" >&5
16852echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016853 ipv6=yes
16854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016855 echo "$as_me: program exited with status $ac_status" >&5
16856echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016857sed 's/^/| /' conftest.$ac_ext >&5
16858
Martin v. Löwis11437992002-04-12 09:54:03 +000016859( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016860{ echo "$as_me:$LINENO: result: no" >&5
16861echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016862 ipv6=no
16863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864rm -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 +000016865fi
16866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867
16868
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016869if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016870 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16871echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016873/* confdefs.h. */
16874_ACEOF
16875cat confdefs.h >>conftest.$ac_ext
16876cat >>conftest.$ac_ext <<_ACEOF
16877/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016878#include <sys/types.h>
16879#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016880int
16881main ()
16882{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016883struct sockaddr_in6 x;
16884x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 ;
16886 return 0;
16887}
16888_ACEOF
16889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890if { (ac_try="$ac_compile"
16891case "(($ac_try" in
16892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16893 *) ac_try_echo=$ac_try;;
16894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016898 grep -v '^ *+' conftest.er1 >conftest.err
16899 rm -f conftest.er1
16900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 (exit $ac_status); } && {
16903 test -z "$ac_c_werror_flag" ||
16904 test ! -s conftest.err
16905 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016906 { echo "$as_me:$LINENO: result: yes" >&5
16907echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016908 ipv6=yes
16909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016911sed 's/^/| /' conftest.$ac_ext >&5
16912
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913 { echo "$as_me:$LINENO: result: no" >&5
16914echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016915 ipv6=no
16916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917
16918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016919fi
16920
16921if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016923#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016924_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016925
16926fi
16927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928fi
16929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930
16931ipv6type=unknown
16932ipv6lib=none
16933ipv6trylibc=no
16934
16935if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016936 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16937echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016938 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16939 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016940 case $i in
16941 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016949#include <netinet/in.h>
16950#ifdef IPV6_INRIA_VERSION
16951yes
16952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016955 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016956 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016957fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016958rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016959
16960 ;;
16961 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016963/* confdefs.h. */
16964_ACEOF
16965cat confdefs.h >>conftest.$ac_ext
16966cat >>conftest.$ac_ext <<_ACEOF
16967/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016969#include <netinet/in.h>
16970#ifdef __KAME__
16971yes
16972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016973_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016975 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016976 ipv6type=$i;
16977 ipv6lib=inet6
16978 ipv6libdir=/usr/local/v6/lib
16979 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016980fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016982
16983 ;;
16984 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016986/* confdefs.h. */
16987_ACEOF
16988cat confdefs.h >>conftest.$ac_ext
16989cat >>conftest.$ac_ext <<_ACEOF
16990/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016991
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016992#include <features.h>
16993#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16994yes
16995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016996_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016998 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016999 ipv6type=$i;
17000 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017002rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017003
17004 ;;
17005 linux-inet6)
17006 if test -d /usr/inet6; then
17007 ipv6type=$i
17008 ipv6lib=inet6
17009 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017010 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017011 fi
17012 ;;
17013 solaris)
17014 if test -f /etc/netconfig; then
17015 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17016 ipv6type=$i
17017 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017018 fi
17019 fi
17020 ;;
17021 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017023/* confdefs.h. */
17024_ACEOF
17025cat confdefs.h >>conftest.$ac_ext
17026cat >>conftest.$ac_ext <<_ACEOF
17027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029#include <sys/param.h>
17030#ifdef _TOSHIBA_INET6
17031yes
17032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017035 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017036 ipv6type=$i;
17037 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017038 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041
17042 ;;
17043 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017045/* confdefs.h. */
17046_ACEOF
17047cat confdefs.h >>conftest.$ac_ext
17048cat >>conftest.$ac_ext <<_ACEOF
17049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017051#include </usr/local/v6/include/sys/v6config.h>
17052#ifdef __V6D__
17053yes
17054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017057 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017058 ipv6type=$i;
17059 ipv6lib=v6;
17060 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017061 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064
17065 ;;
17066 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017074#include <sys/param.h>
17075#ifdef _ZETA_MINAMI_INET6
17076yes
17077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017080 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017081 ipv6type=$i;
17082 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017083 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017084fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017086
17087 ;;
17088 esac
17089 if test "$ipv6type" != "unknown"; then
17090 break
17091 fi
17092 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017093 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17094echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017095fi
17096
17097if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17098 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17099 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17100 echo "using lib$ipv6lib"
17101 else
17102 if test $ipv6trylibc = "yes"; then
17103 echo "using libc"
17104 else
17105 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17106 echo "You need to fetch lib$ipv6lib.a from appropriate"
17107 echo 'ipv6 kit and compile beforehand.'
17108 exit 1
17109 fi
17110 fi
17111fi
17112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017113{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17114echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017115cat >conftest.$ac_ext <<_ACEOF
17116/* confdefs.h. */
17117_ACEOF
17118cat confdefs.h >>conftest.$ac_ext
17119cat >>conftest.$ac_ext <<_ACEOF
17120/* end confdefs.h. */
17121#include <Carbon/Carbon.h>
17122int
17123main ()
17124{
17125FSIORefNum fRef = 0
17126 ;
17127 return 0;
17128}
17129_ACEOF
17130rm -f conftest.$ac_objext
17131if { (ac_try="$ac_compile"
17132case "(($ac_try" in
17133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17134 *) ac_try_echo=$ac_try;;
17135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017137 (eval "$ac_compile") 2>conftest.er1
17138 ac_status=$?
17139 grep -v '^ *+' conftest.er1 >conftest.err
17140 rm -f conftest.er1
17141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017143 (exit $ac_status); } && {
17144 test -z "$ac_c_werror_flag" ||
17145 test ! -s conftest.err
17146 } && test -s conftest.$ac_objext; then
17147
17148cat >>confdefs.h <<\_ACEOF
17149#define HAVE_OSX105_SDK 1
17150_ACEOF
17151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017152 { echo "$as_me:$LINENO: result: yes" >&5
17153echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017155 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017156sed 's/^/| /' conftest.$ac_ext >&5
17157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017158 { echo "$as_me:$LINENO: result: no" >&5
17159echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017160
17161fi
17162
17163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17164
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017165# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017166{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17167echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017170if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 withval=$with_doc_strings;
17172fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017173
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017174
17175if test -z "$with_doc_strings"
17176then with_doc_strings="yes"
17177fi
17178if test "$with_doc_strings" != "no"
17179then
17180
17181cat >>confdefs.h <<\_ACEOF
17182#define WITH_DOC_STRINGS 1
17183_ACEOF
17184
17185fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017186{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17187echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017188
Neil Schemenauera35c6882001-02-27 04:45:05 +000017189# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017190{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17191echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017194if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017196if test "$withval" != no
17197then
17198
17199cat >>confdefs.h <<\_ACEOF
17200#define WITH_TSC 1
17201_ACEOF
17202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017203 { echo "$as_me:$LINENO: result: yes" >&5
17204echo "${ECHO_T}yes" >&6; }
17205else { echo "$as_me:$LINENO: result: no" >&5
17206echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017207fi
17208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017209 { echo "$as_me:$LINENO: result: no" >&5
17210echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211fi
17212
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017213
17214# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017215{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17216echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017219if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 withval=$with_pymalloc;
17221fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017222
Neil Schemenauera35c6882001-02-27 04:45:05 +000017223
Neil Schemenauer16c22972002-03-22 15:34:49 +000017224if test -z "$with_pymalloc"
17225then with_pymalloc="yes"
17226fi
17227if test "$with_pymalloc" != "no"
17228then
Martin v. Löwis11437992002-04-12 09:54:03 +000017229
17230cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017231#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017232_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017233
17234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017235{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17236echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017237
Benjamin Peterson05159c42009-12-03 03:01:27 +000017238# Check for Valgrind support
17239{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17240echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17241
17242# Check whether --with-valgrind was given.
17243if test "${with_valgrind+set}" = set; then
17244 withval=$with_valgrind;
17245else
17246 with_valgrind=no
17247fi
17248
17249{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17250echo "${ECHO_T}$with_valgrind" >&6; }
17251if test "$with_valgrind" != no; then
17252 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17253 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17254echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17255if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17256 echo $ECHO_N "(cached) $ECHO_C" >&6
17257fi
17258{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17259echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17260else
17261 # Is the header compilable?
17262{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17263echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17264cat >conftest.$ac_ext <<_ACEOF
17265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
17270$ac_includes_default
17271#include <valgrind/valgrind.h>
17272_ACEOF
17273rm -f conftest.$ac_objext
17274if { (ac_try="$ac_compile"
17275case "(($ac_try" in
17276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17277 *) ac_try_echo=$ac_try;;
17278esac
17279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17280 (eval "$ac_compile") 2>conftest.er1
17281 ac_status=$?
17282 grep -v '^ *+' conftest.er1 >conftest.err
17283 rm -f conftest.er1
17284 cat conftest.err >&5
17285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17286 (exit $ac_status); } && {
17287 test -z "$ac_c_werror_flag" ||
17288 test ! -s conftest.err
17289 } && test -s conftest.$ac_objext; then
17290 ac_header_compiler=yes
17291else
17292 echo "$as_me: failed program was:" >&5
17293sed 's/^/| /' conftest.$ac_ext >&5
17294
17295 ac_header_compiler=no
17296fi
17297
17298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17299{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17300echo "${ECHO_T}$ac_header_compiler" >&6; }
17301
17302# Is the header present?
17303{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17304echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17305cat >conftest.$ac_ext <<_ACEOF
17306/* confdefs.h. */
17307_ACEOF
17308cat confdefs.h >>conftest.$ac_ext
17309cat >>conftest.$ac_ext <<_ACEOF
17310/* end confdefs.h. */
17311#include <valgrind/valgrind.h>
17312_ACEOF
17313if { (ac_try="$ac_cpp conftest.$ac_ext"
17314case "(($ac_try" in
17315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316 *) ac_try_echo=$ac_try;;
17317esac
17318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17319 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17320 ac_status=$?
17321 grep -v '^ *+' conftest.er1 >conftest.err
17322 rm -f conftest.er1
17323 cat conftest.err >&5
17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325 (exit $ac_status); } >/dev/null && {
17326 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17327 test ! -s conftest.err
17328 }; then
17329 ac_header_preproc=yes
17330else
17331 echo "$as_me: failed program was:" >&5
17332sed 's/^/| /' conftest.$ac_ext >&5
17333
17334 ac_header_preproc=no
17335fi
17336
17337rm -f conftest.err conftest.$ac_ext
17338{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17339echo "${ECHO_T}$ac_header_preproc" >&6; }
17340
17341# So? What about this header?
17342case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17343 yes:no: )
17344 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17345echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17346 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17347echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17348 ac_header_preproc=yes
17349 ;;
17350 no:yes:* )
17351 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17352echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17353 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17354echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17355 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17356echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17357 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17358echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17359 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17360echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17361 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17362echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17363 ( cat <<\_ASBOX
17364## -------------------------------------- ##
17365## Report this to http://bugs.python.org/ ##
17366## -------------------------------------- ##
17367_ASBOX
17368 ) | sed "s/^/$as_me: WARNING: /" >&2
17369 ;;
17370esac
17371{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17372echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17373if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17374 echo $ECHO_N "(cached) $ECHO_C" >&6
17375else
17376 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17377fi
17378{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17379echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17380
17381fi
17382if test $ac_cv_header_valgrind_valgrind_h = yes; then
17383
17384cat >>confdefs.h <<\_ACEOF
17385#define WITH_VALGRIND 1
17386_ACEOF
17387
17388else
17389 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17390echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17391 { (exit 1); exit 1; }; }
17392
17393fi
17394
17395
17396fi
17397
Barry Warsawef82cd72000-06-30 16:21:01 +000017398# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017399{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17400echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017403if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017405if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017406then
17407
17408cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017409#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410_ACEOF
17411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017412 { echo "$as_me:$LINENO: result: yes" >&5
17413echo "${ECHO_T}yes" >&6; }
17414else { echo "$as_me:$LINENO: result: no" >&5
17415echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017416fi
17417else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017418 { echo "$as_me:$LINENO: result: no" >&5
17419echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420fi
17421
Barry Warsawef82cd72000-06-30 16:21:01 +000017422
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017423# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017424
Guido van Rossum98935bf2001-09-05 19:13:16 +000017425DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017426
Guido van Rossume97ee181999-12-20 21:27:22 +000017427# the dlopen() function means we might want to use dynload_shlib.o. some
17428# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017429
Thomas Wouters3a584202000-08-05 23:28:51 +000017430for ac_func in dlopen
17431do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17433{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017437else
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017439/* confdefs.h. */
17440_ACEOF
17441cat confdefs.h >>conftest.$ac_ext
17442cat >>conftest.$ac_ext <<_ACEOF
17443/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017444/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17446#define $ac_func innocuous_$ac_func
17447
Guido van Rossume97ee181999-12-20 21:27:22 +000017448/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017449 which can conflict with char $ac_func (); below.
17450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017451 <limits.h> exists even on freestanding compilers. */
17452
17453#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017454# include <limits.h>
17455#else
17456# include <assert.h>
17457#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017458
17459#undef $ac_func
17460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461/* Override any GCC internal prototype to avoid an error.
17462 Use char because int might match the return type of a GCC
17463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017464#ifdef __cplusplus
17465extern "C"
17466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017467char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017468/* The GNU C library defines this for functions which it implements
17469 to always fail with ENOSYS. Some functions are actually named
17470 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017472choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017473#endif
17474
Skip Montanaro6dead952003-09-25 14:50:04 +000017475int
17476main ()
17477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ;
17480 return 0;
17481}
17482_ACEOF
17483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484if { (ac_try="$ac_link"
17485case "(($ac_try" in
17486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17487 *) ac_try_echo=$ac_try;;
17488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017492 grep -v '^ *+' conftest.er1 >conftest.err
17493 rm -f conftest.er1
17494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 (exit $ac_status); } && {
17497 test -z "$ac_c_werror_flag" ||
17498 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017499 } && test -s conftest$ac_exeext &&
17500 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017504sed 's/^/| /' conftest.$ac_ext >&5
17505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508
17509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017510 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017511fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017512ac_res=`eval echo '${'$as_ac_var'}'`
17513 { echo "$as_me:$LINENO: result: $ac_res" >&5
17514echo "${ECHO_T}$ac_res" >&6; }
17515if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017517#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017518_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017519
Guido van Rossume97ee181999-12-20 21:27:22 +000017520fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017521done
Guido van Rossume97ee181999-12-20 21:27:22 +000017522
Michael W. Hudson54241132001-12-07 15:38:26 +000017523
Guido van Rossume97ee181999-12-20 21:27:22 +000017524# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17525# loading of modules.
17526
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017527{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17528echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017529if test -z "$DYNLOADFILE"
17530then
17531 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017532 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17533 if test "$ac_cv_func_dlopen" = yes
17534 then DYNLOADFILE="dynload_shlib.o"
17535 else DYNLOADFILE="dynload_aix.o"
17536 fi
17537 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017538 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017539 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17540 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017541 *)
17542 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17543 # out any dynamic loading
17544 if test "$ac_cv_func_dlopen" = yes
17545 then DYNLOADFILE="dynload_shlib.o"
17546 else DYNLOADFILE="dynload_stub.o"
17547 fi
17548 ;;
17549 esac
17550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017551{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17552echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017553if test "$DYNLOADFILE" != "dynload_stub.o"
17554then
Martin v. Löwis11437992002-04-12 09:54:03 +000017555
17556cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017557#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017558_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017559
17560fi
17561
Neil Schemenauer4e425612001-06-19 15:44:15 +000017562# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17563
Michael W. Hudson54241132001-12-07 15:38:26 +000017564
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017565{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17566echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017567if test -z "$MACHDEP_OBJS"
17568then
Jack Jansene578a632001-08-15 01:27:14 +000017569 MACHDEP_OBJS=$extra_machdep_objs
17570else
17571 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017573{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17574echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017575
Guido van Rossum627b2d71993-12-24 10:39:16 +000017576# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
Martin v. Löwisd6320502004-08-12 13:45:08 +000017648
Martin v. Löwisc3001752005-01-23 09:27:24 +000017649
17650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017651
17652
Thomas Wouterscf297e42007-02-23 15:07:44 +000017653
17654
Gregory P. Smith25523d22007-09-03 16:44:55 +000017655
Christian Heimes4e30a842007-11-30 22:12:06 +000017656
Martin v. Löwis92fab752008-03-08 10:40:41 +000017657
Martin v. Löwis823725e2008-03-24 13:39:54 +000017658
17659
Benjamin Peterson965ce872009-04-05 21:24:58 +000017660
17661
17662
17663
Martin v. Löwis011e8422009-05-05 04:43:17 +000017664
Martin v. Löwis113a0852009-05-29 17:25:39 +000017665
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017666
17667
17668
17669
Antoine Pitroub7572f02009-12-02 20:46:48 +000017670
Martin v. Löwis823725e2008-03-24 13:39:54 +000017671for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17672 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017673 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017674 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017675 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017676 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017677 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017678 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17679 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017680 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17681 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017682 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017683 truncate uname unsetenv utimes waitpid wait3 wait4 \
17684 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017685do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017691else
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017693/* confdefs.h. */
17694_ACEOF
17695cat confdefs.h >>conftest.$ac_ext
17696cat >>conftest.$ac_ext <<_ACEOF
17697/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017698/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17700#define $ac_func innocuous_$ac_func
17701
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017702/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017703 which can conflict with char $ac_func (); below.
17704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017705 <limits.h> exists even on freestanding compilers. */
17706
17707#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017708# include <limits.h>
17709#else
17710# include <assert.h>
17711#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017712
17713#undef $ac_func
17714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715/* Override any GCC internal prototype to avoid an error.
17716 Use char because int might match the return type of a GCC
17717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017718#ifdef __cplusplus
17719extern "C"
17720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017721char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017722/* The GNU C library defines this for functions which it implements
17723 to always fail with ENOSYS. Some functions are actually named
17724 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017726choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017727#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017728
Skip Montanaro6dead952003-09-25 14:50:04 +000017729int
17730main ()
17731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 ;
17734 return 0;
17735}
17736_ACEOF
17737rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738if { (ac_try="$ac_link"
17739case "(($ac_try" in
17740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17741 *) ac_try_echo=$ac_try;;
17742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017746 grep -v '^ *+' conftest.er1 >conftest.err
17747 rm -f conftest.er1
17748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 (exit $ac_status); } && {
17751 test -z "$ac_c_werror_flag" ||
17752 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017753 } && test -s conftest$ac_exeext &&
17754 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017756else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017758sed 's/^/| /' conftest.$ac_ext >&5
17759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762
17763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017764 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017766ac_res=`eval echo '${'$as_ac_var'}'`
17767 { echo "$as_me:$LINENO: result: $ac_res" >&5
17768echo "${ECHO_T}$ac_res" >&6; }
17769if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017772_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017773
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017774fi
17775done
17776
Michael W. Hudson54241132001-12-07 15:38:26 +000017777
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017778# For some functions, having a definition is not sufficient, since
17779# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017780{ echo "$as_me:$LINENO: checking for chroot" >&5
17781echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017783/* confdefs.h. */
17784_ACEOF
17785cat confdefs.h >>conftest.$ac_ext
17786cat >>conftest.$ac_ext <<_ACEOF
17787/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017788#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017789int
17790main ()
17791{
17792void *x=chroot
17793 ;
17794 return 0;
17795}
17796_ACEOF
17797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798if { (ac_try="$ac_compile"
17799case "(($ac_try" in
17800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17801 *) ac_try_echo=$ac_try;;
17802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017806 grep -v '^ *+' conftest.er1 >conftest.err
17807 rm -f conftest.er1
17808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810 (exit $ac_status); } && {
17811 test -z "$ac_c_werror_flag" ||
17812 test ! -s conftest.err
17813 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017814
17815cat >>confdefs.h <<\_ACEOF
17816#define HAVE_CHROOT 1
17817_ACEOF
17818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017819 { echo "$as_me:$LINENO: result: yes" >&5
17820echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017823sed 's/^/| /' conftest.$ac_ext >&5
17824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017825 { echo "$as_me:$LINENO: result: no" >&5
17826echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017827
17828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829
17830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017831{ echo "$as_me:$LINENO: checking for link" >&5
17832echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017834/* confdefs.h. */
17835_ACEOF
17836cat confdefs.h >>conftest.$ac_ext
17837cat >>conftest.$ac_ext <<_ACEOF
17838/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017839#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017840int
17841main ()
17842{
17843void *x=link
17844 ;
17845 return 0;
17846}
17847_ACEOF
17848rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849if { (ac_try="$ac_compile"
17850case "(($ac_try" in
17851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17852 *) ac_try_echo=$ac_try;;
17853esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017857 grep -v '^ *+' conftest.er1 >conftest.err
17858 rm -f conftest.er1
17859 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861 (exit $ac_status); } && {
17862 test -z "$ac_c_werror_flag" ||
17863 test ! -s conftest.err
17864 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017865
17866cat >>confdefs.h <<\_ACEOF
17867#define HAVE_LINK 1
17868_ACEOF
17869
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017870 { echo "$as_me:$LINENO: result: yes" >&5
17871echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017874sed 's/^/| /' conftest.$ac_ext >&5
17875
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017876 { echo "$as_me:$LINENO: result: no" >&5
17877echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017878
17879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880
17881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017882{ echo "$as_me:$LINENO: checking for symlink" >&5
17883echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017885/* confdefs.h. */
17886_ACEOF
17887cat confdefs.h >>conftest.$ac_ext
17888cat >>conftest.$ac_ext <<_ACEOF
17889/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017890#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017891int
17892main ()
17893{
17894void *x=symlink
17895 ;
17896 return 0;
17897}
17898_ACEOF
17899rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900if { (ac_try="$ac_compile"
17901case "(($ac_try" in
17902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17903 *) ac_try_echo=$ac_try;;
17904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908 grep -v '^ *+' conftest.er1 >conftest.err
17909 rm -f conftest.er1
17910 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 (exit $ac_status); } && {
17913 test -z "$ac_c_werror_flag" ||
17914 test ! -s conftest.err
17915 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017916
17917cat >>confdefs.h <<\_ACEOF
17918#define HAVE_SYMLINK 1
17919_ACEOF
17920
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017921 { echo "$as_me:$LINENO: result: yes" >&5
17922echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017925sed 's/^/| /' conftest.$ac_ext >&5
17926
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017927 { echo "$as_me:$LINENO: result: no" >&5
17928echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017929
17930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931
17932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017933{ echo "$as_me:$LINENO: checking for fchdir" >&5
17934echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017936/* confdefs.h. */
17937_ACEOF
17938cat confdefs.h >>conftest.$ac_ext
17939cat >>conftest.$ac_ext <<_ACEOF
17940/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017941#include <unistd.h>
17942int
17943main ()
17944{
17945void *x=fchdir
17946 ;
17947 return 0;
17948}
17949_ACEOF
17950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951if { (ac_try="$ac_compile"
17952case "(($ac_try" in
17953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17954 *) ac_try_echo=$ac_try;;
17955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017959 grep -v '^ *+' conftest.er1 >conftest.err
17960 rm -f conftest.er1
17961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 (exit $ac_status); } && {
17964 test -z "$ac_c_werror_flag" ||
17965 test ! -s conftest.err
17966 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017967
17968cat >>confdefs.h <<\_ACEOF
17969#define HAVE_FCHDIR 1
17970_ACEOF
17971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017972 { echo "$as_me:$LINENO: result: yes" >&5
17973echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017976sed 's/^/| /' conftest.$ac_ext >&5
17977
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017978 { echo "$as_me:$LINENO: result: no" >&5
17979echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017980
17981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982
17983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017984{ echo "$as_me:$LINENO: checking for fsync" >&5
17985echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017987/* confdefs.h. */
17988_ACEOF
17989cat confdefs.h >>conftest.$ac_ext
17990cat >>conftest.$ac_ext <<_ACEOF
17991/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017992#include <unistd.h>
17993int
17994main ()
17995{
17996void *x=fsync
17997 ;
17998 return 0;
17999}
18000_ACEOF
18001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002if { (ac_try="$ac_compile"
18003case "(($ac_try" in
18004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18005 *) ac_try_echo=$ac_try;;
18006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018010 grep -v '^ *+' conftest.er1 >conftest.err
18011 rm -f conftest.er1
18012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 (exit $ac_status); } && {
18015 test -z "$ac_c_werror_flag" ||
18016 test ! -s conftest.err
18017 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018018
18019cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018020#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018021_ACEOF
18022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018023 { echo "$as_me:$LINENO: result: yes" >&5
18024echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018027sed 's/^/| /' conftest.$ac_ext >&5
18028
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018029 { echo "$as_me:$LINENO: result: no" >&5
18030echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018031
18032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033
18034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018035{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18036echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018038/* confdefs.h. */
18039_ACEOF
18040cat confdefs.h >>conftest.$ac_ext
18041cat >>conftest.$ac_ext <<_ACEOF
18042/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018043#include <unistd.h>
18044int
18045main ()
18046{
18047void *x=fdatasync
18048 ;
18049 return 0;
18050}
18051_ACEOF
18052rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053if { (ac_try="$ac_compile"
18054case "(($ac_try" in
18055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18056 *) ac_try_echo=$ac_try;;
18057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018061 grep -v '^ *+' conftest.er1 >conftest.err
18062 rm -f conftest.er1
18063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065 (exit $ac_status); } && {
18066 test -z "$ac_c_werror_flag" ||
18067 test ! -s conftest.err
18068 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018069
18070cat >>confdefs.h <<\_ACEOF
18071#define HAVE_FDATASYNC 1
18072_ACEOF
18073
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018074 { echo "$as_me:$LINENO: result: yes" >&5
18075echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018078sed 's/^/| /' conftest.$ac_ext >&5
18079
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018080 { echo "$as_me:$LINENO: result: no" >&5
18081echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018082
18083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084
18085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018086{ echo "$as_me:$LINENO: checking for epoll" >&5
18087echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018088cat >conftest.$ac_ext <<_ACEOF
18089/* confdefs.h. */
18090_ACEOF
18091cat confdefs.h >>conftest.$ac_ext
18092cat >>conftest.$ac_ext <<_ACEOF
18093/* end confdefs.h. */
18094#include <sys/epoll.h>
18095int
18096main ()
18097{
18098void *x=epoll_create
18099 ;
18100 return 0;
18101}
18102_ACEOF
18103rm -f conftest.$ac_objext
18104if { (ac_try="$ac_compile"
18105case "(($ac_try" in
18106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18107 *) ac_try_echo=$ac_try;;
18108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018110 (eval "$ac_compile") 2>conftest.er1
18111 ac_status=$?
18112 grep -v '^ *+' conftest.er1 >conftest.err
18113 rm -f conftest.er1
18114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018116 (exit $ac_status); } && {
18117 test -z "$ac_c_werror_flag" ||
18118 test ! -s conftest.err
18119 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018120
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018121cat >>confdefs.h <<\_ACEOF
18122#define HAVE_EPOLL 1
18123_ACEOF
18124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125 { echo "$as_me:$LINENO: result: yes" >&5
18126echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018128 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018129sed 's/^/| /' conftest.$ac_ext >&5
18130
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018131 { echo "$as_me:$LINENO: result: no" >&5
18132echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018133
18134fi
18135
18136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018137{ echo "$as_me:$LINENO: checking for kqueue" >&5
18138echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018139cat >conftest.$ac_ext <<_ACEOF
18140/* confdefs.h. */
18141_ACEOF
18142cat confdefs.h >>conftest.$ac_ext
18143cat >>conftest.$ac_ext <<_ACEOF
18144/* end confdefs.h. */
18145
18146#include <sys/types.h>
18147#include <sys/event.h>
18148
18149int
18150main ()
18151{
18152int x=kqueue()
18153 ;
18154 return 0;
18155}
18156_ACEOF
18157rm -f conftest.$ac_objext
18158if { (ac_try="$ac_compile"
18159case "(($ac_try" in
18160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18161 *) ac_try_echo=$ac_try;;
18162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018164 (eval "$ac_compile") 2>conftest.er1
18165 ac_status=$?
18166 grep -v '^ *+' conftest.er1 >conftest.err
18167 rm -f conftest.er1
18168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018170 (exit $ac_status); } && {
18171 test -z "$ac_c_werror_flag" ||
18172 test ! -s conftest.err
18173 } && test -s conftest.$ac_objext; then
18174
18175cat >>confdefs.h <<\_ACEOF
18176#define HAVE_KQUEUE 1
18177_ACEOF
18178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018179 { echo "$as_me:$LINENO: result: yes" >&5
18180echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018183sed 's/^/| /' conftest.$ac_ext >&5
18184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018185 { echo "$as_me:$LINENO: result: no" >&5
18186echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018187
18188fi
18189
18190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018191# On some systems (eg. FreeBSD 5), we would find a definition of the
18192# functions ctermid_r, setgroups in the library, but no prototype
18193# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18194# address to avoid compiler warnings and potential miscompilations
18195# because of the missing prototypes.
18196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18198echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018200/* confdefs.h. */
18201_ACEOF
18202cat confdefs.h >>conftest.$ac_ext
18203cat >>conftest.$ac_ext <<_ACEOF
18204/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018205
18206#include "confdefs.h"
18207#include <stdio.h>
18208
Martin v. Löwisd5843682002-11-21 20:41:28 +000018209int
18210main ()
18211{
18212void* p = ctermid_r
18213 ;
18214 return 0;
18215}
18216_ACEOF
18217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218if { (ac_try="$ac_compile"
18219case "(($ac_try" in
18220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18221 *) ac_try_echo=$ac_try;;
18222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230 (exit $ac_status); } && {
18231 test -z "$ac_c_werror_flag" ||
18232 test ! -s conftest.err
18233 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018234
18235cat >>confdefs.h <<\_ACEOF
18236#define HAVE_CTERMID_R 1
18237_ACEOF
18238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239 { echo "$as_me:$LINENO: result: yes" >&5
18240echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018243sed 's/^/| /' conftest.$ac_ext >&5
18244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018245 { echo "$as_me:$LINENO: result: no" >&5
18246echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018247
18248fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252{ echo "$as_me:$LINENO: checking for flock" >&5
18253echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018255/* confdefs.h. */
18256_ACEOF
18257cat confdefs.h >>conftest.$ac_ext
18258cat >>conftest.$ac_ext <<_ACEOF
18259/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018260
18261#include "confdefs.h"
18262#include <sys/file.h>
18263
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018264int
18265main ()
18266{
18267void* p = flock
18268 ;
18269 return 0;
18270}
18271_ACEOF
18272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273if { (ac_try="$ac_compile"
18274case "(($ac_try" in
18275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276 *) ac_try_echo=$ac_try;;
18277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285 (exit $ac_status); } && {
18286 test -z "$ac_c_werror_flag" ||
18287 test ! -s conftest.err
18288 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018289
18290cat >>confdefs.h <<\_ACEOF
18291#define HAVE_FLOCK 1
18292_ACEOF
18293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294 { echo "$as_me:$LINENO: result: yes" >&5
18295echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018298sed 's/^/| /' conftest.$ac_ext >&5
18299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018300 { echo "$as_me:$LINENO: result: no" >&5
18301echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018302
18303fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018307{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18308echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018310/* confdefs.h. */
18311_ACEOF
18312cat confdefs.h >>conftest.$ac_ext
18313cat >>conftest.$ac_ext <<_ACEOF
18314/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018315
18316#include "confdefs.h"
18317#include <unistd.h>
18318
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018319int
18320main ()
18321{
18322void* p = getpagesize
18323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328if { (ac_try="$ac_compile"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018344
18345cat >>confdefs.h <<\_ACEOF
18346#define HAVE_GETPAGESIZE 1
18347_ACEOF
18348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349 { echo "$as_me:$LINENO: result: yes" >&5
18350echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018353sed 's/^/| /' conftest.$ac_ext >&5
18354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018355 { echo "$as_me:$LINENO: result: no" >&5
18356echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018357
18358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359
18360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018361
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018362for ac_prog in true
18363do
18364 # Extract the first word of "$ac_prog", so it can be a program name with args.
18365set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018368if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018370else
18371 if test -n "$TRUE"; then
18372 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18373else
18374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18375for as_dir in $PATH
18376do
18377 IFS=$as_save_IFS
18378 test -z "$as_dir" && as_dir=.
18379 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380 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 +000018381 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018383 break 2
18384 fi
18385done
18386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018388
18389fi
18390fi
18391TRUE=$ac_cv_prog_TRUE
18392if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018393 { echo "$as_me:$LINENO: result: $TRUE" >&5
18394echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018396 { echo "$as_me:$LINENO: result: no" >&5
18397echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018398fi
18399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018401 test -n "$TRUE" && break
18402done
18403test -n "$TRUE" || TRUE="/bin/true"
18404
18405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018406{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18407echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018408if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018410else
18411 ac_check_lib_save_LIBS=$LIBS
18412LIBS="-lc $LIBS"
18413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018414/* confdefs.h. */
18415_ACEOF
18416cat confdefs.h >>conftest.$ac_ext
18417cat >>conftest.$ac_ext <<_ACEOF
18418/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420/* Override any GCC internal prototype to avoid an error.
18421 Use char because int might match the return type of a GCC
18422 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018423#ifdef __cplusplus
18424extern "C"
18425#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018426char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018427int
18428main ()
18429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018431 ;
18432 return 0;
18433}
18434_ACEOF
18435rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436if { (ac_try="$ac_link"
18437case "(($ac_try" in
18438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18439 *) ac_try_echo=$ac_try;;
18440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018444 grep -v '^ *+' conftest.er1 >conftest.err
18445 rm -f conftest.er1
18446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 (exit $ac_status); } && {
18449 test -z "$ac_c_werror_flag" ||
18450 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451 } && test -s conftest$ac_exeext &&
18452 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018453 ac_cv_lib_c_inet_aton=yes
18454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018456sed 's/^/| /' conftest.$ac_ext >&5
18457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460
18461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018463LIBS=$ac_check_lib_save_LIBS
18464fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18466echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18467if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018468 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018469else
18470
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018471{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18472echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018473if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018475else
18476 ac_check_lib_save_LIBS=$LIBS
18477LIBS="-lresolv $LIBS"
18478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018479/* confdefs.h. */
18480_ACEOF
18481cat confdefs.h >>conftest.$ac_ext
18482cat >>conftest.$ac_ext <<_ACEOF
18483/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485/* Override any GCC internal prototype to avoid an error.
18486 Use char because int might match the return type of a GCC
18487 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018488#ifdef __cplusplus
18489extern "C"
18490#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018491char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018492int
18493main ()
18494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496 ;
18497 return 0;
18498}
18499_ACEOF
18500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501if { (ac_try="$ac_link"
18502case "(($ac_try" in
18503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504 *) ac_try_echo=$ac_try;;
18505esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516 } && test -s conftest$ac_exeext &&
18517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018518 ac_cv_lib_resolv_inet_aton=yes
18519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018521sed 's/^/| /' conftest.$ac_ext >&5
18522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525
18526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528LIBS=$ac_check_lib_save_LIBS
18529fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018530{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18531echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18532if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018533 cat >>confdefs.h <<_ACEOF
18534#define HAVE_LIBRESOLV 1
18535_ACEOF
18536
18537 LIBS="-lresolv $LIBS"
18538
18539fi
18540
18541
18542fi
18543
18544
Christian Heimesd0764e22007-12-04 15:00:33 +000018545# On Tru64, chflags seems to be present, but calling it will
18546# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018547{ echo "$as_me:$LINENO: checking for chflags" >&5
18548echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018549if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018551else
18552 if test "$cross_compiling" = yes; then
18553 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018554else
18555 cat >conftest.$ac_ext <<_ACEOF
18556/* confdefs.h. */
18557_ACEOF
18558cat confdefs.h >>conftest.$ac_ext
18559cat >>conftest.$ac_ext <<_ACEOF
18560/* end confdefs.h. */
18561
18562#include <sys/stat.h>
18563#include <unistd.h>
18564int main(int argc, char*argv[])
18565{
18566 if(chflags(argv[0], 0) != 0)
18567 return 1;
18568 return 0;
18569}
18570
18571_ACEOF
18572rm -f conftest$ac_exeext
18573if { (ac_try="$ac_link"
18574case "(($ac_try" in
18575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18576 *) ac_try_echo=$ac_try;;
18577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018579 (eval "$ac_link") 2>&5
18580 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18583 { (case "(($ac_try" in
18584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18585 *) ac_try_echo=$ac_try;;
18586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018588 (eval "$ac_try") 2>&5
18589 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018591 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018592 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018594 echo "$as_me: program exited with status $ac_status" >&5
18595echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018596sed 's/^/| /' conftest.$ac_ext >&5
18597
18598( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018599ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018600fi
18601rm -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 +000018602fi
18603
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018604
18605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018606fi
18607
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018608{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18609echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018610if test $ac_cv_have_chflags = yes
18611then
18612
18613cat >>confdefs.h <<\_ACEOF
18614#define HAVE_CHFLAGS 1
18615_ACEOF
18616
18617fi
18618
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018619{ echo "$as_me:$LINENO: checking for lchflags" >&5
18620echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018621if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018622 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018623else
18624 if test "$cross_compiling" = yes; then
18625 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018626else
18627 cat >conftest.$ac_ext <<_ACEOF
18628/* confdefs.h. */
18629_ACEOF
18630cat confdefs.h >>conftest.$ac_ext
18631cat >>conftest.$ac_ext <<_ACEOF
18632/* end confdefs.h. */
18633
18634#include <sys/stat.h>
18635#include <unistd.h>
18636int main(int argc, char*argv[])
18637{
18638 if(lchflags(argv[0], 0) != 0)
18639 return 1;
18640 return 0;
18641}
18642
18643_ACEOF
18644rm -f conftest$ac_exeext
18645if { (ac_try="$ac_link"
18646case "(($ac_try" in
18647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18648 *) ac_try_echo=$ac_try;;
18649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018651 (eval "$ac_link") 2>&5
18652 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18655 { (case "(($ac_try" in
18656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18657 *) ac_try_echo=$ac_try;;
18658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018660 (eval "$ac_try") 2>&5
18661 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018663 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018664 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018665else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018666 echo "$as_me: program exited with status $ac_status" >&5
18667echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018668sed 's/^/| /' conftest.$ac_ext >&5
18669
18670( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018671ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018672fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18674fi
18675
18676
Christian Heimesd0764e22007-12-04 15:00:33 +000018677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018678fi
18679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018680{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18681echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018682if test $ac_cv_have_lchflags = yes
18683then
18684
18685cat >>confdefs.h <<\_ACEOF
18686#define HAVE_LCHFLAGS 1
18687_ACEOF
18688
18689fi
18690
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018691case $ac_sys_system/$ac_sys_release in
18692Darwin/*)
18693 _CUR_CFLAGS="${CFLAGS}"
18694 _CUR_LDFLAGS="${LDFLAGS}"
18695 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18696 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18697 ;;
18698esac
18699
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018700{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18701echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018702if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018703 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018704else
18705 ac_check_lib_save_LIBS=$LIBS
18706LIBS="-lz $LIBS"
18707cat >conftest.$ac_ext <<_ACEOF
18708/* confdefs.h. */
18709_ACEOF
18710cat confdefs.h >>conftest.$ac_ext
18711cat >>conftest.$ac_ext <<_ACEOF
18712/* end confdefs.h. */
18713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714/* Override any GCC internal prototype to avoid an error.
18715 Use char because int might match the return type of a GCC
18716 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018717#ifdef __cplusplus
18718extern "C"
18719#endif
18720char inflateCopy ();
18721int
18722main ()
18723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730if { (ac_try="$ac_link"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018736 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018737 ac_status=$?
18738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018742 (exit $ac_status); } && {
18743 test -z "$ac_c_werror_flag" ||
18744 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018745 } && test -s conftest$ac_exeext &&
18746 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018747 ac_cv_lib_z_inflateCopy=yes
18748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018749 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018750sed 's/^/| /' conftest.$ac_ext >&5
18751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018754
18755rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018756 conftest$ac_exeext conftest.$ac_ext
18757LIBS=$ac_check_lib_save_LIBS
18758fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018759{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18760echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18761if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018762
18763cat >>confdefs.h <<\_ACEOF
18764#define HAVE_ZLIB_COPY 1
18765_ACEOF
18766
18767fi
18768
18769
18770case $ac_sys_system/$ac_sys_release in
18771Darwin/*)
18772 CFLAGS="${_CUR_CFLAGS}"
18773 LDFLAGS="${_CUR_LDFLAGS}"
18774 ;;
18775esac
18776
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018777{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18778echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018780/* confdefs.h. */
18781_ACEOF
18782cat confdefs.h >>conftest.$ac_ext
18783cat >>conftest.$ac_ext <<_ACEOF
18784/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018785
18786#include "confdefs.h"
18787#include <netdb.h>
18788
Martin v. Löwise9416172003-05-03 10:12:45 +000018789int
18790main ()
18791{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018792void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018793 ;
18794 return 0;
18795}
18796_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798if { (ac_try="$ac_link"
18799case "(($ac_try" in
18800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18801 *) ac_try_echo=$ac_try;;
18802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018806 grep -v '^ *+' conftest.er1 >conftest.err
18807 rm -f conftest.er1
18808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018810 (exit $ac_status); } && {
18811 test -z "$ac_c_werror_flag" ||
18812 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018813 } && test -s conftest$ac_exeext &&
18814 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018815
18816cat >>confdefs.h <<\_ACEOF
18817#define HAVE_HSTRERROR 1
18818_ACEOF
18819
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018820 { echo "$as_me:$LINENO: result: yes" >&5
18821echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018824sed 's/^/| /' conftest.$ac_ext >&5
18825
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018826 { echo "$as_me:$LINENO: result: no" >&5
18827echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018828
18829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018830
18831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018833
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018834{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18835echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018836cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018837/* confdefs.h. */
18838_ACEOF
18839cat confdefs.h >>conftest.$ac_ext
18840cat >>conftest.$ac_ext <<_ACEOF
18841/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018842
18843#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018844#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018845#include <sys/socket.h>
18846#include <netinet/in.h>
18847#include <arpa/inet.h>
18848
Martin v. Löwise9416172003-05-03 10:12:45 +000018849int
18850main ()
18851{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018852void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018853 ;
18854 return 0;
18855}
18856_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018857rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018858if { (ac_try="$ac_link"
18859case "(($ac_try" in
18860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18861 *) ac_try_echo=$ac_try;;
18862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018864 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018866 grep -v '^ *+' conftest.er1 >conftest.err
18867 rm -f conftest.er1
18868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018870 (exit $ac_status); } && {
18871 test -z "$ac_c_werror_flag" ||
18872 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018873 } && test -s conftest$ac_exeext &&
18874 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018875
18876cat >>confdefs.h <<\_ACEOF
18877#define HAVE_INET_ATON 1
18878_ACEOF
18879
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018880 { echo "$as_me:$LINENO: result: yes" >&5
18881echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018882else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018884sed 's/^/| /' conftest.$ac_ext >&5
18885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018886 { echo "$as_me:$LINENO: result: no" >&5
18887echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018888
18889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018890
18891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018894{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18895echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018897/* confdefs.h. */
18898_ACEOF
18899cat confdefs.h >>conftest.$ac_ext
18900cat >>conftest.$ac_ext <<_ACEOF
18901/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018902
18903#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018904#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018905#include <sys/socket.h>
18906#include <netinet/in.h>
18907#include <arpa/inet.h>
18908
Martin v. Löwise9416172003-05-03 10:12:45 +000018909int
18910main ()
18911{
18912void* p = inet_pton
18913 ;
18914 return 0;
18915}
18916_ACEOF
18917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918if { (ac_try="$ac_compile"
18919case "(($ac_try" in
18920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18921 *) ac_try_echo=$ac_try;;
18922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018926 grep -v '^ *+' conftest.er1 >conftest.err
18927 rm -f conftest.er1
18928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930 (exit $ac_status); } && {
18931 test -z "$ac_c_werror_flag" ||
18932 test ! -s conftest.err
18933 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018934
18935cat >>confdefs.h <<\_ACEOF
18936#define HAVE_INET_PTON 1
18937_ACEOF
18938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018939 { echo "$as_me:$LINENO: result: yes" >&5
18940echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018943sed 's/^/| /' conftest.$ac_ext >&5
18944
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018945 { echo "$as_me:$LINENO: result: no" >&5
18946echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018947
18948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949
18950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018951
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018952# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018953{ echo "$as_me:$LINENO: checking for setgroups" >&5
18954echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018956/* confdefs.h. */
18957_ACEOF
18958cat confdefs.h >>conftest.$ac_ext
18959cat >>conftest.$ac_ext <<_ACEOF
18960/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018961
18962#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018963#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018964#ifdef HAVE_GRP_H
18965#include <grp.h>
18966#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018967
Martin v. Löwisd5843682002-11-21 20:41:28 +000018968int
18969main ()
18970{
18971void* p = setgroups
18972 ;
18973 return 0;
18974}
18975_ACEOF
18976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018977if { (ac_try="$ac_compile"
18978case "(($ac_try" in
18979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18980 *) ac_try_echo=$ac_try;;
18981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018985 grep -v '^ *+' conftest.er1 >conftest.err
18986 rm -f conftest.er1
18987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018989 (exit $ac_status); } && {
18990 test -z "$ac_c_werror_flag" ||
18991 test ! -s conftest.err
18992 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018993
18994cat >>confdefs.h <<\_ACEOF
18995#define HAVE_SETGROUPS 1
18996_ACEOF
18997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018998 { echo "$as_me:$LINENO: result: yes" >&5
18999echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019002sed 's/^/| /' conftest.$ac_ext >&5
19003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019004 { echo "$as_me:$LINENO: result: no" >&5
19005echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019006
19007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019008
19009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019010
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019011# check for openpty and forkpty
19012
Martin v. Löwis11437992002-04-12 09:54:03 +000019013
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019014for ac_func in openpty
19015do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019016as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19017{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19018echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019019if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019021else
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019023/* confdefs.h. */
19024_ACEOF
19025cat confdefs.h >>conftest.$ac_ext
19026cat >>conftest.$ac_ext <<_ACEOF
19027/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019028/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19029 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19030#define $ac_func innocuous_$ac_func
19031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019032/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019033 which can conflict with char $ac_func (); below.
19034 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019035 <limits.h> exists even on freestanding compilers. */
19036
19037#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019038# include <limits.h>
19039#else
19040# include <assert.h>
19041#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019042
19043#undef $ac_func
19044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019045/* Override any GCC internal prototype to avoid an error.
19046 Use char because int might match the return type of a GCC
19047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019048#ifdef __cplusplus
19049extern "C"
19050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019051char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019052/* The GNU C library defines this for functions which it implements
19053 to always fail with ENOSYS. Some functions are actually named
19054 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019055#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019056choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019057#endif
19058
Skip Montanaro6dead952003-09-25 14:50:04 +000019059int
19060main ()
19061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019062return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 ;
19064 return 0;
19065}
19066_ACEOF
19067rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019068if { (ac_try="$ac_link"
19069case "(($ac_try" in
19070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19071 *) ac_try_echo=$ac_try;;
19072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019076 grep -v '^ *+' conftest.er1 >conftest.err
19077 rm -f conftest.er1
19078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080 (exit $ac_status); } && {
19081 test -z "$ac_c_werror_flag" ||
19082 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019083 } && test -s conftest$ac_exeext &&
19084 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019088sed 's/^/| /' conftest.$ac_ext >&5
19089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019092
19093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019094 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019096ac_res=`eval echo '${'$as_ac_var'}'`
19097 { echo "$as_me:$LINENO: result: $ac_res" >&5
19098echo "${ECHO_T}$ac_res" >&6; }
19099if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019100 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019101#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019102_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019103
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019105 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19106echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019107if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019108 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019109else
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019111LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019113/* confdefs.h. */
19114_ACEOF
19115cat confdefs.h >>conftest.$ac_ext
19116cat >>conftest.$ac_ext <<_ACEOF
19117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119/* Override any GCC internal prototype to avoid an error.
19120 Use char because int might match the return type of a GCC
19121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019122#ifdef __cplusplus
19123extern "C"
19124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019125char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019126int
19127main ()
19128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019129return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 ;
19131 return 0;
19132}
19133_ACEOF
19134rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019135if { (ac_try="$ac_link"
19136case "(($ac_try" in
19137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19138 *) ac_try_echo=$ac_try;;
19139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019143 grep -v '^ *+' conftest.er1 >conftest.err
19144 rm -f conftest.er1
19145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019147 (exit $ac_status); } && {
19148 test -z "$ac_c_werror_flag" ||
19149 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019150 } && test -s conftest$ac_exeext &&
19151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019152 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019153else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019155sed 's/^/| /' conftest.$ac_ext >&5
19156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019157 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159
19160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019162LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019163fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019164{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19165echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19166if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019168#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019169_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019170 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019172 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19173echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019174if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019176else
19177 ac_check_lib_save_LIBS=$LIBS
19178LIBS="-lbsd $LIBS"
19179cat >conftest.$ac_ext <<_ACEOF
19180/* confdefs.h. */
19181_ACEOF
19182cat confdefs.h >>conftest.$ac_ext
19183cat >>conftest.$ac_ext <<_ACEOF
19184/* end confdefs.h. */
19185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019186/* Override any GCC internal prototype to avoid an error.
19187 Use char because int might match the return type of a GCC
19188 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019189#ifdef __cplusplus
19190extern "C"
19191#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019192char openpty ();
19193int
19194main ()
19195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019196return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019197 ;
19198 return 0;
19199}
19200_ACEOF
19201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019202if { (ac_try="$ac_link"
19203case "(($ac_try" in
19204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19205 *) ac_try_echo=$ac_try;;
19206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019209 ac_status=$?
19210 grep -v '^ *+' conftest.er1 >conftest.err
19211 rm -f conftest.er1
19212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019214 (exit $ac_status); } && {
19215 test -z "$ac_c_werror_flag" ||
19216 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019217 } && test -s conftest$ac_exeext &&
19218 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019219 ac_cv_lib_bsd_openpty=yes
19220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019221 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019222sed 's/^/| /' conftest.$ac_ext >&5
19223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019224 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019226
19227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019228 conftest$ac_exeext conftest.$ac_ext
19229LIBS=$ac_check_lib_save_LIBS
19230fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019231{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19232echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19233if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019234 cat >>confdefs.h <<\_ACEOF
19235#define HAVE_OPENPTY 1
19236_ACEOF
19237 LIBS="$LIBS -lbsd"
19238fi
19239
19240
19241fi
19242
Fred Drake8cef4cf2000-06-28 16:40:38 +000019243
19244fi
19245done
19246
Martin v. Löwis11437992002-04-12 09:54:03 +000019247
Fred Drake8cef4cf2000-06-28 16:40:38 +000019248for ac_func in forkpty
19249do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019250as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19251{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19252echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019253if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019254 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019255else
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019257/* confdefs.h. */
19258_ACEOF
19259cat confdefs.h >>conftest.$ac_ext
19260cat >>conftest.$ac_ext <<_ACEOF
19261/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019262/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19264#define $ac_func innocuous_$ac_func
19265
Fred Drake8cef4cf2000-06-28 16:40:38 +000019266/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019267 which can conflict with char $ac_func (); below.
19268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019269 <limits.h> exists even on freestanding compilers. */
19270
19271#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019272# include <limits.h>
19273#else
19274# include <assert.h>
19275#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019276
19277#undef $ac_func
19278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019279/* Override any GCC internal prototype to avoid an error.
19280 Use char because int might match the return type of a GCC
19281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019282#ifdef __cplusplus
19283extern "C"
19284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019285char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019286/* The GNU C library defines this for functions which it implements
19287 to always fail with ENOSYS. Some functions are actually named
19288 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019289#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019290choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019291#endif
19292
Skip Montanaro6dead952003-09-25 14:50:04 +000019293int
19294main ()
19295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019296return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019297 ;
19298 return 0;
19299}
19300_ACEOF
19301rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019302if { (ac_try="$ac_link"
19303case "(($ac_try" in
19304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19305 *) ac_try_echo=$ac_try;;
19306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019308 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019310 grep -v '^ *+' conftest.er1 >conftest.err
19311 rm -f conftest.er1
19312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019314 (exit $ac_status); } && {
19315 test -z "$ac_c_werror_flag" ||
19316 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019317 } && test -s conftest$ac_exeext &&
19318 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019320else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019322sed 's/^/| /' conftest.$ac_ext >&5
19323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019324 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019326
19327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019328 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019330ac_res=`eval echo '${'$as_ac_var'}'`
19331 { echo "$as_me:$LINENO: result: $ac_res" >&5
19332echo "${ECHO_T}$ac_res" >&6; }
19333if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019334 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019336_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019337
Fred Drake8cef4cf2000-06-28 16:40:38 +000019338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019339 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19340echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019341if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019342 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019343else
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019345LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019347/* confdefs.h. */
19348_ACEOF
19349cat confdefs.h >>conftest.$ac_ext
19350cat >>conftest.$ac_ext <<_ACEOF
19351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019353/* Override any GCC internal prototype to avoid an error.
19354 Use char because int might match the return type of a GCC
19355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019356#ifdef __cplusplus
19357extern "C"
19358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019359char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019360int
19361main ()
19362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019363return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 ;
19365 return 0;
19366}
19367_ACEOF
19368rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019369if { (ac_try="$ac_link"
19370case "(($ac_try" in
19371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19372 *) ac_try_echo=$ac_try;;
19373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019377 grep -v '^ *+' conftest.er1 >conftest.err
19378 rm -f conftest.er1
19379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381 (exit $ac_status); } && {
19382 test -z "$ac_c_werror_flag" ||
19383 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019384 } && test -s conftest$ac_exeext &&
19385 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019386 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019389sed 's/^/| /' conftest.$ac_ext >&5
19390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019391 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019393
19394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019396LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019397fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019398{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19399echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19400if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019402#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019403_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019404 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019406 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19407echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019408if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019410else
19411 ac_check_lib_save_LIBS=$LIBS
19412LIBS="-lbsd $LIBS"
19413cat >conftest.$ac_ext <<_ACEOF
19414/* confdefs.h. */
19415_ACEOF
19416cat confdefs.h >>conftest.$ac_ext
19417cat >>conftest.$ac_ext <<_ACEOF
19418/* end confdefs.h. */
19419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019420/* Override any GCC internal prototype to avoid an error.
19421 Use char because int might match the return type of a GCC
19422 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019423#ifdef __cplusplus
19424extern "C"
19425#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019426char forkpty ();
19427int
19428main ()
19429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019430return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019431 ;
19432 return 0;
19433}
19434_ACEOF
19435rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019436if { (ac_try="$ac_link"
19437case "(($ac_try" in
19438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19439 *) ac_try_echo=$ac_try;;
19440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019442 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019443 ac_status=$?
19444 grep -v '^ *+' conftest.er1 >conftest.err
19445 rm -f conftest.er1
19446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019448 (exit $ac_status); } && {
19449 test -z "$ac_c_werror_flag" ||
19450 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019451 } && test -s conftest$ac_exeext &&
19452 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019453 ac_cv_lib_bsd_forkpty=yes
19454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019455 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019456sed 's/^/| /' conftest.$ac_ext >&5
19457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019458 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019460
19461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019462 conftest$ac_exeext conftest.$ac_ext
19463LIBS=$ac_check_lib_save_LIBS
19464fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019465{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19466echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19467if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019468 cat >>confdefs.h <<\_ACEOF
19469#define HAVE_FORKPTY 1
19470_ACEOF
19471 LIBS="$LIBS -lbsd"
19472fi
19473
19474
19475fi
19476
Fred Drake8cef4cf2000-06-28 16:40:38 +000019477
19478fi
19479done
19480
Jack Jansendd19cf82001-12-06 22:36:17 +000019481
Christian Heimesb186d002008-03-18 15:15:01 +000019482# Stuff for expat.
19483
19484for ac_func in memmove
19485do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019486as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19487{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19488echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019489if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019490 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019491else
19492 cat >conftest.$ac_ext <<_ACEOF
19493/* confdefs.h. */
19494_ACEOF
19495cat confdefs.h >>conftest.$ac_ext
19496cat >>conftest.$ac_ext <<_ACEOF
19497/* end confdefs.h. */
19498/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19500#define $ac_func innocuous_$ac_func
19501
19502/* System header to define __stub macros and hopefully few prototypes,
19503 which can conflict with char $ac_func (); below.
19504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19505 <limits.h> exists even on freestanding compilers. */
19506
19507#ifdef __STDC__
19508# include <limits.h>
19509#else
19510# include <assert.h>
19511#endif
19512
19513#undef $ac_func
19514
19515/* Override any GCC internal prototype to avoid an error.
19516 Use char because int might match the return type of a GCC
19517 builtin and then its argument prototype would still apply. */
19518#ifdef __cplusplus
19519extern "C"
19520#endif
19521char $ac_func ();
19522/* The GNU C library defines this for functions which it implements
19523 to always fail with ENOSYS. Some functions are actually named
19524 something starting with __ and the normal name is an alias. */
19525#if defined __stub_$ac_func || defined __stub___$ac_func
19526choke me
19527#endif
19528
19529int
19530main ()
19531{
19532return $ac_func ();
19533 ;
19534 return 0;
19535}
19536_ACEOF
19537rm -f conftest.$ac_objext conftest$ac_exeext
19538if { (ac_try="$ac_link"
19539case "(($ac_try" in
19540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19541 *) ac_try_echo=$ac_try;;
19542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019544 (eval "$ac_link") 2>conftest.er1
19545 ac_status=$?
19546 grep -v '^ *+' conftest.er1 >conftest.err
19547 rm -f conftest.er1
19548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019550 (exit $ac_status); } && {
19551 test -z "$ac_c_werror_flag" ||
19552 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019553 } && test -s conftest$ac_exeext &&
19554 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019555 eval "$as_ac_var=yes"
19556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019557 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019558sed 's/^/| /' conftest.$ac_ext >&5
19559
19560 eval "$as_ac_var=no"
19561fi
19562
19563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19564 conftest$ac_exeext conftest.$ac_ext
19565fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019566ac_res=`eval echo '${'$as_ac_var'}'`
19567 { echo "$as_me:$LINENO: result: $ac_res" >&5
19568echo "${ECHO_T}$ac_res" >&6; }
19569if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019570 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019572_ACEOF
19573
19574fi
19575done
19576
19577
Michael W. Hudson54241132001-12-07 15:38:26 +000019578# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019579
19580
19581
19582
19583
19584
Fred Drake8cef4cf2000-06-28 16:40:38 +000019585for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19586do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019587as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19588{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19589echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019590if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019592else
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019599/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19600 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19601#define $ac_func innocuous_$ac_func
19602
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019603/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019604 which can conflict with char $ac_func (); below.
19605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019606 <limits.h> exists even on freestanding compilers. */
19607
19608#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019609# include <limits.h>
19610#else
19611# include <assert.h>
19612#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019613
19614#undef $ac_func
19615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019616/* Override any GCC internal prototype to avoid an error.
19617 Use char because int might match the return type of a GCC
19618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019619#ifdef __cplusplus
19620extern "C"
19621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019622char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019623/* The GNU C library defines this for functions which it implements
19624 to always fail with ENOSYS. Some functions are actually named
19625 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019626#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019627choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019628#endif
19629
Skip Montanaro6dead952003-09-25 14:50:04 +000019630int
19631main ()
19632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ;
19635 return 0;
19636}
19637_ACEOF
19638rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019639if { (ac_try="$ac_link"
19640case "(($ac_try" in
19641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19642 *) ac_try_echo=$ac_try;;
19643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019647 grep -v '^ *+' conftest.er1 >conftest.err
19648 rm -f conftest.er1
19649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019651 (exit $ac_status); } && {
19652 test -z "$ac_c_werror_flag" ||
19653 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019654 } && test -s conftest$ac_exeext &&
19655 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019659sed 's/^/| /' conftest.$ac_ext >&5
19660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663
19664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019665 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019667ac_res=`eval echo '${'$as_ac_var'}'`
19668 { echo "$as_me:$LINENO: result: $ac_res" >&5
19669echo "${ECHO_T}$ac_res" >&6; }
19670if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019672#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019673_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019675fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019676done
19677
Michael W. Hudson54241132001-12-07 15:38:26 +000019678
Martin v. Löwis11437992002-04-12 09:54:03 +000019679
19680
19681
Christian Heimesb186d002008-03-18 15:15:01 +000019682for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019683do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019684as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19685{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19686echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019687if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019689else
Martin v. Löwis11437992002-04-12 09:54:03 +000019690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019691/* confdefs.h. */
19692_ACEOF
19693cat confdefs.h >>conftest.$ac_ext
19694cat >>conftest.$ac_ext <<_ACEOF
19695/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019696/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19697 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19698#define $ac_func innocuous_$ac_func
19699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019700/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019701 which can conflict with char $ac_func (); below.
19702 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019703 <limits.h> exists even on freestanding compilers. */
19704
19705#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019706# include <limits.h>
19707#else
19708# include <assert.h>
19709#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019710
19711#undef $ac_func
19712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019713/* Override any GCC internal prototype to avoid an error.
19714 Use char because int might match the return type of a GCC
19715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019716#ifdef __cplusplus
19717extern "C"
19718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019719char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019720/* The GNU C library defines this for functions which it implements
19721 to always fail with ENOSYS. Some functions are actually named
19722 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019723#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019724choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019725#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019726
Skip Montanaro6dead952003-09-25 14:50:04 +000019727int
19728main ()
19729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019730return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 ;
19732 return 0;
19733}
19734_ACEOF
19735rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019736if { (ac_try="$ac_link"
19737case "(($ac_try" in
19738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19739 *) ac_try_echo=$ac_try;;
19740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019742 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019744 grep -v '^ *+' conftest.er1 >conftest.err
19745 rm -f conftest.er1
19746 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019748 (exit $ac_status); } && {
19749 test -z "$ac_c_werror_flag" ||
19750 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019751 } && test -s conftest$ac_exeext &&
19752 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019753 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019756sed 's/^/| /' conftest.$ac_ext >&5
19757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019758 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019760
19761rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019763fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019764ac_res=`eval echo '${'$as_ac_var'}'`
19765 { echo "$as_me:$LINENO: result: $ac_res" >&5
19766echo "${ECHO_T}$ac_res" >&6; }
19767if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019768 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019769#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019770_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019771
Martin v. Löwis1142de32002-03-29 16:28:31 +000019772else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019774 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019775 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19776 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019777esac
19778
Martin v. Löwis1142de32002-03-29 16:28:31 +000019779fi
19780done
19781
19782
Martin v. Löwis11437992002-04-12 09:54:03 +000019783
Martin v. Löwis1142de32002-03-29 16:28:31 +000019784for ac_func in getpgrp
19785do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019786as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19787{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19788echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019789if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019791else
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019793/* confdefs.h. */
19794_ACEOF
19795cat confdefs.h >>conftest.$ac_ext
19796cat >>conftest.$ac_ext <<_ACEOF
19797/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019798/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19799 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19800#define $ac_func innocuous_$ac_func
19801
Martin v. Löwis1142de32002-03-29 16:28:31 +000019802/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019803 which can conflict with char $ac_func (); below.
19804 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019805 <limits.h> exists even on freestanding compilers. */
19806
19807#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019808# include <limits.h>
19809#else
19810# include <assert.h>
19811#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019812
19813#undef $ac_func
19814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019815/* Override any GCC internal prototype to avoid an error.
19816 Use char because int might match the return type of a GCC
19817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019818#ifdef __cplusplus
19819extern "C"
19820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019821char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019822/* The GNU C library defines this for functions which it implements
19823 to always fail with ENOSYS. Some functions are actually named
19824 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019826choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019827#endif
19828
Skip Montanaro6dead952003-09-25 14:50:04 +000019829int
19830main ()
19831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019832return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 ;
19834 return 0;
19835}
19836_ACEOF
19837rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019838if { (ac_try="$ac_link"
19839case "(($ac_try" in
19840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19841 *) ac_try_echo=$ac_try;;
19842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019844 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019846 grep -v '^ *+' conftest.er1 >conftest.err
19847 rm -f conftest.er1
19848 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019850 (exit $ac_status); } && {
19851 test -z "$ac_c_werror_flag" ||
19852 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019853 } && test -s conftest$ac_exeext &&
19854 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019855 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019858sed 's/^/| /' conftest.$ac_ext >&5
19859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019860 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862
19863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019864 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019865fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019866ac_res=`eval echo '${'$as_ac_var'}'`
19867 { echo "$as_me:$LINENO: result: $ac_res" >&5
19868echo "${ECHO_T}$ac_res" >&6; }
19869if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019870 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019871#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019872_ACEOF
19873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019874/* confdefs.h. */
19875_ACEOF
19876cat confdefs.h >>conftest.$ac_ext
19877cat >>conftest.$ac_ext <<_ACEOF
19878/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019879#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019880int
19881main ()
19882{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019883getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 ;
19885 return 0;
19886}
19887_ACEOF
19888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889if { (ac_try="$ac_compile"
19890case "(($ac_try" in
19891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19892 *) ac_try_echo=$ac_try;;
19893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019897 grep -v '^ *+' conftest.er1 >conftest.err
19898 rm -f conftest.er1
19899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019901 (exit $ac_status); } && {
19902 test -z "$ac_c_werror_flag" ||
19903 test ! -s conftest.err
19904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019905
19906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019907#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019908_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019909
Martin v. Löwis11437992002-04-12 09:54:03 +000019910
Guido van Rossumf78abae1997-01-21 22:02:36 +000019911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019913sed 's/^/| /' conftest.$ac_ext >&5
19914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019915
Guido van Rossum627b2d71993-12-24 10:39:16 +000019916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019917
19918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019919
Guido van Rossum627b2d71993-12-24 10:39:16 +000019920fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019921done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019922
Jack Jansen150753c2003-03-29 22:07:47 +000019923
19924for ac_func in setpgrp
19925do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019926as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19927{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19928echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019929if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019931else
Martin v. Löwis11437992002-04-12 09:54:03 +000019932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019933/* confdefs.h. */
19934_ACEOF
19935cat confdefs.h >>conftest.$ac_ext
19936cat >>conftest.$ac_ext <<_ACEOF
19937/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019938/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19939 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19940#define $ac_func innocuous_$ac_func
19941
Jack Jansen150753c2003-03-29 22:07:47 +000019942/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019943 which can conflict with char $ac_func (); below.
19944 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019945 <limits.h> exists even on freestanding compilers. */
19946
19947#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019948# include <limits.h>
19949#else
19950# include <assert.h>
19951#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019952
19953#undef $ac_func
19954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019955/* Override any GCC internal prototype to avoid an error.
19956 Use char because int might match the return type of a GCC
19957 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019958#ifdef __cplusplus
19959extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019960#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019961char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019962/* The GNU C library defines this for functions which it implements
19963 to always fail with ENOSYS. Some functions are actually named
19964 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019965#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019966choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019967#endif
19968
Skip Montanaro6dead952003-09-25 14:50:04 +000019969int
19970main ()
19971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019972return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019973 ;
19974 return 0;
19975}
19976_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019977rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019978if { (ac_try="$ac_link"
19979case "(($ac_try" in
19980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19981 *) ac_try_echo=$ac_try;;
19982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019984 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019986 grep -v '^ *+' conftest.er1 >conftest.err
19987 rm -f conftest.er1
19988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019990 (exit $ac_status); } && {
19991 test -z "$ac_c_werror_flag" ||
19992 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019993 } && test -s conftest$ac_exeext &&
19994 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019995 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019998sed 's/^/| /' conftest.$ac_ext >&5
19999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020000 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002
20003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020004 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020005fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020006ac_res=`eval echo '${'$as_ac_var'}'`
20007 { echo "$as_me:$LINENO: result: $ac_res" >&5
20008echo "${ECHO_T}$ac_res" >&6; }
20009if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020010 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020011#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020012_ACEOF
20013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020014/* confdefs.h. */
20015_ACEOF
20016cat confdefs.h >>conftest.$ac_ext
20017cat >>conftest.$ac_ext <<_ACEOF
20018/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020019#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020020int
20021main ()
20022{
20023setpgrp(0,0);
20024 ;
20025 return 0;
20026}
20027_ACEOF
20028rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020029if { (ac_try="$ac_compile"
20030case "(($ac_try" in
20031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20032 *) ac_try_echo=$ac_try;;
20033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020035 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020037 grep -v '^ *+' conftest.er1 >conftest.err
20038 rm -f conftest.er1
20039 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020041 (exit $ac_status); } && {
20042 test -z "$ac_c_werror_flag" ||
20043 test ! -s conftest.err
20044 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020045
20046cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020047#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020048_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020049
Jack Jansen150753c2003-03-29 22:07:47 +000020050
20051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020053sed 's/^/| /' conftest.$ac_ext >&5
20054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020055
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020057
20058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020059
20060fi
20061done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020062
Martin v. Löwis11437992002-04-12 09:54:03 +000020063
Thomas Wouters3a584202000-08-05 23:28:51 +000020064for ac_func in gettimeofday
20065do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20067{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020069if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020070 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020071else
Martin v. Löwis11437992002-04-12 09:54:03 +000020072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020073/* confdefs.h. */
20074_ACEOF
20075cat confdefs.h >>conftest.$ac_ext
20076cat >>conftest.$ac_ext <<_ACEOF
20077/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020078/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20079 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20080#define $ac_func innocuous_$ac_func
20081
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020082/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020083 which can conflict with char $ac_func (); below.
20084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020085 <limits.h> exists even on freestanding compilers. */
20086
20087#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020088# include <limits.h>
20089#else
20090# include <assert.h>
20091#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020092
20093#undef $ac_func
20094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020095/* Override any GCC internal prototype to avoid an error.
20096 Use char because int might match the return type of a GCC
20097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020098#ifdef __cplusplus
20099extern "C"
20100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020101char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020102/* The GNU C library defines this for functions which it implements
20103 to always fail with ENOSYS. Some functions are actually named
20104 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020105#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020106choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020107#endif
20108
Skip Montanaro6dead952003-09-25 14:50:04 +000020109int
20110main ()
20111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020112return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020118if { (ac_try="$ac_link"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020124 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020126 grep -v '^ *+' conftest.er1 >conftest.err
20127 rm -f conftest.er1
20128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130 (exit $ac_status); } && {
20131 test -z "$ac_c_werror_flag" ||
20132 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020133 } && test -s conftest$ac_exeext &&
20134 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020135 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020138sed 's/^/| /' conftest.$ac_ext >&5
20139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020140 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142
20143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020144 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020146ac_res=`eval echo '${'$as_ac_var'}'`
20147 { echo "$as_me:$LINENO: result: $ac_res" >&5
20148echo "${ECHO_T}$ac_res" >&6; }
20149if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020150 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020152_ACEOF
20153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020154/* confdefs.h. */
20155_ACEOF
20156cat confdefs.h >>conftest.$ac_ext
20157cat >>conftest.$ac_ext <<_ACEOF
20158/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020159#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020160int
20161main ()
20162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020163gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 ;
20165 return 0;
20166}
20167_ACEOF
20168rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169if { (ac_try="$ac_compile"
20170case "(($ac_try" in
20171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20172 *) ac_try_echo=$ac_try;;
20173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177 grep -v '^ *+' conftest.er1 >conftest.err
20178 rm -f conftest.er1
20179 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 (exit $ac_status); } && {
20182 test -z "$ac_c_werror_flag" ||
20183 test ! -s conftest.err
20184 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020185 :
20186else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020188sed 's/^/| /' conftest.$ac_ext >&5
20189
Martin v. Löwis11437992002-04-12 09:54:03 +000020190
20191cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020193_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020194
Martin v. Löwis11437992002-04-12 09:54:03 +000020195
Guido van Rossum627b2d71993-12-24 10:39:16 +000020196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197
20198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020200fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020201done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020202
Michael W. Hudson54241132001-12-07 15:38:26 +000020203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204{ echo "$as_me:$LINENO: checking for major" >&5
20205echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020212
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020213#if defined(MAJOR_IN_MKDEV)
20214#include <sys/mkdev.h>
20215#elif defined(MAJOR_IN_SYSMACROS)
20216#include <sys/sysmacros.h>
20217#else
20218#include <sys/types.h>
20219#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020220
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020221int
20222main ()
20223{
20224
20225 makedev(major(0),minor(0));
20226
20227 ;
20228 return 0;
20229}
20230_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020231rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020232if { (ac_try="$ac_link"
20233case "(($ac_try" in
20234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20235 *) ac_try_echo=$ac_try;;
20236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020238 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020240 grep -v '^ *+' conftest.er1 >conftest.err
20241 rm -f conftest.er1
20242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020244 (exit $ac_status); } && {
20245 test -z "$ac_c_werror_flag" ||
20246 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020247 } && test -s conftest$ac_exeext &&
20248 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020249
20250
20251cat >>confdefs.h <<\_ACEOF
20252#define HAVE_DEVICE_MACROS 1
20253_ACEOF
20254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020255 { echo "$as_me:$LINENO: result: yes" >&5
20256echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020257
20258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020262
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020263 { echo "$as_me:$LINENO: result: no" >&5
20264echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020265
20266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020267
20268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020269 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020270
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020271# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020272# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020273{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20274echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020276/* confdefs.h. */
20277_ACEOF
20278cat confdefs.h >>conftest.$ac_ext
20279cat >>conftest.$ac_ext <<_ACEOF
20280/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020281
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020282#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020283#include <sys/socket.h>
20284#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020285#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020286
Martin v. Löwis11437992002-04-12 09:54:03 +000020287int
20288main ()
20289{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020290getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 ;
20292 return 0;
20293}
20294_ACEOF
20295rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296if { (ac_try="$ac_link"
20297case "(($ac_try" in
20298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20299 *) ac_try_echo=$ac_try;;
20300esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304 grep -v '^ *+' conftest.er1 >conftest.err
20305 rm -f conftest.er1
20306 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020308 (exit $ac_status); } && {
20309 test -z "$ac_c_werror_flag" ||
20310 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020311 } && test -s conftest$ac_exeext &&
20312 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020313 have_getaddrinfo=yes
20314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020315 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020316sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020318 have_getaddrinfo=no
20319fi
20320
20321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20322 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020323{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20324echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020325if test $have_getaddrinfo = yes
20326then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020327 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20328echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020329 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020330 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020331else
20332 if test "$cross_compiling" = yes; then
20333 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020334else
Martin v. Löwis11437992002-04-12 09:54:03 +000020335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020336/* confdefs.h. */
20337_ACEOF
20338cat confdefs.h >>conftest.$ac_ext
20339cat >>conftest.$ac_ext <<_ACEOF
20340/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020341
20342#include <sys/types.h>
20343#include <netdb.h>
20344#include <string.h>
20345#include <sys/socket.h>
20346#include <netinet/in.h>
20347
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020348int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020349{
20350 int passive, gaierr, inet4 = 0, inet6 = 0;
20351 struct addrinfo hints, *ai, *aitop;
20352 char straddr[INET6_ADDRSTRLEN], strport[16];
20353
20354 for (passive = 0; passive <= 1; passive++) {
20355 memset(&hints, 0, sizeof(hints));
20356 hints.ai_family = AF_UNSPEC;
20357 hints.ai_flags = passive ? AI_PASSIVE : 0;
20358 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020359 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020360 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20361 (void)gai_strerror(gaierr);
20362 goto bad;
20363 }
20364 for (ai = aitop; ai; ai = ai->ai_next) {
20365 if (ai->ai_addr == NULL ||
20366 ai->ai_addrlen == 0 ||
20367 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20368 straddr, sizeof(straddr), strport, sizeof(strport),
20369 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20370 goto bad;
20371 }
20372 switch (ai->ai_family) {
20373 case AF_INET:
20374 if (strcmp(strport, "54321") != 0) {
20375 goto bad;
20376 }
20377 if (passive) {
20378 if (strcmp(straddr, "0.0.0.0") != 0) {
20379 goto bad;
20380 }
20381 } else {
20382 if (strcmp(straddr, "127.0.0.1") != 0) {
20383 goto bad;
20384 }
20385 }
20386 inet4++;
20387 break;
20388 case AF_INET6:
20389 if (strcmp(strport, "54321") != 0) {
20390 goto bad;
20391 }
20392 if (passive) {
20393 if (strcmp(straddr, "::") != 0) {
20394 goto bad;
20395 }
20396 } else {
20397 if (strcmp(straddr, "::1") != 0) {
20398 goto bad;
20399 }
20400 }
20401 inet6++;
20402 break;
20403 case AF_UNSPEC:
20404 goto bad;
20405 break;
20406 default:
20407 /* another family support? */
20408 break;
20409 }
20410 }
20411 }
20412
20413 if (!(inet4 == 0 || inet4 == 2))
20414 goto bad;
20415 if (!(inet6 == 0 || inet6 == 2))
20416 goto bad;
20417
20418 if (aitop)
20419 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020420 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020421
20422 bad:
20423 if (aitop)
20424 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020425 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020426}
20427
Martin v. Löwis11437992002-04-12 09:54:03 +000020428_ACEOF
20429rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020430if { (ac_try="$ac_link"
20431case "(($ac_try" in
20432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20433 *) ac_try_echo=$ac_try;;
20434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020436 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020437 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440 { (case "(($ac_try" in
20441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20442 *) ac_try_echo=$ac_try;;
20443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020445 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020446 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020449 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020451 echo "$as_me: program exited with status $ac_status" >&5
20452echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020453sed 's/^/| /' conftest.$ac_ext >&5
20454
Martin v. Löwis11437992002-04-12 09:54:03 +000020455( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020456ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020458rm -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 +000020459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020460
20461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020462fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020463
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020465
Mark Dickinson2df5d282009-12-31 21:22:50 +000020466if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020467then
20468 if test $ipv6 = yes
20469 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020470 echo 'Fatal: You must get working getaddrinfo() function.'
20471 echo ' or you can specify "--disable-ipv6"'.
20472 exit 1
20473 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020474else
Martin v. Löwis11437992002-04-12 09:54:03 +000020475
20476cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020477#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020478_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020479
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020481
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020482for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020483do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020488 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020489else
Martin v. Löwis11437992002-04-12 09:54:03 +000020490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020491/* confdefs.h. */
20492_ACEOF
20493cat confdefs.h >>conftest.$ac_ext
20494cat >>conftest.$ac_ext <<_ACEOF
20495/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20498#define $ac_func innocuous_$ac_func
20499
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020500/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020501 which can conflict with char $ac_func (); below.
20502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020503 <limits.h> exists even on freestanding compilers. */
20504
20505#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020506# include <limits.h>
20507#else
20508# include <assert.h>
20509#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020510
20511#undef $ac_func
20512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020513/* Override any GCC internal prototype to avoid an error.
20514 Use char because int might match the return type of a GCC
20515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020516#ifdef __cplusplus
20517extern "C"
20518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020519char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020520/* The GNU C library defines this for functions which it implements
20521 to always fail with ENOSYS. Some functions are actually named
20522 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020523#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020524choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020525#endif
20526
Skip Montanaro6dead952003-09-25 14:50:04 +000020527int
20528main ()
20529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020530return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 ;
20532 return 0;
20533}
20534_ACEOF
20535rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536if { (ac_try="$ac_link"
20537case "(($ac_try" in
20538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20539 *) ac_try_echo=$ac_try;;
20540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544 grep -v '^ *+' conftest.er1 >conftest.err
20545 rm -f conftest.er1
20546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 (exit $ac_status); } && {
20549 test -z "$ac_c_werror_flag" ||
20550 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020551 } && test -s conftest$ac_exeext &&
20552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020556sed 's/^/| /' conftest.$ac_ext >&5
20557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020558 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020560
20561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020562 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020564ac_res=`eval echo '${'$as_ac_var'}'`
20565 { echo "$as_me:$LINENO: result: $ac_res" >&5
20566echo "${ECHO_T}$ac_res" >&6; }
20567if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020568 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020570_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020571
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020572fi
20573done
20574
Michael W. Hudson54241132001-12-07 15:38:26 +000020575
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020576# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020577{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20578echo $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 +000020579if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020581else
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020583/* confdefs.h. */
20584_ACEOF
20585cat confdefs.h >>conftest.$ac_ext
20586cat >>conftest.$ac_ext <<_ACEOF
20587/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020588#include <sys/types.h>
20589#include <sys/time.h>
20590#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020591
Martin v. Löwis11437992002-04-12 09:54:03 +000020592int
20593main ()
20594{
20595if ((struct tm *) 0)
20596return 0;
20597 ;
20598 return 0;
20599}
20600_ACEOF
20601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020602if { (ac_try="$ac_compile"
20603case "(($ac_try" in
20604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20605 *) ac_try_echo=$ac_try;;
20606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020610 grep -v '^ *+' conftest.er1 >conftest.err
20611 rm -f conftest.er1
20612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020614 (exit $ac_status); } && {
20615 test -z "$ac_c_werror_flag" ||
20616 test ! -s conftest.err
20617 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020618 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020621sed 's/^/| /' conftest.$ac_ext >&5
20622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020623 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625
20626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020627fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020628{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20629echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020630if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020631
20632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020633#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020635
20636fi
20637
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020638{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20639echo $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 +000020640if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020642else
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020649#include <sys/types.h>
20650#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020651
Martin v. Löwis11437992002-04-12 09:54:03 +000020652int
20653main ()
20654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020655struct tm tm;
20656 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020657 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020658 ;
20659 return 0;
20660}
20661_ACEOF
20662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663if { (ac_try="$ac_compile"
20664case "(($ac_try" in
20665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20666 *) ac_try_echo=$ac_try;;
20667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020671 grep -v '^ *+' conftest.er1 >conftest.err
20672 rm -f conftest.er1
20673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020675 (exit $ac_status); } && {
20676 test -z "$ac_c_werror_flag" ||
20677 test ! -s conftest.err
20678 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020679 ac_cv_struct_tm=time.h
20680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020682sed 's/^/| /' conftest.$ac_ext >&5
20683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020684 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686
20687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020689{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20690echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020691if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020692
20693cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020695_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020696
20697fi
20698
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020699{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20700echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020701if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020703else
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020705/* confdefs.h. */
20706_ACEOF
20707cat confdefs.h >>conftest.$ac_ext
20708cat >>conftest.$ac_ext <<_ACEOF
20709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020710#include <sys/types.h>
20711#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020712
20713
Martin v. Löwis11437992002-04-12 09:54:03 +000020714int
20715main ()
20716{
20717static struct tm ac_aggr;
20718if (ac_aggr.tm_zone)
20719return 0;
20720 ;
20721 return 0;
20722}
20723_ACEOF
20724rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020725if { (ac_try="$ac_compile"
20726case "(($ac_try" in
20727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20728 *) ac_try_echo=$ac_try;;
20729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020733 grep -v '^ *+' conftest.er1 >conftest.err
20734 rm -f conftest.er1
20735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737 (exit $ac_status); } && {
20738 test -z "$ac_c_werror_flag" ||
20739 test ! -s conftest.err
20740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020741 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020744sed 's/^/| /' conftest.$ac_ext >&5
20745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020747/* confdefs.h. */
20748_ACEOF
20749cat confdefs.h >>conftest.$ac_ext
20750cat >>conftest.$ac_ext <<_ACEOF
20751/* end confdefs.h. */
20752#include <sys/types.h>
20753#include <$ac_cv_struct_tm>
20754
20755
20756int
20757main ()
20758{
20759static struct tm ac_aggr;
20760if (sizeof ac_aggr.tm_zone)
20761return 0;
20762 ;
20763 return 0;
20764}
20765_ACEOF
20766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020767if { (ac_try="$ac_compile"
20768case "(($ac_try" in
20769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20770 *) ac_try_echo=$ac_try;;
20771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020773 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020775 grep -v '^ *+' conftest.er1 >conftest.err
20776 rm -f conftest.er1
20777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779 (exit $ac_status); } && {
20780 test -z "$ac_c_werror_flag" ||
20781 test ! -s conftest.err
20782 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020783 ac_cv_member_struct_tm_tm_zone=yes
20784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020786sed 's/^/| /' conftest.$ac_ext >&5
20787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020788 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020790
20791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793
20794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020795fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020796{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20797echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20798if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020799
20800cat >>confdefs.h <<_ACEOF
20801#define HAVE_STRUCT_TM_TM_ZONE 1
20802_ACEOF
20803
20804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020806
Martin v. Löwis11437992002-04-12 09:54:03 +000020807if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20808
20809cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020811_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020812
20813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020814 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20815echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020816if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020817 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020818else
20819 cat >conftest.$ac_ext <<_ACEOF
20820/* confdefs.h. */
20821_ACEOF
20822cat confdefs.h >>conftest.$ac_ext
20823cat >>conftest.$ac_ext <<_ACEOF
20824/* end confdefs.h. */
20825#include <time.h>
20826
20827int
20828main ()
20829{
20830#ifndef tzname
20831 (void) tzname;
20832#endif
20833
20834 ;
20835 return 0;
20836}
20837_ACEOF
20838rm -f conftest.$ac_objext
20839if { (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
20846 ac_status=$?
20847 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
20855 ac_cv_have_decl_tzname=yes
20856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858sed 's/^/| /' conftest.$ac_ext >&5
20859
20860 ac_cv_have_decl_tzname=no
20861fi
20862
20863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20864fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020865{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20866echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20867if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020868
20869cat >>confdefs.h <<_ACEOF
20870#define HAVE_DECL_TZNAME 1
20871_ACEOF
20872
20873
20874else
20875 cat >>confdefs.h <<_ACEOF
20876#define HAVE_DECL_TZNAME 0
20877_ACEOF
20878
20879
20880fi
20881
20882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020883 { echo "$as_me:$LINENO: checking for tzname" >&5
20884echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020885if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887else
Martin v. Löwis11437992002-04-12 09:54:03 +000020888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020889/* confdefs.h. */
20890_ACEOF
20891cat confdefs.h >>conftest.$ac_ext
20892cat >>conftest.$ac_ext <<_ACEOF
20893/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020894#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020895#if !HAVE_DECL_TZNAME
20896extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020898
Martin v. Löwis11437992002-04-12 09:54:03 +000020899int
20900main ()
20901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020903 ;
20904 return 0;
20905}
20906_ACEOF
20907rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908if { (ac_try="$ac_link"
20909case "(($ac_try" in
20910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20911 *) ac_try_echo=$ac_try;;
20912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020916 grep -v '^ *+' conftest.er1 >conftest.err
20917 rm -f conftest.er1
20918 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 (exit $ac_status); } && {
20921 test -z "$ac_c_werror_flag" ||
20922 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020923 } && test -s conftest$ac_exeext &&
20924 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925 ac_cv_var_tzname=yes
20926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020928sed 's/^/| /' conftest.$ac_ext >&5
20929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932
20933rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020934 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020935fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020936{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20937echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020938 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020939
20940cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020941#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020942_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020943
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020944 fi
20945fi
20946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020947{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20948echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020949if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020951else
20952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020953/* confdefs.h. */
20954_ACEOF
20955cat confdefs.h >>conftest.$ac_ext
20956cat >>conftest.$ac_ext <<_ACEOF
20957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020958$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020959int
20960main ()
20961{
20962static struct stat ac_aggr;
20963if (ac_aggr.st_rdev)
20964return 0;
20965 ;
20966 return 0;
20967}
20968_ACEOF
20969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020970if { (ac_try="$ac_compile"
20971case "(($ac_try" in
20972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20973 *) ac_try_echo=$ac_try;;
20974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020978 grep -v '^ *+' conftest.er1 >conftest.err
20979 rm -f conftest.er1
20980 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020982 (exit $ac_status); } && {
20983 test -z "$ac_c_werror_flag" ||
20984 test ! -s conftest.err
20985 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020986 ac_cv_member_struct_stat_st_rdev=yes
20987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020989sed 's/^/| /' conftest.$ac_ext >&5
20990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020992/* confdefs.h. */
20993_ACEOF
20994cat confdefs.h >>conftest.$ac_ext
20995cat >>conftest.$ac_ext <<_ACEOF
20996/* end confdefs.h. */
20997$ac_includes_default
20998int
20999main ()
21000{
21001static struct stat ac_aggr;
21002if (sizeof ac_aggr.st_rdev)
21003return 0;
21004 ;
21005 return 0;
21006}
21007_ACEOF
21008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021009if { (ac_try="$ac_compile"
21010case "(($ac_try" in
21011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21012 *) ac_try_echo=$ac_try;;
21013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021015 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021017 grep -v '^ *+' conftest.er1 >conftest.err
21018 rm -f conftest.er1
21019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021021 (exit $ac_status); } && {
21022 test -z "$ac_c_werror_flag" ||
21023 test ! -s conftest.err
21024 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021025 ac_cv_member_struct_stat_st_rdev=yes
21026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021028sed 's/^/| /' conftest.$ac_ext >&5
21029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021030 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032
21033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021035
21036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021037fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021038{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21039echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21040if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021041
21042cat >>confdefs.h <<_ACEOF
21043#define HAVE_STRUCT_STAT_ST_RDEV 1
21044_ACEOF
21045
21046
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021047fi
21048
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021049{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21050echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021051if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021053else
Martin v. Löwis11437992002-04-12 09:54:03 +000021054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021055/* confdefs.h. */
21056_ACEOF
21057cat confdefs.h >>conftest.$ac_ext
21058cat >>conftest.$ac_ext <<_ACEOF
21059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021060$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021061int
21062main ()
21063{
21064static struct stat ac_aggr;
21065if (ac_aggr.st_blksize)
21066return 0;
21067 ;
21068 return 0;
21069}
21070_ACEOF
21071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021072if { (ac_try="$ac_compile"
21073case "(($ac_try" in
21074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21075 *) ac_try_echo=$ac_try;;
21076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021080 grep -v '^ *+' conftest.er1 >conftest.err
21081 rm -f conftest.er1
21082 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084 (exit $ac_status); } && {
21085 test -z "$ac_c_werror_flag" ||
21086 test ! -s conftest.err
21087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021088 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021091sed 's/^/| /' conftest.$ac_ext >&5
21092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021094/* confdefs.h. */
21095_ACEOF
21096cat confdefs.h >>conftest.$ac_ext
21097cat >>conftest.$ac_ext <<_ACEOF
21098/* end confdefs.h. */
21099$ac_includes_default
21100int
21101main ()
21102{
21103static struct stat ac_aggr;
21104if (sizeof ac_aggr.st_blksize)
21105return 0;
21106 ;
21107 return 0;
21108}
21109_ACEOF
21110rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021111if { (ac_try="$ac_compile"
21112case "(($ac_try" in
21113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21114 *) ac_try_echo=$ac_try;;
21115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021117 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021119 grep -v '^ *+' conftest.er1 >conftest.err
21120 rm -f conftest.er1
21121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021123 (exit $ac_status); } && {
21124 test -z "$ac_c_werror_flag" ||
21125 test ! -s conftest.err
21126 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021127 ac_cv_member_struct_stat_st_blksize=yes
21128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021130sed 's/^/| /' conftest.$ac_ext >&5
21131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021132 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021134
21135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137
21138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021139fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021140{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21141echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21142if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021143
Martin v. Löwis11437992002-04-12 09:54:03 +000021144cat >>confdefs.h <<_ACEOF
21145#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21146_ACEOF
21147
21148
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021149fi
21150
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021151{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21152echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021153if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021154 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021155else
21156 cat >conftest.$ac_ext <<_ACEOF
21157/* confdefs.h. */
21158_ACEOF
21159cat confdefs.h >>conftest.$ac_ext
21160cat >>conftest.$ac_ext <<_ACEOF
21161/* end confdefs.h. */
21162$ac_includes_default
21163int
21164main ()
21165{
21166static struct stat ac_aggr;
21167if (ac_aggr.st_flags)
21168return 0;
21169 ;
21170 return 0;
21171}
21172_ACEOF
21173rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021174if { (ac_try="$ac_compile"
21175case "(($ac_try" in
21176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21177 *) ac_try_echo=$ac_try;;
21178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021180 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021181 ac_status=$?
21182 grep -v '^ *+' conftest.er1 >conftest.err
21183 rm -f conftest.er1
21184 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021186 (exit $ac_status); } && {
21187 test -z "$ac_c_werror_flag" ||
21188 test ! -s conftest.err
21189 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021190 ac_cv_member_struct_stat_st_flags=yes
21191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021192 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021193sed 's/^/| /' conftest.$ac_ext >&5
21194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021195 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021196/* confdefs.h. */
21197_ACEOF
21198cat confdefs.h >>conftest.$ac_ext
21199cat >>conftest.$ac_ext <<_ACEOF
21200/* end confdefs.h. */
21201$ac_includes_default
21202int
21203main ()
21204{
21205static struct stat ac_aggr;
21206if (sizeof ac_aggr.st_flags)
21207return 0;
21208 ;
21209 return 0;
21210}
21211_ACEOF
21212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021213if { (ac_try="$ac_compile"
21214case "(($ac_try" in
21215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21216 *) ac_try_echo=$ac_try;;
21217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021219 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021220 ac_status=$?
21221 grep -v '^ *+' conftest.er1 >conftest.err
21222 rm -f conftest.er1
21223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 (exit $ac_status); } && {
21226 test -z "$ac_c_werror_flag" ||
21227 test ! -s conftest.err
21228 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021229 ac_cv_member_struct_stat_st_flags=yes
21230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021231 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021232sed 's/^/| /' conftest.$ac_ext >&5
21233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021234 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021236
21237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021239
21240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021242{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21243echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21244if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021245
21246cat >>confdefs.h <<_ACEOF
21247#define HAVE_STRUCT_STAT_ST_FLAGS 1
21248_ACEOF
21249
21250
21251fi
21252
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021253{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21254echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021255if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021256 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021257else
21258 cat >conftest.$ac_ext <<_ACEOF
21259/* confdefs.h. */
21260_ACEOF
21261cat confdefs.h >>conftest.$ac_ext
21262cat >>conftest.$ac_ext <<_ACEOF
21263/* end confdefs.h. */
21264$ac_includes_default
21265int
21266main ()
21267{
21268static struct stat ac_aggr;
21269if (ac_aggr.st_gen)
21270return 0;
21271 ;
21272 return 0;
21273}
21274_ACEOF
21275rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276if { (ac_try="$ac_compile"
21277case "(($ac_try" in
21278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21279 *) ac_try_echo=$ac_try;;
21280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021283 ac_status=$?
21284 grep -v '^ *+' conftest.er1 >conftest.err
21285 rm -f conftest.er1
21286 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021288 (exit $ac_status); } && {
21289 test -z "$ac_c_werror_flag" ||
21290 test ! -s conftest.err
21291 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021292 ac_cv_member_struct_stat_st_gen=yes
21293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021294 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021295sed 's/^/| /' conftest.$ac_ext >&5
21296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021297 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021298/* confdefs.h. */
21299_ACEOF
21300cat confdefs.h >>conftest.$ac_ext
21301cat >>conftest.$ac_ext <<_ACEOF
21302/* end confdefs.h. */
21303$ac_includes_default
21304int
21305main ()
21306{
21307static struct stat ac_aggr;
21308if (sizeof ac_aggr.st_gen)
21309return 0;
21310 ;
21311 return 0;
21312}
21313_ACEOF
21314rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021315if { (ac_try="$ac_compile"
21316case "(($ac_try" in
21317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21318 *) ac_try_echo=$ac_try;;
21319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021322 ac_status=$?
21323 grep -v '^ *+' conftest.er1 >conftest.err
21324 rm -f conftest.er1
21325 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327 (exit $ac_status); } && {
21328 test -z "$ac_c_werror_flag" ||
21329 test ! -s conftest.err
21330 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021331 ac_cv_member_struct_stat_st_gen=yes
21332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021333 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021334sed 's/^/| /' conftest.$ac_ext >&5
21335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021338
21339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021341
21342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021343fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021344{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21345echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21346if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021347
21348cat >>confdefs.h <<_ACEOF
21349#define HAVE_STRUCT_STAT_ST_GEN 1
21350_ACEOF
21351
21352
21353fi
21354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021355{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21356echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021357if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021359else
21360 cat >conftest.$ac_ext <<_ACEOF
21361/* confdefs.h. */
21362_ACEOF
21363cat confdefs.h >>conftest.$ac_ext
21364cat >>conftest.$ac_ext <<_ACEOF
21365/* end confdefs.h. */
21366$ac_includes_default
21367int
21368main ()
21369{
21370static struct stat ac_aggr;
21371if (ac_aggr.st_birthtime)
21372return 0;
21373 ;
21374 return 0;
21375}
21376_ACEOF
21377rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378if { (ac_try="$ac_compile"
21379case "(($ac_try" in
21380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21381 *) ac_try_echo=$ac_try;;
21382esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021385 ac_status=$?
21386 grep -v '^ *+' conftest.er1 >conftest.err
21387 rm -f conftest.er1
21388 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021390 (exit $ac_status); } && {
21391 test -z "$ac_c_werror_flag" ||
21392 test ! -s conftest.err
21393 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021394 ac_cv_member_struct_stat_st_birthtime=yes
21395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021396 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021397sed 's/^/| /' conftest.$ac_ext >&5
21398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021400/* confdefs.h. */
21401_ACEOF
21402cat confdefs.h >>conftest.$ac_ext
21403cat >>conftest.$ac_ext <<_ACEOF
21404/* end confdefs.h. */
21405$ac_includes_default
21406int
21407main ()
21408{
21409static struct stat ac_aggr;
21410if (sizeof ac_aggr.st_birthtime)
21411return 0;
21412 ;
21413 return 0;
21414}
21415_ACEOF
21416rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021417if { (ac_try="$ac_compile"
21418case "(($ac_try" in
21419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21420 *) ac_try_echo=$ac_try;;
21421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021424 ac_status=$?
21425 grep -v '^ *+' conftest.er1 >conftest.err
21426 rm -f conftest.er1
21427 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 (exit $ac_status); } && {
21430 test -z "$ac_c_werror_flag" ||
21431 test ! -s conftest.err
21432 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021433 ac_cv_member_struct_stat_st_birthtime=yes
21434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021435 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021436sed 's/^/| /' conftest.$ac_ext >&5
21437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021440
21441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021443
21444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021446{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21447echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21448if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021449
21450cat >>confdefs.h <<_ACEOF
21451#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21452_ACEOF
21453
21454
21455fi
21456
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021457{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21458echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021459if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021461else
Martin v. Löwis11437992002-04-12 09:54:03 +000021462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021463/* confdefs.h. */
21464_ACEOF
21465cat confdefs.h >>conftest.$ac_ext
21466cat >>conftest.$ac_ext <<_ACEOF
21467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021469int
21470main ()
21471{
21472static struct stat ac_aggr;
21473if (ac_aggr.st_blocks)
21474return 0;
21475 ;
21476 return 0;
21477}
21478_ACEOF
21479rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480if { (ac_try="$ac_compile"
21481case "(($ac_try" in
21482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21483 *) ac_try_echo=$ac_try;;
21484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021488 grep -v '^ *+' conftest.er1 >conftest.err
21489 rm -f conftest.er1
21490 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492 (exit $ac_status); } && {
21493 test -z "$ac_c_werror_flag" ||
21494 test ! -s conftest.err
21495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021496 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021499sed 's/^/| /' conftest.$ac_ext >&5
21500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021502/* confdefs.h. */
21503_ACEOF
21504cat confdefs.h >>conftest.$ac_ext
21505cat >>conftest.$ac_ext <<_ACEOF
21506/* end confdefs.h. */
21507$ac_includes_default
21508int
21509main ()
21510{
21511static struct stat ac_aggr;
21512if (sizeof ac_aggr.st_blocks)
21513return 0;
21514 ;
21515 return 0;
21516}
21517_ACEOF
21518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021519if { (ac_try="$ac_compile"
21520case "(($ac_try" in
21521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21522 *) ac_try_echo=$ac_try;;
21523esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021525 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021527 grep -v '^ *+' conftest.er1 >conftest.err
21528 rm -f conftest.er1
21529 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021531 (exit $ac_status); } && {
21532 test -z "$ac_c_werror_flag" ||
21533 test ! -s conftest.err
21534 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021535 ac_cv_member_struct_stat_st_blocks=yes
21536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021538sed 's/^/| /' conftest.$ac_ext >&5
21539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021540 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021542
21543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021545
21546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021548{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21549echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21550if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021551
Martin v. Löwis11437992002-04-12 09:54:03 +000021552cat >>confdefs.h <<_ACEOF
21553#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21554_ACEOF
21555
21556
21557cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021558#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021559_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021560
21561else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021562 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021563 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21565 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021566esac
21567
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021568fi
21569
Michael W. Hudson54241132001-12-07 15:38:26 +000021570
Martin v. Löwis11437992002-04-12 09:54:03 +000021571
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021572{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21573echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021574if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021576else
Martin v. Löwis11437992002-04-12 09:54:03 +000021577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021578/* confdefs.h. */
21579_ACEOF
21580cat confdefs.h >>conftest.$ac_ext
21581cat >>conftest.$ac_ext <<_ACEOF
21582/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021583#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021584int
21585main ()
21586{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021587return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 ;
21589 return 0;
21590}
21591_ACEOF
21592rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021593if { (ac_try="$ac_compile"
21594case "(($ac_try" in
21595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21596 *) ac_try_echo=$ac_try;;
21597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021601 grep -v '^ *+' conftest.er1 >conftest.err
21602 rm -f conftest.er1
21603 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021605 (exit $ac_status); } && {
21606 test -z "$ac_c_werror_flag" ||
21607 test ! -s conftest.err
21608 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021609 ac_cv_header_time_altzone=yes
21610else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021612sed 's/^/| /' conftest.$ac_ext >&5
21613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021614 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21618fi
21619
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021620{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21621echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021622if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021623
21624cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021625#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021627
21628fi
21629
Guido van Rossumda88dad1995-01-26 00:46:29 +000021630was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021631{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21632echo $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 +000021633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021634/* confdefs.h. */
21635_ACEOF
21636cat confdefs.h >>conftest.$ac_ext
21637cat >>conftest.$ac_ext <<_ACEOF
21638/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021639
21640#include <sys/types.h>
21641#include <sys/select.h>
21642#include <sys/time.h>
21643
Martin v. Löwis11437992002-04-12 09:54:03 +000021644int
21645main ()
21646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021647;
Martin v. Löwis11437992002-04-12 09:54:03 +000021648 ;
21649 return 0;
21650}
21651_ACEOF
21652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021653if { (ac_try="$ac_compile"
21654case "(($ac_try" in
21655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21656 *) ac_try_echo=$ac_try;;
21657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021661 grep -v '^ *+' conftest.er1 >conftest.err
21662 rm -f conftest.er1
21663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021665 (exit $ac_status); } && {
21666 test -z "$ac_c_werror_flag" ||
21667 test ! -s conftest.err
21668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021669
21670
21671cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021672#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021673_ACEOF
21674
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021675 was_it_defined=yes
21676
Guido van Rossumf78abae1997-01-21 22:02:36 +000021677else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021679sed 's/^/| /' conftest.$ac_ext >&5
21680
Thomas Wouters477c8d52006-05-27 19:21:47 +000021681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682fi
21683
21684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021685{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21686echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021688{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21689echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021690if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021692else
Martin v. Löwis11437992002-04-12 09:54:03 +000021693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021694/* confdefs.h. */
21695_ACEOF
21696cat confdefs.h >>conftest.$ac_ext
21697cat >>conftest.$ac_ext <<_ACEOF
21698/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021699
21700# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021701int
21702main ()
21703{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021704struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 ;
21706 return 0;
21707}
21708_ACEOF
21709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021710if { (ac_try="$ac_compile"
21711case "(($ac_try" in
21712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21713 *) ac_try_echo=$ac_try;;
21714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021718 grep -v '^ *+' conftest.er1 >conftest.err
21719 rm -f conftest.er1
21720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021722 (exit $ac_status); } && {
21723 test -z "$ac_c_werror_flag" ||
21724 test ! -s conftest.err
21725 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021726 ac_cv_struct_addrinfo=yes
21727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021729sed 's/^/| /' conftest.$ac_ext >&5
21730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021732fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21735fi
21736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021737{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21738echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021739if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021740
21741cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021742#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021743_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021744
21745fi
21746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021747{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21748echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021749if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021751else
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021753/* confdefs.h. */
21754_ACEOF
21755cat confdefs.h >>conftest.$ac_ext
21756cat >>conftest.$ac_ext <<_ACEOF
21757/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021758
21759# include <sys/types.h>
21760# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021761int
21762main ()
21763{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021764struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 ;
21766 return 0;
21767}
21768_ACEOF
21769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021770if { (ac_try="$ac_compile"
21771case "(($ac_try" in
21772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21773 *) ac_try_echo=$ac_try;;
21774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021778 grep -v '^ *+' conftest.er1 >conftest.err
21779 rm -f conftest.er1
21780 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021782 (exit $ac_status); } && {
21783 test -z "$ac_c_werror_flag" ||
21784 test ! -s conftest.err
21785 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021786 ac_cv_struct_sockaddr_storage=yes
21787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021789sed 's/^/| /' conftest.$ac_ext >&5
21790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021791 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021792fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21795fi
21796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021797{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21798echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021799if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021800
21801cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021802#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021803_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021804
21805fi
21806
Guido van Rossum627b2d71993-12-24 10:39:16 +000021807# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021808
Michael W. Hudson54241132001-12-07 15:38:26 +000021809
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021810{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21811echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021812if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021813 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021814else
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021816/* confdefs.h. */
21817_ACEOF
21818cat confdefs.h >>conftest.$ac_ext
21819cat >>conftest.$ac_ext <<_ACEOF
21820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021821$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021822int
21823main ()
21824{
21825static int test_array [1 - 2 * !(((char) -1) < 0)];
21826test_array [0] = 0
21827
21828 ;
21829 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021830}
Martin v. Löwis11437992002-04-12 09:54:03 +000021831_ACEOF
21832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833if { (ac_try="$ac_compile"
21834case "(($ac_try" in
21835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21836 *) ac_try_echo=$ac_try;;
21837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021841 grep -v '^ *+' conftest.er1 >conftest.err
21842 rm -f conftest.er1
21843 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021845 (exit $ac_status); } && {
21846 test -z "$ac_c_werror_flag" ||
21847 test ! -s conftest.err
21848 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021849 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021852sed 's/^/| /' conftest.$ac_ext >&5
21853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856
21857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021858fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021859{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21860echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021861if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021863#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021865
21866fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021867
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021868{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21869echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021870if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021872else
21873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021874/* confdefs.h. */
21875_ACEOF
21876cat confdefs.h >>conftest.$ac_ext
21877cat >>conftest.$ac_ext <<_ACEOF
21878/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021879
Martin v. Löwis11437992002-04-12 09:54:03 +000021880int
21881main ()
21882{
21883/* FIXME: Include the comments suggested by Paul. */
21884#ifndef __cplusplus
21885 /* Ultrix mips cc rejects this. */
21886 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021887 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021889 char const *const *pcpcc;
21890 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 /* NEC SVR4.0.2 mips cc rejects this. */
21892 struct point {int x, y;};
21893 static struct point const zero = {0,0};
21894 /* AIX XL C 1.02.0.0 rejects this.
21895 It does not let you subtract one const X* pointer from another in
21896 an arm of an if-expression whose if-part is not a constant
21897 expression */
21898 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021900 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021901 ++pcpcc;
21902 ppc = (char**) pcpcc;
21903 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021904 { /* SCO 3.2v4 cc rejects this. */
21905 char *t;
21906 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021907
Martin v. Löwis11437992002-04-12 09:54:03 +000021908 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021909 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021910 }
21911 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21912 int x[] = {25, 17};
21913 const int *foo = &x[0];
21914 ++foo;
21915 }
21916 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21917 typedef const int *iptr;
21918 iptr p = 0;
21919 ++p;
21920 }
21921 { /* AIX XL C 1.02.0.0 rejects this saying
21922 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21923 struct s { int j; const int *ap[3]; };
21924 struct s *b; b->j = 5;
21925 }
21926 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21927 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021928 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021929 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021930 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021931#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021932
Martin v. Löwis11437992002-04-12 09:54:03 +000021933 ;
21934 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021935}
Martin v. Löwis11437992002-04-12 09:54:03 +000021936_ACEOF
21937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021938if { (ac_try="$ac_compile"
21939case "(($ac_try" in
21940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21941 *) ac_try_echo=$ac_try;;
21942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021946 grep -v '^ *+' conftest.er1 >conftest.err
21947 rm -f conftest.er1
21948 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021950 (exit $ac_status); } && {
21951 test -z "$ac_c_werror_flag" ||
21952 test ! -s conftest.err
21953 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021954 ac_cv_c_const=yes
21955else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021957sed 's/^/| /' conftest.$ac_ext >&5
21958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021959 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021961
21962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021963fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021964{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21965echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021966if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021967
21968cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021969#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021970_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021971
21972fi
21973
Michael W. Hudson54241132001-12-07 15:38:26 +000021974
Guido van Rossumda88dad1995-01-26 00:46:29 +000021975works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976{ echo "$as_me:$LINENO: checking for working volatile" >&5
21977echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021979/* confdefs.h. */
21980_ACEOF
21981cat confdefs.h >>conftest.$ac_ext
21982cat >>conftest.$ac_ext <<_ACEOF
21983/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021984
Martin v. Löwis11437992002-04-12 09:54:03 +000021985int
21986main ()
21987{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021988volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021989 ;
21990 return 0;
21991}
21992_ACEOF
21993rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021994if { (ac_try="$ac_compile"
21995case "(($ac_try" in
21996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21997 *) ac_try_echo=$ac_try;;
21998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022002 grep -v '^ *+' conftest.er1 >conftest.err
22003 rm -f conftest.er1
22004 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022006 (exit $ac_status); } && {
22007 test -z "$ac_c_werror_flag" ||
22008 test ! -s conftest.err
22009 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022010 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022013sed 's/^/| /' conftest.$ac_ext >&5
22014
Martin v. Löwis11437992002-04-12 09:54:03 +000022015
22016cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022017#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022018_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022019
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022020
Guido van Rossum627b2d71993-12-24 10:39:16 +000022021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022022
22023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022024{ echo "$as_me:$LINENO: result: $works" >&5
22025echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022026
Guido van Rossumda88dad1995-01-26 00:46:29 +000022027works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022028{ echo "$as_me:$LINENO: checking for working signed char" >&5
22029echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022031/* confdefs.h. */
22032_ACEOF
22033cat confdefs.h >>conftest.$ac_ext
22034cat >>conftest.$ac_ext <<_ACEOF
22035/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022036
Martin v. Löwis11437992002-04-12 09:54:03 +000022037int
22038main ()
22039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022040signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 ;
22042 return 0;
22043}
22044_ACEOF
22045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022046if { (ac_try="$ac_compile"
22047case "(($ac_try" in
22048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22049 *) ac_try_echo=$ac_try;;
22050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054 grep -v '^ *+' conftest.er1 >conftest.err
22055 rm -f conftest.er1
22056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022058 (exit $ac_status); } && {
22059 test -z "$ac_c_werror_flag" ||
22060 test ! -s conftest.err
22061 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022062 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022065sed 's/^/| /' conftest.$ac_ext >&5
22066
Martin v. Löwis11437992002-04-12 09:54:03 +000022067
22068cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022069#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022070_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022071
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022072
Guido van Rossum7f43da71994-08-01 12:15:30 +000022073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074
22075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022076{ echo "$as_me:$LINENO: result: $works" >&5
22077echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022078
Guido van Rossumda88dad1995-01-26 00:46:29 +000022079have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022080{ echo "$as_me:$LINENO: checking for prototypes" >&5
22081echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022083/* confdefs.h. */
22084_ACEOF
22085cat confdefs.h >>conftest.$ac_ext
22086cat >>conftest.$ac_ext <<_ACEOF
22087/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022088int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022089int
22090main ()
22091{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022092return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022093 ;
22094 return 0;
22095}
22096_ACEOF
22097rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022098if { (ac_try="$ac_compile"
22099case "(($ac_try" in
22100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22101 *) ac_try_echo=$ac_try;;
22102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022106 grep -v '^ *+' conftest.er1 >conftest.err
22107 rm -f conftest.er1
22108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022110 (exit $ac_status); } && {
22111 test -z "$ac_c_werror_flag" ||
22112 test ! -s conftest.err
22113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022114
22115
22116cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022117#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022118_ACEOF
22119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022120 have_prototypes=yes
22121
Guido van Rossumf78abae1997-01-21 22:02:36 +000022122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022124sed 's/^/| /' conftest.$ac_ext >&5
22125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022126
Guido van Rossum7f43da71994-08-01 12:15:30 +000022127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128
22129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022130{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22131echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022132
Guido van Rossumda88dad1995-01-26 00:46:29 +000022133works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022134{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22135echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022137/* confdefs.h. */
22138_ACEOF
22139cat confdefs.h >>conftest.$ac_ext
22140cat >>conftest.$ac_ext <<_ACEOF
22141/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022142
22143#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022144int foo(int x, ...) {
22145 va_list va;
22146 va_start(va, x);
22147 va_arg(va, int);
22148 va_arg(va, char *);
22149 va_arg(va, double);
22150 return 0;
22151}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022152
Martin v. Löwis11437992002-04-12 09:54:03 +000022153int
22154main ()
22155{
Guido van Rossum90eea071996-08-30 20:58:57 +000022156return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022157 ;
22158 return 0;
22159}
22160_ACEOF
22161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022162if { (ac_try="$ac_compile"
22163case "(($ac_try" in
22164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22165 *) ac_try_echo=$ac_try;;
22166esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022170 grep -v '^ *+' conftest.er1 >conftest.err
22171 rm -f conftest.er1
22172 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022174 (exit $ac_status); } && {
22175 test -z "$ac_c_werror_flag" ||
22176 test ! -s conftest.err
22177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022178
22179
22180cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022181#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022182_ACEOF
22183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022184 works=yes
22185
Guido van Rossumf78abae1997-01-21 22:02:36 +000022186else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022188sed 's/^/| /' conftest.$ac_ext >&5
22189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022190
Guido van Rossum627b2d71993-12-24 10:39:16 +000022191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022192
22193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022194{ echo "$as_me:$LINENO: result: $works" >&5
22195echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022196
Martin v. Löwisd6320502004-08-12 13:45:08 +000022197# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022198{ echo "$as_me:$LINENO: checking for socketpair" >&5
22199echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022200cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022201/* confdefs.h. */
22202_ACEOF
22203cat confdefs.h >>conftest.$ac_ext
22204cat >>conftest.$ac_ext <<_ACEOF
22205/* end confdefs.h. */
22206
22207#include <sys/types.h>
22208#include <sys/socket.h>
22209
22210int
22211main ()
22212{
22213void *x=socketpair
22214 ;
22215 return 0;
22216}
22217_ACEOF
22218rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022219if { (ac_try="$ac_compile"
22220case "(($ac_try" in
22221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22222 *) ac_try_echo=$ac_try;;
22223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022227 grep -v '^ *+' conftest.er1 >conftest.err
22228 rm -f conftest.er1
22229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022231 (exit $ac_status); } && {
22232 test -z "$ac_c_werror_flag" ||
22233 test ! -s conftest.err
22234 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022235
22236cat >>confdefs.h <<\_ACEOF
22237#define HAVE_SOCKETPAIR 1
22238_ACEOF
22239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240 { echo "$as_me:$LINENO: result: yes" >&5
22241echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022243 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022244sed 's/^/| /' conftest.$ac_ext >&5
22245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022246 { echo "$as_me:$LINENO: result: no" >&5
22247echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022248
22249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022250
22251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022252
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022253# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022254{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22255echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022257/* confdefs.h. */
22258_ACEOF
22259cat confdefs.h >>conftest.$ac_ext
22260cat >>conftest.$ac_ext <<_ACEOF
22261/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022262#include <sys/types.h>
22263#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022264int
22265main ()
22266{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022267struct sockaddr x;
22268x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ;
22270 return 0;
22271}
22272_ACEOF
22273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022274if { (ac_try="$ac_compile"
22275case "(($ac_try" in
22276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22277 *) ac_try_echo=$ac_try;;
22278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022282 grep -v '^ *+' conftest.er1 >conftest.err
22283 rm -f conftest.er1
22284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022286 (exit $ac_status); } && {
22287 test -z "$ac_c_werror_flag" ||
22288 test ! -s conftest.err
22289 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022290 { echo "$as_me:$LINENO: result: yes" >&5
22291echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022292
22293cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022294#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022295_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022296
22297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022299sed 's/^/| /' conftest.$ac_ext >&5
22300
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022301 { echo "$as_me:$LINENO: result: no" >&5
22302echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022304
22305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022306
Guido van Rossumda88dad1995-01-26 00:46:29 +000022307va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022308{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22309echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022311/* confdefs.h. */
22312_ACEOF
22313cat confdefs.h >>conftest.$ac_ext
22314cat >>conftest.$ac_ext <<_ACEOF
22315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022316
22317#ifdef HAVE_STDARG_PROTOTYPES
22318#include <stdarg.h>
22319#else
22320#include <varargs.h>
22321#endif
22322
Martin v. Löwis11437992002-04-12 09:54:03 +000022323int
22324main ()
22325{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022326va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 ;
22328 return 0;
22329}
22330_ACEOF
22331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022332if { (ac_try="$ac_compile"
22333case "(($ac_try" in
22334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22335 *) ac_try_echo=$ac_try;;
22336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022340 grep -v '^ *+' conftest.er1 >conftest.err
22341 rm -f conftest.er1
22342 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022344 (exit $ac_status); } && {
22345 test -z "$ac_c_werror_flag" ||
22346 test ! -s conftest.err
22347 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022348 :
22349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022351sed 's/^/| /' conftest.$ac_ext >&5
22352
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
22354
22355cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022356#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022357_ACEOF
22358
Guido van Rossumda88dad1995-01-26 00:46:29 +000022359 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022362
22363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022364{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22365echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022367# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022368
22369
22370
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022371{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22372echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022373if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022375else
Martin v. Löwis11437992002-04-12 09:54:03 +000022376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022377/* confdefs.h. */
22378_ACEOF
22379cat confdefs.h >>conftest.$ac_ext
22380cat >>conftest.$ac_ext <<_ACEOF
22381/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022382/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22384#define gethostbyname_r innocuous_gethostbyname_r
22385
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022386/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022387 which can conflict with char gethostbyname_r (); below.
22388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022389 <limits.h> exists even on freestanding compilers. */
22390
22391#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022392# include <limits.h>
22393#else
22394# include <assert.h>
22395#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022396
22397#undef gethostbyname_r
22398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022399/* Override any GCC internal prototype to avoid an error.
22400 Use char because int might match the return type of a GCC
22401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022402#ifdef __cplusplus
22403extern "C"
22404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022405char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022406/* The GNU C library defines this for functions which it implements
22407 to always fail with ENOSYS. Some functions are actually named
22408 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022409#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022410choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022411#endif
22412
Skip Montanaro6dead952003-09-25 14:50:04 +000022413int
22414main ()
22415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022416return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022417 ;
22418 return 0;
22419}
22420_ACEOF
22421rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022422if { (ac_try="$ac_link"
22423case "(($ac_try" in
22424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22425 *) ac_try_echo=$ac_try;;
22426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022428 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022430 grep -v '^ *+' conftest.er1 >conftest.err
22431 rm -f conftest.er1
22432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022434 (exit $ac_status); } && {
22435 test -z "$ac_c_werror_flag" ||
22436 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022437 } && test -s conftest$ac_exeext &&
22438 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022442sed 's/^/| /' conftest.$ac_ext >&5
22443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022444 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022446
22447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022448 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022450{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22451echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22452if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022453
Martin v. Löwis11437992002-04-12 09:54:03 +000022454 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022455#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022456_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022457
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022458 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22459echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022460 OLD_CFLAGS=$CFLAGS
22461 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022463/* confdefs.h. */
22464_ACEOF
22465cat confdefs.h >>conftest.$ac_ext
22466cat >>conftest.$ac_ext <<_ACEOF
22467/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022468
22469# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022470
Martin v. Löwis11437992002-04-12 09:54:03 +000022471int
22472main ()
22473{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022474
22475 char *name;
22476 struct hostent *he, *res;
22477 char buffer[2048];
22478 int buflen = 2048;
22479 int h_errnop;
22480
22481 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022482
22483 ;
22484 return 0;
22485}
22486_ACEOF
22487rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022488if { (ac_try="$ac_compile"
22489case "(($ac_try" in
22490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22491 *) ac_try_echo=$ac_try;;
22492esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022496 grep -v '^ *+' conftest.er1 >conftest.err
22497 rm -f conftest.er1
22498 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022500 (exit $ac_status); } && {
22501 test -z "$ac_c_werror_flag" ||
22502 test ! -s conftest.err
22503 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022504
22505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022506#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022507_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022508
Martin v. Löwis11437992002-04-12 09:54:03 +000022509
22510cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022511#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022512_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022513
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022514 { echo "$as_me:$LINENO: result: yes" >&5
22515echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022519sed 's/^/| /' conftest.$ac_ext >&5
22520
Martin v. Löwis11437992002-04-12 09:54:03 +000022521
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022522 { echo "$as_me:$LINENO: result: no" >&5
22523echo "${ECHO_T}no" >&6; }
22524 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22525echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022527/* confdefs.h. */
22528_ACEOF
22529cat confdefs.h >>conftest.$ac_ext
22530cat >>conftest.$ac_ext <<_ACEOF
22531/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022532
22533# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022534
Martin v. Löwis11437992002-04-12 09:54:03 +000022535int
22536main ()
22537{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022538
22539 char *name;
22540 struct hostent *he;
22541 char buffer[2048];
22542 int buflen = 2048;
22543 int h_errnop;
22544
22545 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022546
22547 ;
22548 return 0;
22549}
22550_ACEOF
22551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022552if { (ac_try="$ac_compile"
22553case "(($ac_try" in
22554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22555 *) ac_try_echo=$ac_try;;
22556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022560 grep -v '^ *+' conftest.er1 >conftest.err
22561 rm -f conftest.er1
22562 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022564 (exit $ac_status); } && {
22565 test -z "$ac_c_werror_flag" ||
22566 test ! -s conftest.err
22567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022568
22569 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022570#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022571_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022572
Martin v. Löwis11437992002-04-12 09:54:03 +000022573
22574cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022575#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022576_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022577
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022578 { echo "$as_me:$LINENO: result: yes" >&5
22579echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022583sed 's/^/| /' conftest.$ac_ext >&5
22584
Martin v. Löwis11437992002-04-12 09:54:03 +000022585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022586 { echo "$as_me:$LINENO: result: no" >&5
22587echo "${ECHO_T}no" >&6; }
22588 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22589echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022591/* confdefs.h. */
22592_ACEOF
22593cat confdefs.h >>conftest.$ac_ext
22594cat >>conftest.$ac_ext <<_ACEOF
22595/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022596
22597# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022598
Martin v. Löwis11437992002-04-12 09:54:03 +000022599int
22600main ()
22601{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022602
22603 char *name;
22604 struct hostent *he;
22605 struct hostent_data data;
22606
22607 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022608
22609 ;
22610 return 0;
22611}
22612_ACEOF
22613rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022614if { (ac_try="$ac_compile"
22615case "(($ac_try" in
22616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22617 *) ac_try_echo=$ac_try;;
22618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022622 grep -v '^ *+' conftest.er1 >conftest.err
22623 rm -f conftest.er1
22624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022626 (exit $ac_status); } && {
22627 test -z "$ac_c_werror_flag" ||
22628 test ! -s conftest.err
22629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022630
22631 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022632#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022633_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022634
Martin v. Löwis11437992002-04-12 09:54:03 +000022635
22636cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022637#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022638_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022639
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022640 { echo "$as_me:$LINENO: result: yes" >&5
22641echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022642
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022645sed 's/^/| /' conftest.$ac_ext >&5
22646
Martin v. Löwis11437992002-04-12 09:54:03 +000022647
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022648 { echo "$as_me:$LINENO: result: no" >&5
22649echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022652
22653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022656
22657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022660
22661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022662 CFLAGS=$OLD_CFLAGS
22663
22664else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022665
Martin v. Löwis11437992002-04-12 09:54:03 +000022666
22667for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022668do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22670{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022672if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022674else
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022676/* confdefs.h. */
22677_ACEOF
22678cat confdefs.h >>conftest.$ac_ext
22679cat >>conftest.$ac_ext <<_ACEOF
22680/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022681/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22682 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22683#define $ac_func innocuous_$ac_func
22684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022685/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022686 which can conflict with char $ac_func (); below.
22687 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022688 <limits.h> exists even on freestanding compilers. */
22689
22690#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022691# include <limits.h>
22692#else
22693# include <assert.h>
22694#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022695
22696#undef $ac_func
22697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022698/* Override any GCC internal prototype to avoid an error.
22699 Use char because int might match the return type of a GCC
22700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022701#ifdef __cplusplus
22702extern "C"
22703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022704char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022705/* The GNU C library defines this for functions which it implements
22706 to always fail with ENOSYS. Some functions are actually named
22707 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022708#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022709choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022710#endif
22711
Skip Montanaro6dead952003-09-25 14:50:04 +000022712int
22713main ()
22714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022715return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 ;
22717 return 0;
22718}
22719_ACEOF
22720rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022721if { (ac_try="$ac_link"
22722case "(($ac_try" in
22723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22724 *) ac_try_echo=$ac_try;;
22725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022727 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022729 grep -v '^ *+' conftest.er1 >conftest.err
22730 rm -f conftest.er1
22731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022733 (exit $ac_status); } && {
22734 test -z "$ac_c_werror_flag" ||
22735 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022736 } && test -s conftest$ac_exeext &&
22737 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022738 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022739else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022741sed 's/^/| /' conftest.$ac_ext >&5
22742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022743 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022745
22746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022747 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022749ac_res=`eval echo '${'$as_ac_var'}'`
22750 { echo "$as_me:$LINENO: result: $ac_res" >&5
22751echo "${ECHO_T}$ac_res" >&6; }
22752if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022753 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022755_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022757fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022758done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022759
Michael W. Hudson54241132001-12-07 15:38:26 +000022760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022761fi
22762
Michael W. Hudson54241132001-12-07 15:38:26 +000022763
22764
22765
22766
22767
22768
Guido van Rossum627b2d71993-12-24 10:39:16 +000022769# checks for system services
22770# (none yet)
22771
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022772# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022773{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22774echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022775if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022776 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022777else
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022779/* confdefs.h. */
22780_ACEOF
22781cat confdefs.h >>conftest.$ac_ext
22782cat >>conftest.$ac_ext <<_ACEOF
22783/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022784/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22785 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22786#define __fpu_control innocuous___fpu_control
22787
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022788/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022789 which can conflict with char __fpu_control (); below.
22790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022791 <limits.h> exists even on freestanding compilers. */
22792
22793#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022794# include <limits.h>
22795#else
22796# include <assert.h>
22797#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022798
22799#undef __fpu_control
22800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022801/* Override any GCC internal prototype to avoid an error.
22802 Use char because int might match the return type of a GCC
22803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022804#ifdef __cplusplus
22805extern "C"
22806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022807char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022808/* The GNU C library defines this for functions which it implements
22809 to always fail with ENOSYS. Some functions are actually named
22810 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022812choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022813#endif
22814
Skip Montanaro6dead952003-09-25 14:50:04 +000022815int
22816main ()
22817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022818return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022819 ;
22820 return 0;
22821}
22822_ACEOF
22823rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022824if { (ac_try="$ac_link"
22825case "(($ac_try" in
22826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22827 *) ac_try_echo=$ac_try;;
22828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022830 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022832 grep -v '^ *+' conftest.er1 >conftest.err
22833 rm -f conftest.er1
22834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022836 (exit $ac_status); } && {
22837 test -z "$ac_c_werror_flag" ||
22838 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022839 } && test -s conftest$ac_exeext &&
22840 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022844sed 's/^/| /' conftest.$ac_ext >&5
22845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022846 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022848
22849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022850 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022851fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022852{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22853echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22854if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022855 :
22856else
Martin v. Löwis11437992002-04-12 09:54:03 +000022857
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022858{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22859echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022860if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022861 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022862else
Martin v. Löwis11437992002-04-12 09:54:03 +000022863 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022864LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022866/* confdefs.h. */
22867_ACEOF
22868cat confdefs.h >>conftest.$ac_ext
22869cat >>conftest.$ac_ext <<_ACEOF
22870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022872/* Override any GCC internal prototype to avoid an error.
22873 Use char because int might match the return type of a GCC
22874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022875#ifdef __cplusplus
22876extern "C"
22877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022878char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022879int
22880main ()
22881{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022882return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022883 ;
22884 return 0;
22885}
22886_ACEOF
22887rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022888if { (ac_try="$ac_link"
22889case "(($ac_try" in
22890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22891 *) ac_try_echo=$ac_try;;
22892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022894 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022896 grep -v '^ *+' conftest.er1 >conftest.err
22897 rm -f conftest.er1
22898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022900 (exit $ac_status); } && {
22901 test -z "$ac_c_werror_flag" ||
22902 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022903 } && test -s conftest$ac_exeext &&
22904 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022905 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022908sed 's/^/| /' conftest.$ac_ext >&5
22909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022910 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022912
22913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022915LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022917{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22918echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22919if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022920 cat >>confdefs.h <<_ACEOF
22921#define HAVE_LIBIEEE 1
22922_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022923
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022924 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022925
Guido van Rossum627b2d71993-12-24 10:39:16 +000022926fi
22927
Michael W. Hudson54241132001-12-07 15:38:26 +000022928
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022929fi
22930
Michael W. Hudson54241132001-12-07 15:38:26 +000022931
Guido van Rossum7f253911997-05-09 02:42:48 +000022932# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022933{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22934echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022936# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022937if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022938 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022939if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022940then
22941
22942cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022943#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022944_ACEOF
22945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022946 { echo "$as_me:$LINENO: result: yes" >&5
22947echo "${ECHO_T}yes" >&6; }
22948else { echo "$as_me:$LINENO: result: no" >&5
22949echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022950fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022951else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022952 { echo "$as_me:$LINENO: result: no" >&5
22953echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954fi
22955
Guido van Rossum7f253911997-05-09 02:42:48 +000022956
Guido van Rossum7f43da71994-08-01 12:15:30 +000022957# check for --with-libm=...
22958
Guido van Rossum563e7081996-09-10 18:20:48 +000022959case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022960Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022961*) LIBM=-lm
22962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022963{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22964echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022966# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022967if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022968 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022969if test "$withval" = no
22970then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022971 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22972echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022973elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022974then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022975 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22976echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22977else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22978echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022979 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022980fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022981else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022982 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22983echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022984fi
22985
Guido van Rossum7f43da71994-08-01 12:15:30 +000022986
22987# check for --with-libc=...
22988
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022989{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22990echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022992# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022993if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022994 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022995if test "$withval" = no
22996then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022997 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22998echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022999elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023000then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023001 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23002echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23003else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23004echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023005 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023006fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023008 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23009echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023010fi
23011
Guido van Rossum7f43da71994-08-01 12:15:30 +000023012
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023013# **************************************************
23014# * Check for various properties of floating point *
23015# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023016
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23018echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023019if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023020 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023021else
23022
23023if test "$cross_compiling" = yes; then
23024 ac_cv_little_endian_double=no
23025else
23026 cat >conftest.$ac_ext <<_ACEOF
23027/* confdefs.h. */
23028_ACEOF
23029cat confdefs.h >>conftest.$ac_ext
23030cat >>conftest.$ac_ext <<_ACEOF
23031/* end confdefs.h. */
23032
23033#include <string.h>
23034int main() {
23035 double x = 9006104071832581.0;
23036 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23037 return 0;
23038 else
23039 return 1;
23040}
23041
23042_ACEOF
23043rm -f conftest$ac_exeext
23044if { (ac_try="$ac_link"
23045case "(($ac_try" in
23046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23047 *) ac_try_echo=$ac_try;;
23048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023050 (eval "$ac_link") 2>&5
23051 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23054 { (case "(($ac_try" in
23055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23056 *) ac_try_echo=$ac_try;;
23057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023059 (eval "$ac_try") 2>&5
23060 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023062 (exit $ac_status); }; }; then
23063 ac_cv_little_endian_double=yes
23064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023065 echo "$as_me: program exited with status $ac_status" >&5
23066echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023067sed 's/^/| /' conftest.$ac_ext >&5
23068
23069( exit $ac_status )
23070ac_cv_little_endian_double=no
23071fi
23072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23073fi
23074
23075
23076fi
23077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023078{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23079echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023080if test "$ac_cv_little_endian_double" = yes
23081then
23082
23083cat >>confdefs.h <<\_ACEOF
23084#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23085_ACEOF
23086
23087fi
23088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023089{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23090echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023091if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023092 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023093else
23094
23095if test "$cross_compiling" = yes; then
23096 ac_cv_big_endian_double=no
23097else
23098 cat >conftest.$ac_ext <<_ACEOF
23099/* confdefs.h. */
23100_ACEOF
23101cat confdefs.h >>conftest.$ac_ext
23102cat >>conftest.$ac_ext <<_ACEOF
23103/* end confdefs.h. */
23104
23105#include <string.h>
23106int main() {
23107 double x = 9006104071832581.0;
23108 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23109 return 0;
23110 else
23111 return 1;
23112}
23113
23114_ACEOF
23115rm -f conftest$ac_exeext
23116if { (ac_try="$ac_link"
23117case "(($ac_try" in
23118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23119 *) ac_try_echo=$ac_try;;
23120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023122 (eval "$ac_link") 2>&5
23123 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23126 { (case "(($ac_try" in
23127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23128 *) ac_try_echo=$ac_try;;
23129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023131 (eval "$ac_try") 2>&5
23132 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023134 (exit $ac_status); }; }; then
23135 ac_cv_big_endian_double=yes
23136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023137 echo "$as_me: program exited with status $ac_status" >&5
23138echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023139sed 's/^/| /' conftest.$ac_ext >&5
23140
23141( exit $ac_status )
23142ac_cv_big_endian_double=no
23143fi
23144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23145fi
23146
23147
23148fi
23149
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023150{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23151echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023152if test "$ac_cv_big_endian_double" = yes
23153then
23154
23155cat >>confdefs.h <<\_ACEOF
23156#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23157_ACEOF
23158
23159fi
23160
23161# Some ARM platforms use a mixed-endian representation for doubles.
23162# While Python doesn't currently have full support for these platforms
23163# (see e.g., issue 1762561), we can at least make sure that float <-> string
23164# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023165{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23166echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023167if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023168 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023169else
23170
23171if test "$cross_compiling" = yes; then
23172 ac_cv_mixed_endian_double=no
23173else
23174 cat >conftest.$ac_ext <<_ACEOF
23175/* confdefs.h. */
23176_ACEOF
23177cat confdefs.h >>conftest.$ac_ext
23178cat >>conftest.$ac_ext <<_ACEOF
23179/* end confdefs.h. */
23180
23181#include <string.h>
23182int main() {
23183 double x = 9006104071832581.0;
23184 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23185 return 0;
23186 else
23187 return 1;
23188}
23189
23190_ACEOF
23191rm -f conftest$ac_exeext
23192if { (ac_try="$ac_link"
23193case "(($ac_try" in
23194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23195 *) ac_try_echo=$ac_try;;
23196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023198 (eval "$ac_link") 2>&5
23199 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23202 { (case "(($ac_try" in
23203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23204 *) ac_try_echo=$ac_try;;
23205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023207 (eval "$ac_try") 2>&5
23208 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023210 (exit $ac_status); }; }; then
23211 ac_cv_mixed_endian_double=yes
23212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023213 echo "$as_me: program exited with status $ac_status" >&5
23214echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023215sed 's/^/| /' conftest.$ac_ext >&5
23216
23217( exit $ac_status )
23218ac_cv_mixed_endian_double=no
23219fi
23220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23221fi
23222
23223
23224fi
23225
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023226{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23227echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023228if test "$ac_cv_mixed_endian_double" = yes
23229then
23230
23231cat >>confdefs.h <<\_ACEOF
23232#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23233_ACEOF
23234
23235fi
23236
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023237# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023238# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023239# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023240# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023241# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023242# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023243
23244# This inline assembler syntax may also work for suncc and icc,
23245# so we try it on all platforms.
23246
23247{ 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 +000023248echo $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 +000023249cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023250/* confdefs.h. */
23251_ACEOF
23252cat confdefs.h >>conftest.$ac_ext
23253cat >>conftest.$ac_ext <<_ACEOF
23254/* end confdefs.h. */
23255
23256int
23257main ()
23258{
23259
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023260 unsigned short cw;
23261 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23262 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023263
23264 ;
23265 return 0;
23266}
23267_ACEOF
23268rm -f conftest.$ac_objext
23269if { (ac_try="$ac_compile"
23270case "(($ac_try" in
23271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23272 *) ac_try_echo=$ac_try;;
23273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023275 (eval "$ac_compile") 2>conftest.er1
23276 ac_status=$?
23277 grep -v '^ *+' conftest.er1 >conftest.err
23278 rm -f conftest.er1
23279 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023281 (exit $ac_status); } && {
23282 test -z "$ac_c_werror_flag" ||
23283 test ! -s conftest.err
23284 } && test -s conftest.$ac_objext; then
23285 have_gcc_asm_for_x87=yes
23286else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023287 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023288sed 's/^/| /' conftest.$ac_ext >&5
23289
23290 have_gcc_asm_for_x87=no
23291fi
23292
23293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023294{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023295echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023296if test "$have_gcc_asm_for_x87" = yes
23297then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023298
23299cat >>confdefs.h <<\_ACEOF
23300#define HAVE_GCC_ASM_FOR_X87 1
23301_ACEOF
23302
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023304
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023305# Detect whether system arithmetic is subject to x87-style double
23306# rounding issues. The result of this test has little meaning on non
23307# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23308# mode is round-to-nearest and double rounding issues are present, and
23309# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023310{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23311echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023312# $BASECFLAGS may affect the result
23313ac_save_cc="$CC"
23314CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023315if test "$cross_compiling" = yes; then
23316 ac_cv_x87_double_rounding=no
23317else
23318 cat >conftest.$ac_ext <<_ACEOF
23319/* confdefs.h. */
23320_ACEOF
23321cat confdefs.h >>conftest.$ac_ext
23322cat >>conftest.$ac_ext <<_ACEOF
23323/* end confdefs.h. */
23324
23325#include <stdlib.h>
23326#include <math.h>
23327int main() {
23328 volatile double x, y, z;
23329 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23330 x = 0.99999999999999989; /* 1-2**-53 */
23331 y = 1./x;
23332 if (y != 1.)
23333 exit(0);
23334 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23335 x = 1e16;
23336 y = 2.99999;
23337 z = x + y;
23338 if (z != 1e16+4.)
23339 exit(0);
23340 /* both tests show evidence of double rounding */
23341 exit(1);
23342}
23343
23344_ACEOF
23345rm -f conftest$ac_exeext
23346if { (ac_try="$ac_link"
23347case "(($ac_try" in
23348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23349 *) ac_try_echo=$ac_try;;
23350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023352 (eval "$ac_link") 2>&5
23353 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23356 { (case "(($ac_try" in
23357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23358 *) ac_try_echo=$ac_try;;
23359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023361 (eval "$ac_try") 2>&5
23362 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023364 (exit $ac_status); }; }; then
23365 ac_cv_x87_double_rounding=no
23366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023367 echo "$as_me: program exited with status $ac_status" >&5
23368echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023369sed 's/^/| /' conftest.$ac_ext >&5
23370
23371( exit $ac_status )
23372ac_cv_x87_double_rounding=yes
23373fi
23374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23375fi
23376
23377
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023378CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023379{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23380echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023381if test "$ac_cv_x87_double_rounding" = yes
23382then
23383
23384cat >>confdefs.h <<\_ACEOF
23385#define X87_DOUBLE_ROUNDING 1
23386_ACEOF
23387
23388fi
23389
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023390# ************************************
23391# * Check for mathematical functions *
23392# ************************************
23393
23394LIBS_SAVE=$LIBS
23395LIBS="$LIBS $LIBM"
23396
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023397# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23398# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023399{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23400echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023401if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023402 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023403else
23404
23405if test "$cross_compiling" = yes; then
23406 ac_cv_tanh_preserves_zero_sign=no
23407else
23408 cat >conftest.$ac_ext <<_ACEOF
23409/* confdefs.h. */
23410_ACEOF
23411cat confdefs.h >>conftest.$ac_ext
23412cat >>conftest.$ac_ext <<_ACEOF
23413/* end confdefs.h. */
23414
23415#include <math.h>
23416#include <stdlib.h>
23417int main() {
23418 /* return 0 if either negative zeros don't exist
23419 on this platform or if negative zeros exist
23420 and tanh(-0.) == -0. */
23421 if (atan2(0., -1.) == atan2(-0., -1.) ||
23422 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23423 else exit(1);
23424}
23425
23426_ACEOF
23427rm -f conftest$ac_exeext
23428if { (ac_try="$ac_link"
23429case "(($ac_try" in
23430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23431 *) ac_try_echo=$ac_try;;
23432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023434 (eval "$ac_link") 2>&5
23435 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23438 { (case "(($ac_try" in
23439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23440 *) ac_try_echo=$ac_try;;
23441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023443 (eval "$ac_try") 2>&5
23444 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023446 (exit $ac_status); }; }; then
23447 ac_cv_tanh_preserves_zero_sign=yes
23448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023449 echo "$as_me: program exited with status $ac_status" >&5
23450echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023451sed 's/^/| /' conftest.$ac_ext >&5
23452
23453( exit $ac_status )
23454ac_cv_tanh_preserves_zero_sign=no
23455fi
23456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23457fi
23458
23459
23460fi
23461
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023462{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23463echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023464if test "$ac_cv_tanh_preserves_zero_sign" = yes
23465then
23466
23467cat >>confdefs.h <<\_ACEOF
23468#define TANH_PRESERVES_ZERO_SIGN 1
23469_ACEOF
23470
23471fi
23472
23473
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023474
Michael W. Hudson54241132001-12-07 15:38:26 +000023475
Christian Heimes99170a52007-12-19 02:07:34 +000023476
23477
23478
23479
23480
Mark Dickinsonf2537862009-04-18 13:58:18 +000023481
Mark Dickinson9c113362009-09-05 10:36:23 +000023482for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23483do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023488 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023489else
23490 cat >conftest.$ac_ext <<_ACEOF
23491/* confdefs.h. */
23492_ACEOF
23493cat confdefs.h >>conftest.$ac_ext
23494cat >>conftest.$ac_ext <<_ACEOF
23495/* end confdefs.h. */
23496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23498#define $ac_func innocuous_$ac_func
23499
23500/* System header to define __stub macros and hopefully few prototypes,
23501 which can conflict with char $ac_func (); below.
23502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23503 <limits.h> exists even on freestanding compilers. */
23504
23505#ifdef __STDC__
23506# include <limits.h>
23507#else
23508# include <assert.h>
23509#endif
23510
23511#undef $ac_func
23512
23513/* Override any GCC internal prototype to avoid an error.
23514 Use char because int might match the return type of a GCC
23515 builtin and then its argument prototype would still apply. */
23516#ifdef __cplusplus
23517extern "C"
23518#endif
23519char $ac_func ();
23520/* The GNU C library defines this for functions which it implements
23521 to always fail with ENOSYS. Some functions are actually named
23522 something starting with __ and the normal name is an alias. */
23523#if defined __stub_$ac_func || defined __stub___$ac_func
23524choke me
23525#endif
23526
23527int
23528main ()
23529{
23530return $ac_func ();
23531 ;
23532 return 0;
23533}
23534_ACEOF
23535rm -f conftest.$ac_objext conftest$ac_exeext
23536if { (ac_try="$ac_link"
23537case "(($ac_try" in
23538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23539 *) ac_try_echo=$ac_try;;
23540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023542 (eval "$ac_link") 2>conftest.er1
23543 ac_status=$?
23544 grep -v '^ *+' conftest.er1 >conftest.err
23545 rm -f conftest.er1
23546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023548 (exit $ac_status); } && {
23549 test -z "$ac_c_werror_flag" ||
23550 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023551 } && test -s conftest$ac_exeext &&
23552 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023553 eval "$as_ac_var=yes"
23554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023555 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023556sed 's/^/| /' conftest.$ac_ext >&5
23557
23558 eval "$as_ac_var=no"
23559fi
23560
23561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23562 conftest$ac_exeext conftest.$ac_ext
23563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023564ac_res=`eval echo '${'$as_ac_var'}'`
23565 { echo "$as_me:$LINENO: result: $ac_res" >&5
23566echo "${ECHO_T}$ac_res" >&6; }
23567if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023568 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023570_ACEOF
23571
23572fi
23573done
23574
23575
23576
23577
23578
23579
23580for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023581do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023582as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23583{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23584echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023585if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023586 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023587else
23588 cat >conftest.$ac_ext <<_ACEOF
23589/* confdefs.h. */
23590_ACEOF
23591cat confdefs.h >>conftest.$ac_ext
23592cat >>conftest.$ac_ext <<_ACEOF
23593/* end confdefs.h. */
23594/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23595 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23596#define $ac_func innocuous_$ac_func
23597
23598/* System header to define __stub macros and hopefully few prototypes,
23599 which can conflict with char $ac_func (); below.
23600 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23601 <limits.h> exists even on freestanding compilers. */
23602
23603#ifdef __STDC__
23604# include <limits.h>
23605#else
23606# include <assert.h>
23607#endif
23608
23609#undef $ac_func
23610
23611/* Override any GCC internal prototype to avoid an error.
23612 Use char because int might match the return type of a GCC
23613 builtin and then its argument prototype would still apply. */
23614#ifdef __cplusplus
23615extern "C"
23616#endif
23617char $ac_func ();
23618/* The GNU C library defines this for functions which it implements
23619 to always fail with ENOSYS. Some functions are actually named
23620 something starting with __ and the normal name is an alias. */
23621#if defined __stub_$ac_func || defined __stub___$ac_func
23622choke me
23623#endif
23624
23625int
23626main ()
23627{
23628return $ac_func ();
23629 ;
23630 return 0;
23631}
23632_ACEOF
23633rm -f conftest.$ac_objext conftest$ac_exeext
23634if { (ac_try="$ac_link"
23635case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023640 (eval "$ac_link") 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
Christian Heimes99170a52007-12-19 02:07:34 +000023646 (exit $ac_status); } && {
23647 test -z "$ac_c_werror_flag" ||
23648 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023649 } && test -s conftest$ac_exeext &&
23650 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023651 eval "$as_ac_var=yes"
23652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023653 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023654sed 's/^/| /' conftest.$ac_ext >&5
23655
23656 eval "$as_ac_var=no"
23657fi
23658
23659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23660 conftest$ac_exeext conftest.$ac_ext
23661fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023662ac_res=`eval echo '${'$as_ac_var'}'`
23663 { echo "$as_me:$LINENO: result: $ac_res" >&5
23664echo "${ECHO_T}$ac_res" >&6; }
23665if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023666 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023667#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023668_ACEOF
23669
23670fi
23671done
23672
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023673{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23674echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023675if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023676 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023677else
23678 cat >conftest.$ac_ext <<_ACEOF
23679/* confdefs.h. */
23680_ACEOF
23681cat confdefs.h >>conftest.$ac_ext
23682cat >>conftest.$ac_ext <<_ACEOF
23683/* end confdefs.h. */
23684#include <math.h>
23685
23686int
23687main ()
23688{
23689#ifndef isinf
23690 (void) isinf;
23691#endif
23692
23693 ;
23694 return 0;
23695}
23696_ACEOF
23697rm -f conftest.$ac_objext
23698if { (ac_try="$ac_compile"
23699case "(($ac_try" in
23700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23701 *) ac_try_echo=$ac_try;;
23702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023704 (eval "$ac_compile") 2>conftest.er1
23705 ac_status=$?
23706 grep -v '^ *+' conftest.er1 >conftest.err
23707 rm -f conftest.er1
23708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023710 (exit $ac_status); } && {
23711 test -z "$ac_c_werror_flag" ||
23712 test ! -s conftest.err
23713 } && test -s conftest.$ac_objext; then
23714 ac_cv_have_decl_isinf=yes
23715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023716 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023717sed 's/^/| /' conftest.$ac_ext >&5
23718
23719 ac_cv_have_decl_isinf=no
23720fi
23721
23722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23723fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023724{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23725echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23726if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023727
23728cat >>confdefs.h <<_ACEOF
23729#define HAVE_DECL_ISINF 1
23730_ACEOF
23731
23732
23733else
23734 cat >>confdefs.h <<_ACEOF
23735#define HAVE_DECL_ISINF 0
23736_ACEOF
23737
23738
23739fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023740{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23741echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023742if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023743 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023744else
23745 cat >conftest.$ac_ext <<_ACEOF
23746/* confdefs.h. */
23747_ACEOF
23748cat confdefs.h >>conftest.$ac_ext
23749cat >>conftest.$ac_ext <<_ACEOF
23750/* end confdefs.h. */
23751#include <math.h>
23752
23753int
23754main ()
23755{
23756#ifndef isnan
23757 (void) isnan;
23758#endif
23759
23760 ;
23761 return 0;
23762}
23763_ACEOF
23764rm -f conftest.$ac_objext
23765if { (ac_try="$ac_compile"
23766case "(($ac_try" in
23767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23768 *) ac_try_echo=$ac_try;;
23769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023771 (eval "$ac_compile") 2>conftest.er1
23772 ac_status=$?
23773 grep -v '^ *+' conftest.er1 >conftest.err
23774 rm -f conftest.er1
23775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023777 (exit $ac_status); } && {
23778 test -z "$ac_c_werror_flag" ||
23779 test ! -s conftest.err
23780 } && test -s conftest.$ac_objext; then
23781 ac_cv_have_decl_isnan=yes
23782else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023783 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023784sed 's/^/| /' conftest.$ac_ext >&5
23785
23786 ac_cv_have_decl_isnan=no
23787fi
23788
23789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23790fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023791{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23792echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23793if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023794
23795cat >>confdefs.h <<_ACEOF
23796#define HAVE_DECL_ISNAN 1
23797_ACEOF
23798
23799
23800else
23801 cat >>confdefs.h <<_ACEOF
23802#define HAVE_DECL_ISNAN 0
23803_ACEOF
23804
23805
23806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023807{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23808echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023809if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023810 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023811else
23812 cat >conftest.$ac_ext <<_ACEOF
23813/* confdefs.h. */
23814_ACEOF
23815cat confdefs.h >>conftest.$ac_ext
23816cat >>conftest.$ac_ext <<_ACEOF
23817/* end confdefs.h. */
23818#include <math.h>
23819
23820int
23821main ()
23822{
23823#ifndef isfinite
23824 (void) isfinite;
23825#endif
23826
23827 ;
23828 return 0;
23829}
23830_ACEOF
23831rm -f conftest.$ac_objext
23832if { (ac_try="$ac_compile"
23833case "(($ac_try" in
23834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23835 *) ac_try_echo=$ac_try;;
23836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023838 (eval "$ac_compile") 2>conftest.er1
23839 ac_status=$?
23840 grep -v '^ *+' conftest.er1 >conftest.err
23841 rm -f conftest.er1
23842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023844 (exit $ac_status); } && {
23845 test -z "$ac_c_werror_flag" ||
23846 test ! -s conftest.err
23847 } && test -s conftest.$ac_objext; then
23848 ac_cv_have_decl_isfinite=yes
23849else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023850 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023851sed 's/^/| /' conftest.$ac_ext >&5
23852
23853 ac_cv_have_decl_isfinite=no
23854fi
23855
23856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23857fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023858{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23859echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23860if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023861
23862cat >>confdefs.h <<_ACEOF
23863#define HAVE_DECL_ISFINITE 1
23864_ACEOF
23865
23866
23867else
23868 cat >>confdefs.h <<_ACEOF
23869#define HAVE_DECL_ISFINITE 0
23870_ACEOF
23871
23872
23873fi
23874
23875
Christian Heimes99170a52007-12-19 02:07:34 +000023876
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023877LIBS=$LIBS_SAVE
23878
Mark Dickinsona614f042009-11-28 12:48:43 +000023879# For multiprocessing module, check that sem_open
23880# actually works. For FreeBSD versions <= 7.2,
23881# the kernel module that provides POSIX semaphores
23882# isn't loaded by default, so an attempt to call
23883# sem_open results in a 'Signal 12' error.
23884{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23885echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23886if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23887 echo $ECHO_N "(cached) $ECHO_C" >&6
23888else
23889 if test "$cross_compiling" = yes; then
23890 ac_cv_posix_semaphores_enabled=yes
23891else
23892 cat >conftest.$ac_ext <<_ACEOF
23893/* confdefs.h. */
23894_ACEOF
23895cat confdefs.h >>conftest.$ac_ext
23896cat >>conftest.$ac_ext <<_ACEOF
23897/* end confdefs.h. */
23898
23899#include <unistd.h>
23900#include <fcntl.h>
23901#include <stdio.h>
23902#include <semaphore.h>
23903#include <sys/stat.h>
23904
23905int main(void) {
23906 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23907 if (a == SEM_FAILED) {
23908 perror("sem_open");
23909 return 1;
23910 }
23911 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023912 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000023913 return 0;
23914}
23915
23916_ACEOF
23917rm -f conftest$ac_exeext
23918if { (ac_try="$ac_link"
23919case "(($ac_try" in
23920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23921 *) ac_try_echo=$ac_try;;
23922esac
23923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23924 (eval "$ac_link") 2>&5
23925 ac_status=$?
23926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23928 { (case "(($ac_try" in
23929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23930 *) ac_try_echo=$ac_try;;
23931esac
23932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23933 (eval "$ac_try") 2>&5
23934 ac_status=$?
23935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23936 (exit $ac_status); }; }; then
23937 ac_cv_posix_semaphores_enabled=yes
23938else
23939 echo "$as_me: program exited with status $ac_status" >&5
23940echo "$as_me: failed program was:" >&5
23941sed 's/^/| /' conftest.$ac_ext >&5
23942
23943( exit $ac_status )
23944ac_cv_posix_semaphores_enabled=no
23945fi
23946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23947fi
23948
23949
23950
23951fi
23952
23953{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23954echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23955if test $ac_cv_posix_semaphores_enabled = no
23956then
23957
23958cat >>confdefs.h <<\_ACEOF
23959#define POSIX_SEMAPHORES_NOT_ENABLED 1
23960_ACEOF
23961
23962fi
23963
Mark Dickinson10683072009-04-18 21:18:19 +000023964# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023965{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23966echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023967if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023968 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023969else
23970 if test "$cross_compiling" = yes; then
23971 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023972else
23973 cat >conftest.$ac_ext <<_ACEOF
23974/* confdefs.h. */
23975_ACEOF
23976cat confdefs.h >>conftest.$ac_ext
23977cat >>conftest.$ac_ext <<_ACEOF
23978/* end confdefs.h. */
23979
23980#include <unistd.h>
23981#include <fcntl.h>
23982#include <stdio.h>
23983#include <semaphore.h>
23984#include <sys/stat.h>
23985
23986int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000023987 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000023988 int count;
23989 int res;
23990 if(a==SEM_FAILED){
23991 perror("sem_open");
23992 return 1;
23993
23994 }
23995 res = sem_getvalue(a, &count);
23996 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023997 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000023998 return res==-1 ? 1 : 0;
23999}
24000
Mark Dickinson10683072009-04-18 21:18:19 +000024001_ACEOF
24002rm -f conftest$ac_exeext
24003if { (ac_try="$ac_link"
24004case "(($ac_try" in
24005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24006 *) ac_try_echo=$ac_try;;
24007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024009 (eval "$ac_link") 2>&5
24010 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24013 { (case "(($ac_try" in
24014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24015 *) ac_try_echo=$ac_try;;
24016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024018 (eval "$ac_try") 2>&5
24019 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024021 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024022 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024023else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024024 echo "$as_me: program exited with status $ac_status" >&5
24025echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024026sed 's/^/| /' conftest.$ac_ext >&5
24027
24028( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024029ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024030fi
24031rm -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 +000024032fi
24033
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024034
24035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024036fi
24037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024038{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24039echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024040if test $ac_cv_broken_sem_getvalue = yes
24041then
24042
24043cat >>confdefs.h <<\_ACEOF
24044#define HAVE_BROKEN_SEM_GETVALUE 1
24045_ACEOF
24046
24047fi
24048
Mark Dickinsonbd792642009-03-18 20:06:12 +000024049# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024050{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24051echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024052# Check whether --enable-big-digits was given.
24053if test "${enable_big_digits+set}" = set; then
24054 enableval=$enable_big_digits; case $enable_big_digits in
24055yes)
24056 enable_big_digits=30 ;;
24057no)
24058 enable_big_digits=15 ;;
2405915|30)
24060 ;;
24061*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024062 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24063echo "$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 +000024064 { (exit 1); exit 1; }; } ;;
24065esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024066{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24067echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024068
24069cat >>confdefs.h <<_ACEOF
24070#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24071_ACEOF
24072
24073
24074else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024075 { echo "$as_me:$LINENO: result: no value specified" >&5
24076echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024077fi
24078
24079
Guido van Rossumef2255b2000-03-10 22:30:29 +000024080# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024081if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024082 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24083echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024084if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024087{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24088echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024089else
Martin v. Löwis11437992002-04-12 09:54:03 +000024090 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024091{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24092echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024094/* confdefs.h. */
24095_ACEOF
24096cat confdefs.h >>conftest.$ac_ext
24097cat >>conftest.$ac_ext <<_ACEOF
24098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024099$ac_includes_default
24100#include <wchar.h>
24101_ACEOF
24102rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024103if { (ac_try="$ac_compile"
24104case "(($ac_try" in
24105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24106 *) ac_try_echo=$ac_try;;
24107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024111 grep -v '^ *+' conftest.er1 >conftest.err
24112 rm -f conftest.er1
24113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024115 (exit $ac_status); } && {
24116 test -z "$ac_c_werror_flag" ||
24117 test ! -s conftest.err
24118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024119 ac_header_compiler=yes
24120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024122sed 's/^/| /' conftest.$ac_ext >&5
24123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024124 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024126
24127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024128{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24129echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024130
24131# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024132{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24133echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024135/* confdefs.h. */
24136_ACEOF
24137cat confdefs.h >>conftest.$ac_ext
24138cat >>conftest.$ac_ext <<_ACEOF
24139/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024140#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024141_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142if { (ac_try="$ac_cpp conftest.$ac_ext"
24143case "(($ac_try" in
24144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24145 *) ac_try_echo=$ac_try;;
24146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024148 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024149 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024150 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024151 rm -f conftest.er1
24152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154 (exit $ac_status); } >/dev/null && {
24155 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24156 test ! -s conftest.err
24157 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024158 ac_header_preproc=yes
24159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024161sed 's/^/| /' conftest.$ac_ext >&5
24162
Martin v. Löwis11437992002-04-12 09:54:03 +000024163 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024165
Martin v. Löwis11437992002-04-12 09:54:03 +000024166rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024167{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24168echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024169
24170# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24172 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024173 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24174echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24175 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24176echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024177 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024178 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024179 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024180 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24181echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24182 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24183echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24184 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24185echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24186 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24187echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24188 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24189echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24190 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24191echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024192 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024193## -------------------------------------- ##
24194## Report this to http://bugs.python.org/ ##
24195## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024196_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024197 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024198 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024200{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24201echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024202if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024204else
24205 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024206fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024207{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24208echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024209
24210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024211if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024212
24213
24214cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024215#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024216_ACEOF
24217
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024218 wchar_h="yes"
24219
Guido van Rossumef2255b2000-03-10 22:30:29 +000024220else
Martin v. Löwis11437992002-04-12 09:54:03 +000024221 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024222
24223fi
24224
Michael W. Hudson54241132001-12-07 15:38:26 +000024225
Martin v. Löwis11437992002-04-12 09:54:03 +000024226
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024227# determine wchar_t size
24228if test "$wchar_h" = yes
24229then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024230 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24231echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24232if test "${ac_cv_type_wchar_t+set}" = set; then
24233 echo $ECHO_N "(cached) $ECHO_C" >&6
24234else
24235 cat >conftest.$ac_ext <<_ACEOF
24236/* confdefs.h. */
24237_ACEOF
24238cat confdefs.h >>conftest.$ac_ext
24239cat >>conftest.$ac_ext <<_ACEOF
24240/* end confdefs.h. */
24241#include <wchar.h>
24242
24243typedef wchar_t ac__type_new_;
24244int
24245main ()
24246{
24247if ((ac__type_new_ *) 0)
24248 return 0;
24249if (sizeof (ac__type_new_))
24250 return 0;
24251 ;
24252 return 0;
24253}
24254_ACEOF
24255rm -f conftest.$ac_objext
24256if { (ac_try="$ac_compile"
24257case "(($ac_try" in
24258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24259 *) ac_try_echo=$ac_try;;
24260esac
24261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24262 (eval "$ac_compile") 2>conftest.er1
24263 ac_status=$?
24264 grep -v '^ *+' conftest.er1 >conftest.err
24265 rm -f conftest.er1
24266 cat conftest.err >&5
24267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24268 (exit $ac_status); } && {
24269 test -z "$ac_c_werror_flag" ||
24270 test ! -s conftest.err
24271 } && test -s conftest.$ac_objext; then
24272 ac_cv_type_wchar_t=yes
24273else
24274 echo "$as_me: failed program was:" >&5
24275sed 's/^/| /' conftest.$ac_ext >&5
24276
24277 ac_cv_type_wchar_t=no
24278fi
24279
24280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24281fi
24282{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24283echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24284
24285# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24288# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024289{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24290echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024291if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024292 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024293else
Martin v. Löwis11437992002-04-12 09:54:03 +000024294 if test "$cross_compiling" = yes; then
24295 # Depending upon the size, compute the lo and hi bounds.
24296cat >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_))) >= 0)];
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=0 ac_mid=0
24333 while :; do
24334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024335/* confdefs.h. */
24336_ACEOF
24337cat confdefs.h >>conftest.$ac_ext
24338cat >>conftest.$ac_ext <<_ACEOF
24339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024340#include <wchar.h>
24341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024343int
24344main ()
24345{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024347test_array [0] = 0
24348
24349 ;
24350 return 0;
24351}
24352_ACEOF
24353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354if { (ac_try="$ac_compile"
24355case "(($ac_try" in
24356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24357 *) ac_try_echo=$ac_try;;
24358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024362 grep -v '^ *+' conftest.er1 >conftest.err
24363 rm -f conftest.er1
24364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366 (exit $ac_status); } && {
24367 test -z "$ac_c_werror_flag" ||
24368 test ! -s conftest.err
24369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024370 ac_hi=$ac_mid; break
24371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024373sed 's/^/| /' conftest.$ac_ext >&5
24374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024375 ac_lo=`expr $ac_mid + 1`
24376 if test $ac_lo -le $ac_mid; then
24377 ac_lo= ac_hi=
24378 break
24379 fi
24380 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024382
24383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024384 done
24385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024387sed 's/^/| /' conftest.$ac_ext >&5
24388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024390/* confdefs.h. */
24391_ACEOF
24392cat confdefs.h >>conftest.$ac_ext
24393cat >>conftest.$ac_ext <<_ACEOF
24394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024395#include <wchar.h>
24396
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024397 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024398int
24399main ()
24400{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024402test_array [0] = 0
24403
24404 ;
24405 return 0;
24406}
24407_ACEOF
24408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024409if { (ac_try="$ac_compile"
24410case "(($ac_try" in
24411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24412 *) ac_try_echo=$ac_try;;
24413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024417 grep -v '^ *+' conftest.er1 >conftest.err
24418 rm -f conftest.er1
24419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024421 (exit $ac_status); } && {
24422 test -z "$ac_c_werror_flag" ||
24423 test ! -s conftest.err
24424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024425 ac_hi=-1 ac_mid=-1
24426 while :; do
24427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024428/* confdefs.h. */
24429_ACEOF
24430cat confdefs.h >>conftest.$ac_ext
24431cat >>conftest.$ac_ext <<_ACEOF
24432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024433#include <wchar.h>
24434
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024435 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024436int
24437main ()
24438{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024439static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024440test_array [0] = 0
24441
24442 ;
24443 return 0;
24444}
24445_ACEOF
24446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024447if { (ac_try="$ac_compile"
24448case "(($ac_try" in
24449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24450 *) ac_try_echo=$ac_try;;
24451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024455 grep -v '^ *+' conftest.er1 >conftest.err
24456 rm -f conftest.er1
24457 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024459 (exit $ac_status); } && {
24460 test -z "$ac_c_werror_flag" ||
24461 test ! -s conftest.err
24462 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024463 ac_lo=$ac_mid; break
24464else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024466sed 's/^/| /' conftest.$ac_ext >&5
24467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024468 ac_hi=`expr '(' $ac_mid ')' - 1`
24469 if test $ac_mid -le $ac_hi; then
24470 ac_lo= ac_hi=
24471 break
24472 fi
24473 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024475
24476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024477 done
24478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024480sed 's/^/| /' conftest.$ac_ext >&5
24481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024482 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024484
24485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487
24488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024489# Binary search between lo and hi bounds.
24490while test "x$ac_lo" != "x$ac_hi"; do
24491 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024493/* confdefs.h. */
24494_ACEOF
24495cat confdefs.h >>conftest.$ac_ext
24496cat >>conftest.$ac_ext <<_ACEOF
24497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024498#include <wchar.h>
24499
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024500 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024501int
24502main ()
24503{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024505test_array [0] = 0
24506
24507 ;
24508 return 0;
24509}
24510_ACEOF
24511rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024512if { (ac_try="$ac_compile"
24513case "(($ac_try" in
24514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24515 *) ac_try_echo=$ac_try;;
24516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024520 grep -v '^ *+' conftest.er1 >conftest.err
24521 rm -f conftest.er1
24522 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024524 (exit $ac_status); } && {
24525 test -z "$ac_c_werror_flag" ||
24526 test ! -s conftest.err
24527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024528 ac_hi=$ac_mid
24529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024531sed 's/^/| /' conftest.$ac_ext >&5
24532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024533 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024535
24536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024537done
24538case $ac_lo in
24539?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024540'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024542See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024543echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024544See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024545 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024546 else
24547 ac_cv_sizeof_wchar_t=0
24548 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024549esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024550else
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024552/* confdefs.h. */
24553_ACEOF
24554cat confdefs.h >>conftest.$ac_ext
24555cat >>conftest.$ac_ext <<_ACEOF
24556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024557#include <wchar.h>
24558
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024559 typedef wchar_t ac__type_sizeof_;
24560static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24561static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024562#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024563#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024564int
24565main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024566{
Martin v. Löwis11437992002-04-12 09:54:03 +000024567
24568 FILE *f = fopen ("conftest.val", "w");
24569 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024570 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024571 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024572 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024573 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024574 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024575 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024576 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024577 }
24578 else
24579 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024580 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024582 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024583 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024584 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024585 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024586
24587 ;
24588 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024589}
Martin v. Löwis11437992002-04-12 09:54:03 +000024590_ACEOF
24591rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024592if { (ac_try="$ac_link"
24593case "(($ac_try" in
24594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24595 *) ac_try_echo=$ac_try;;
24596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024598 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024602 { (case "(($ac_try" in
24603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24604 *) ac_try_echo=$ac_try;;
24605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024608 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024610 (exit $ac_status); }; }; then
24611 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024613 echo "$as_me: program exited with status $ac_status" >&5
24614echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024615sed 's/^/| /' conftest.$ac_ext >&5
24616
Martin v. Löwis11437992002-04-12 09:54:03 +000024617( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024619 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024620See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024621echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024622See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024623 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024624 else
24625 ac_cv_sizeof_wchar_t=0
24626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024627fi
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
Martin v. Löwis11437992002-04-12 09:54:03 +000024629fi
24630rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024631fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024632{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24633echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024634
24635
24636
Martin v. Löwis11437992002-04-12 09:54:03 +000024637cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024638#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024639_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024640
Michael W. Hudson54241132001-12-07 15:38:26 +000024641
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024642fi
24643
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024644{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24645echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024646have_ucs4_tcl=no
24647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024648/* confdefs.h. */
24649_ACEOF
24650cat confdefs.h >>conftest.$ac_ext
24651cat >>conftest.$ac_ext <<_ACEOF
24652/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024653
24654#include <tcl.h>
24655#if TCL_UTF_MAX != 6
24656# error "NOT UCS4_TCL"
24657#endif
24658int
24659main ()
24660{
24661
24662 ;
24663 return 0;
24664}
24665_ACEOF
24666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667if { (ac_try="$ac_compile"
24668case "(($ac_try" in
24669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24670 *) ac_try_echo=$ac_try;;
24671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024675 grep -v '^ *+' conftest.er1 >conftest.err
24676 rm -f conftest.er1
24677 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024679 (exit $ac_status); } && {
24680 test -z "$ac_c_werror_flag" ||
24681 test ! -s conftest.err
24682 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024683
24684
24685cat >>confdefs.h <<\_ACEOF
24686#define HAVE_UCS4_TCL 1
24687_ACEOF
24688
24689 have_ucs4_tcl=yes
24690
24691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024693sed 's/^/| /' conftest.$ac_ext >&5
24694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024695
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024697
24698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024699{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24700echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024701
Skip Montanaro6dead952003-09-25 14:50:04 +000024702# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024703if test "$wchar_h" = yes
24704then
24705 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024706 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24707echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024708 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024709 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024710else
24711
24712 if test "$cross_compiling" = yes; then
24713 ac_cv_wchar_t_signed=yes
24714else
24715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024716/* confdefs.h. */
24717_ACEOF
24718cat confdefs.h >>conftest.$ac_ext
24719cat >>conftest.$ac_ext <<_ACEOF
24720/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024721
24722 #include <wchar.h>
24723 int main()
24724 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024725 /* Success: exit code 0 */
24726 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024727 }
24728
24729_ACEOF
24730rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731if { (ac_try="$ac_link"
24732case "(($ac_try" in
24733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24734 *) ac_try_echo=$ac_try;;
24735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024737 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024738 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024740 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 { (case "(($ac_try" in
24742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743 *) ac_try_echo=$ac_try;;
24744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024746 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024747 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024749 (exit $ac_status); }; }; then
24750 ac_cv_wchar_t_signed=yes
24751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024752 echo "$as_me: program exited with status $ac_status" >&5
24753echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024754sed 's/^/| /' conftest.$ac_ext >&5
24755
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024756( exit $ac_status )
24757ac_cv_wchar_t_signed=no
24758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759rm -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 +000024760fi
24761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024763fi
24764
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024765 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24766echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024767fi
24768
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024769{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24770echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024771
24772# Check whether --with-wide-unicode was given.
24773if test "${with_wide_unicode+set}" = set; then
24774 withval=$with_wide_unicode;
24775if test "$withval" != no
24776then unicode_size="4"
24777else unicode_size="2"
24778fi
24779
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024780else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781
Georg Brandl52d168a2008-01-07 18:10:24 +000024782case "$have_ucs4_tcl" in
24783 yes) unicode_size="4" ;;
24784 *) unicode_size="2" ;;
24785esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024786
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024787fi
24788
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024789
24790
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024791
Georg Brandl52d168a2008-01-07 18:10:24 +000024792case "$unicode_size" in
24793 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024794#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024795_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024796 ;;
24797 *) cat >>confdefs.h <<\_ACEOF
24798#define Py_UNICODE_SIZE 2
24799_ACEOF
24800 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024801esac
24802
Michael W. Hudson54241132001-12-07 15:38:26 +000024803
Martin v. Löwis11437992002-04-12 09:54:03 +000024804
24805
Georg Brandl52d168a2008-01-07 18:10:24 +000024806# wchar_t is only usable if it maps to an unsigned type
24807if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024808 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024809then
24810 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024811
Martin v. Löwis11437992002-04-12 09:54:03 +000024812cat >>confdefs.h <<\_ACEOF
24813#define HAVE_USABLE_WCHAR_T 1
24814_ACEOF
24815
Georg Brandl52d168a2008-01-07 18:10:24 +000024816 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024817#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024818_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024819
Georg Brandl52d168a2008-01-07 18:10:24 +000024820elif test "$ac_cv_sizeof_short" = "$unicode_size"
24821then
24822 PY_UNICODE_TYPE="unsigned short"
24823 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024824#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024825_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024826
Georg Brandl52d168a2008-01-07 18:10:24 +000024827elif test "$ac_cv_sizeof_long" = "$unicode_size"
24828then
24829 PY_UNICODE_TYPE="unsigned long"
24830 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024831#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024832_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024833
Georg Brandl52d168a2008-01-07 18:10:24 +000024834else
24835 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024837{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24838echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024839
24840# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024841{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24842echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024843if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024844 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024846 # See if sys/param.h defines the BYTE_ORDER macro.
24847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024848/* confdefs.h. */
24849_ACEOF
24850cat confdefs.h >>conftest.$ac_ext
24851cat >>conftest.$ac_ext <<_ACEOF
24852/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024853#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024854#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024855
Martin v. Löwis11437992002-04-12 09:54:03 +000024856int
24857main ()
24858{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024859#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24860 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24861 bogus endian macros
24862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024863
24864 ;
24865 return 0;
24866}
24867_ACEOF
24868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024869if { (ac_try="$ac_compile"
24870case "(($ac_try" in
24871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24872 *) ac_try_echo=$ac_try;;
24873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024877 grep -v '^ *+' conftest.er1 >conftest.err
24878 rm -f conftest.er1
24879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024881 (exit $ac_status); } && {
24882 test -z "$ac_c_werror_flag" ||
24883 test ! -s conftest.err
24884 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024885 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024887/* confdefs.h. */
24888_ACEOF
24889cat confdefs.h >>conftest.$ac_ext
24890cat >>conftest.$ac_ext <<_ACEOF
24891/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024892#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024893#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024894
Martin v. Löwis11437992002-04-12 09:54:03 +000024895int
24896main ()
24897{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024898#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024899 not big endian
24900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024901
24902 ;
24903 return 0;
24904}
24905_ACEOF
24906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024907if { (ac_try="$ac_compile"
24908case "(($ac_try" in
24909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24910 *) ac_try_echo=$ac_try;;
24911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024915 grep -v '^ *+' conftest.er1 >conftest.err
24916 rm -f conftest.er1
24917 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919 (exit $ac_status); } && {
24920 test -z "$ac_c_werror_flag" ||
24921 test ! -s conftest.err
24922 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024923 ac_cv_c_bigendian=yes
24924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024926sed 's/^/| /' conftest.$ac_ext >&5
24927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024928 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024930
24931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024936 # It does not; compile a test program.
24937if test "$cross_compiling" = yes; then
24938 # try to guess the endianness by grepping values into an object file
24939 ac_cv_c_bigendian=unknown
24940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024941/* confdefs.h. */
24942_ACEOF
24943cat confdefs.h >>conftest.$ac_ext
24944cat >>conftest.$ac_ext <<_ACEOF
24945/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024946short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24947short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24948void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24949short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24950short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24951void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024952int
24953main ()
24954{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024955 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024956 ;
24957 return 0;
24958}
24959_ACEOF
24960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024961if { (ac_try="$ac_compile"
24962case "(($ac_try" in
24963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24964 *) ac_try_echo=$ac_try;;
24965esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024969 grep -v '^ *+' conftest.er1 >conftest.err
24970 rm -f conftest.er1
24971 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024973 (exit $ac_status); } && {
24974 test -z "$ac_c_werror_flag" ||
24975 test ! -s conftest.err
24976 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024977 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024978 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024980if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24981 if test "$ac_cv_c_bigendian" = unknown; then
24982 ac_cv_c_bigendian=no
24983 else
24984 # finding both strings is unlikely to happen, but who knows?
24985 ac_cv_c_bigendian=unknown
24986 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024987fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024990sed 's/^/| /' conftest.$ac_ext >&5
24991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024992
Martin v. Löwis11437992002-04-12 09:54:03 +000024993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024994
24995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024996else
24997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024998/* confdefs.h. */
24999_ACEOF
25000cat confdefs.h >>conftest.$ac_ext
25001cat >>conftest.$ac_ext <<_ACEOF
25002/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025004int
25005main ()
25006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008 /* Are we little or big endian? From Harbison&Steele. */
25009 union
25010 {
25011 long int l;
25012 char c[sizeof (long int)];
25013 } u;
25014 u.l = 1;
25015 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025016
25017 ;
25018 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025019}
Martin v. Löwis11437992002-04-12 09:54:03 +000025020_ACEOF
25021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025022if { (ac_try="$ac_link"
25023case "(($ac_try" in
25024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25025 *) ac_try_echo=$ac_try;;
25026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025032 { (case "(($ac_try" in
25033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25034 *) ac_try_echo=$ac_try;;
25035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025037 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025040 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025041 ac_cv_c_bigendian=no
25042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025043 echo "$as_me: program exited with status $ac_status" >&5
25044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025045sed 's/^/| /' conftest.$ac_ext >&5
25046
Martin v. Löwis11437992002-04-12 09:54:03 +000025047( exit $ac_status )
25048ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025050rm -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 +000025051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025052
25053
Martin v. Löwis11437992002-04-12 09:54:03 +000025054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025055
25056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25057fi
25058{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25059echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25060case $ac_cv_c_bigendian in
25061 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025062
25063cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025064#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025065_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025066 ;;
25067 no)
25068 ;;
25069 *)
25070 { { echo "$as_me:$LINENO: error: unknown endianness
25071presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25072echo "$as_me: error: unknown endianness
25073presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025074 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025075esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025076
Michael W. Hudson54241132001-12-07 15:38:26 +000025077
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025078# Check whether right shifting a negative integer extends the sign bit
25079# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025080{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25081echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025082if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025083 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025084else
Martin v. Löwis11437992002-04-12 09:54:03 +000025085
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025086if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025087 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025088else
Martin v. Löwis11437992002-04-12 09:54:03 +000025089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025090/* confdefs.h. */
25091_ACEOF
25092cat confdefs.h >>conftest.$ac_ext
25093cat >>conftest.$ac_ext <<_ACEOF
25094/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025095
25096int main()
25097{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025098 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025099}
25100
Martin v. Löwis11437992002-04-12 09:54:03 +000025101_ACEOF
25102rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025103if { (ac_try="$ac_link"
25104case "(($ac_try" in
25105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25106 *) ac_try_echo=$ac_try;;
25107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025109 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025110 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113 { (case "(($ac_try" in
25114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25115 *) ac_try_echo=$ac_try;;
25116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025118 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025119 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025121 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025122 ac_cv_rshift_extends_sign=yes
25123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025124 echo "$as_me: program exited with status $ac_status" >&5
25125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025126sed 's/^/| /' conftest.$ac_ext >&5
25127
Martin v. Löwis11437992002-04-12 09:54:03 +000025128( exit $ac_status )
25129ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025131rm -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 +000025132fi
25133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025134
25135fi
25136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025137{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25138echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025139if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025140then
Martin v. Löwis11437992002-04-12 09:54:03 +000025141
25142cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025143#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025144_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025145
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025146fi
25147
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025148# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025149{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25150echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025151if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025153else
Martin v. Löwis11437992002-04-12 09:54:03 +000025154
25155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025156/* confdefs.h. */
25157_ACEOF
25158cat confdefs.h >>conftest.$ac_ext
25159cat >>conftest.$ac_ext <<_ACEOF
25160/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025161#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025162int
25163main ()
25164{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025165
25166 FILE *f = fopen("/dev/null", "r");
25167 flockfile(f);
25168 getc_unlocked(f);
25169 funlockfile(f);
25170
Martin v. Löwis11437992002-04-12 09:54:03 +000025171 ;
25172 return 0;
25173}
25174_ACEOF
25175rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025176if { (ac_try="$ac_link"
25177case "(($ac_try" in
25178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25179 *) ac_try_echo=$ac_try;;
25180esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025182 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025184 grep -v '^ *+' conftest.er1 >conftest.err
25185 rm -f conftest.er1
25186 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188 (exit $ac_status); } && {
25189 test -z "$ac_c_werror_flag" ||
25190 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025191 } && test -s conftest$ac_exeext &&
25192 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025193 ac_cv_have_getc_unlocked=yes
25194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025196sed 's/^/| /' conftest.$ac_ext >&5
25197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025198 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025200
25201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025202 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025203fi
25204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025205{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25206echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025207if test "$ac_cv_have_getc_unlocked" = yes
25208then
Martin v. Löwis11437992002-04-12 09:54:03 +000025209
25210cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025211#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025212_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025213
25214fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025215
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025216# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025217# save the value of LIBS so we don't actually link Python with readline
25218LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025219
Gregory P. Smith18820942008-09-07 06:24:49 +000025220# On some systems we need to link readline to a termcap compatible
25221# library. NOTE: Keep the precedence of listed libraries synchronised
25222# with setup.py.
25223py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025224{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25225echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025226for py_libtermcap in "" ncursesw ncurses curses termcap; do
25227 if test -z "$py_libtermcap"; then
25228 READLINE_LIBS="-lreadline"
25229 else
25230 READLINE_LIBS="-lreadline -l$py_libtermcap"
25231 fi
25232 LIBS="$READLINE_LIBS $LIBS_no_readline"
25233 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025234/* confdefs.h. */
25235_ACEOF
25236cat confdefs.h >>conftest.$ac_ext
25237cat >>conftest.$ac_ext <<_ACEOF
25238/* end confdefs.h. */
25239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025240/* Override any GCC internal prototype to avoid an error.
25241 Use char because int might match the return type of a GCC
25242 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025243#ifdef __cplusplus
25244extern "C"
25245#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025246char readline ();
25247int
25248main ()
25249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025250return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025251 ;
25252 return 0;
25253}
25254_ACEOF
25255rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025256if { (ac_try="$ac_link"
25257case "(($ac_try" in
25258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25259 *) ac_try_echo=$ac_try;;
25260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025262 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025263 ac_status=$?
25264 grep -v '^ *+' conftest.er1 >conftest.err
25265 rm -f conftest.er1
25266 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025268 (exit $ac_status); } && {
25269 test -z "$ac_c_werror_flag" ||
25270 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271 } && test -s conftest$ac_exeext &&
25272 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025273 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025275 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025276sed 's/^/| /' conftest.$ac_ext >&5
25277
Gregory P. Smith18820942008-09-07 06:24:49 +000025278
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025280
25281rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025282 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025283 if test $py_cv_lib_readline = yes; then
25284 break
25285 fi
25286done
25287# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25288#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025289if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025290 { echo "$as_me:$LINENO: result: none" >&5
25291echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025293 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25294echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025295
25296cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025297#define HAVE_LIBREADLINE 1
25298_ACEOF
25299
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025300fi
25301
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025302# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025303{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25304echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025305if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025306 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025307else
25308 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025309LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025310cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025311/* confdefs.h. */
25312_ACEOF
25313cat confdefs.h >>conftest.$ac_ext
25314cat >>conftest.$ac_ext <<_ACEOF
25315/* end confdefs.h. */
25316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025317/* Override any GCC internal prototype to avoid an error.
25318 Use char because int might match the return type of a GCC
25319 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025320#ifdef __cplusplus
25321extern "C"
25322#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025323char rl_callback_handler_install ();
25324int
25325main ()
25326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025327return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025328 ;
25329 return 0;
25330}
25331_ACEOF
25332rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025333if { (ac_try="$ac_link"
25334case "(($ac_try" in
25335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25336 *) ac_try_echo=$ac_try;;
25337esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025339 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025341 grep -v '^ *+' conftest.er1 >conftest.err
25342 rm -f conftest.er1
25343 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025345 (exit $ac_status); } && {
25346 test -z "$ac_c_werror_flag" ||
25347 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025348 } && test -s conftest$ac_exeext &&
25349 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025350 ac_cv_lib_readline_rl_callback_handler_install=yes
25351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025352 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025353sed 's/^/| /' conftest.$ac_ext >&5
25354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025355 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025357
25358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025359 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025360LIBS=$ac_check_lib_save_LIBS
25361fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025362{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25363echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25364if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025365
25366cat >>confdefs.h <<\_ACEOF
25367#define HAVE_RL_CALLBACK 1
25368_ACEOF
25369
25370fi
25371
25372
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025373# check for readline 2.2
25374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025375/* confdefs.h. */
25376_ACEOF
25377cat confdefs.h >>conftest.$ac_ext
25378cat >>conftest.$ac_ext <<_ACEOF
25379/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025380#include <readline/readline.h>
25381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025382if { (ac_try="$ac_cpp conftest.$ac_ext"
25383case "(($ac_try" in
25384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25385 *) ac_try_echo=$ac_try;;
25386esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025388 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025389 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025390 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025391 rm -f conftest.er1
25392 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025394 (exit $ac_status); } >/dev/null && {
25395 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25396 test ! -s conftest.err
25397 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025398 have_readline=yes
25399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025401sed 's/^/| /' conftest.$ac_ext >&5
25402
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025403 have_readline=no
25404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025406rm -f conftest.err conftest.$ac_ext
25407if test $have_readline = yes
25408then
25409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025410/* confdefs.h. */
25411_ACEOF
25412cat confdefs.h >>conftest.$ac_ext
25413cat >>conftest.$ac_ext <<_ACEOF
25414/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025415#include <readline/readline.h>
25416
25417_ACEOF
25418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025419 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025420
25421cat >>confdefs.h <<\_ACEOF
25422#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25423_ACEOF
25424
25425fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025426rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025427
Antoine Pitroud5131772009-10-26 19:22:14 +000025428 cat >conftest.$ac_ext <<_ACEOF
25429/* confdefs.h. */
25430_ACEOF
25431cat confdefs.h >>conftest.$ac_ext
25432cat >>conftest.$ac_ext <<_ACEOF
25433/* end confdefs.h. */
25434#include <readline/readline.h>
25435
25436_ACEOF
25437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25438 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25439
25440cat >>confdefs.h <<\_ACEOF
25441#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25442_ACEOF
25443
25444fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025445rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025446
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025447fi
25448
Martin v. Löwis0daad592001-09-30 21:09:59 +000025449# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025450{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25451echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025452if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025454else
Martin v. Löwis11437992002-04-12 09:54:03 +000025455 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025456LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025458/* confdefs.h. */
25459_ACEOF
25460cat confdefs.h >>conftest.$ac_ext
25461cat >>conftest.$ac_ext <<_ACEOF
25462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025464/* Override any GCC internal prototype to avoid an error.
25465 Use char because int might match the return type of a GCC
25466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025467#ifdef __cplusplus
25468extern "C"
25469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025470char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025471int
25472main ()
25473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025474return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025475 ;
25476 return 0;
25477}
25478_ACEOF
25479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025480if { (ac_try="$ac_link"
25481case "(($ac_try" in
25482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25483 *) ac_try_echo=$ac_try;;
25484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025486 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025488 grep -v '^ *+' conftest.er1 >conftest.err
25489 rm -f conftest.er1
25490 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025492 (exit $ac_status); } && {
25493 test -z "$ac_c_werror_flag" ||
25494 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025495 } && test -s conftest$ac_exeext &&
25496 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025497 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025500sed 's/^/| /' conftest.$ac_ext >&5
25501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025502 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025504
25505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025507LIBS=$ac_check_lib_save_LIBS
25508fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025509{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25510echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25511if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025512
Martin v. Löwis11437992002-04-12 09:54:03 +000025513cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025514#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025515_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025516
Martin v. Löwis0daad592001-09-30 21:09:59 +000025517fi
25518
Michael W. Hudson54241132001-12-07 15:38:26 +000025519
Thomas Wouters89d996e2007-09-08 17:39:28 +000025520# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025521{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25522echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025523if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025524 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025525else
25526 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025527LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025528cat >conftest.$ac_ext <<_ACEOF
25529/* confdefs.h. */
25530_ACEOF
25531cat confdefs.h >>conftest.$ac_ext
25532cat >>conftest.$ac_ext <<_ACEOF
25533/* end confdefs.h. */
25534
25535/* Override any GCC internal prototype to avoid an error.
25536 Use char because int might match the return type of a GCC
25537 builtin and then its argument prototype would still apply. */
25538#ifdef __cplusplus
25539extern "C"
25540#endif
25541char rl_completion_display_matches_hook ();
25542int
25543main ()
25544{
25545return rl_completion_display_matches_hook ();
25546 ;
25547 return 0;
25548}
25549_ACEOF
25550rm -f conftest.$ac_objext conftest$ac_exeext
25551if { (ac_try="$ac_link"
25552case "(($ac_try" in
25553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25554 *) ac_try_echo=$ac_try;;
25555esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025557 (eval "$ac_link") 2>conftest.er1
25558 ac_status=$?
25559 grep -v '^ *+' conftest.er1 >conftest.err
25560 rm -f conftest.er1
25561 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025563 (exit $ac_status); } && {
25564 test -z "$ac_c_werror_flag" ||
25565 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025566 } && test -s conftest$ac_exeext &&
25567 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025568 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25569else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025570 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025571sed 's/^/| /' conftest.$ac_ext >&5
25572
25573 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25574fi
25575
25576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25577 conftest$ac_exeext conftest.$ac_ext
25578LIBS=$ac_check_lib_save_LIBS
25579fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025580{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25581echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25582if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025583
25584cat >>confdefs.h <<\_ACEOF
25585#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25586_ACEOF
25587
25588fi
25589
25590
Martin v. Löwis0daad592001-09-30 21:09:59 +000025591# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025592{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25593echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025594if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025596else
Martin v. Löwis11437992002-04-12 09:54:03 +000025597 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025598LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025600/* confdefs.h. */
25601_ACEOF
25602cat confdefs.h >>conftest.$ac_ext
25603cat >>conftest.$ac_ext <<_ACEOF
25604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025606/* Override any GCC internal prototype to avoid an error.
25607 Use char because int might match the return type of a GCC
25608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025609#ifdef __cplusplus
25610extern "C"
25611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025612char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025613int
25614main ()
25615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025616return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025617 ;
25618 return 0;
25619}
25620_ACEOF
25621rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025622if { (ac_try="$ac_link"
25623case "(($ac_try" in
25624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25625 *) ac_try_echo=$ac_try;;
25626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025628 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025630 grep -v '^ *+' conftest.er1 >conftest.err
25631 rm -f conftest.er1
25632 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025634 (exit $ac_status); } && {
25635 test -z "$ac_c_werror_flag" ||
25636 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025637 } && test -s conftest$ac_exeext &&
25638 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025639 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025642sed 's/^/| /' conftest.$ac_ext >&5
25643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025644 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025646
25647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025649LIBS=$ac_check_lib_save_LIBS
25650fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025651{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25652echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25653if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025654
Martin v. Löwis11437992002-04-12 09:54:03 +000025655cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025656#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025657_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025658
Guido van Rossum353ae582001-07-10 16:45:32 +000025659fi
25660
Jack Jansendd19cf82001-12-06 22:36:17 +000025661
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025662# also in readline 4.2
25663cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025664/* confdefs.h. */
25665_ACEOF
25666cat confdefs.h >>conftest.$ac_ext
25667cat >>conftest.$ac_ext <<_ACEOF
25668/* end confdefs.h. */
25669#include <readline/readline.h>
25670_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025671if { (ac_try="$ac_cpp conftest.$ac_ext"
25672case "(($ac_try" in
25673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25674 *) ac_try_echo=$ac_try;;
25675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025678 ac_status=$?
25679 grep -v '^ *+' conftest.er1 >conftest.err
25680 rm -f conftest.er1
25681 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025683 (exit $ac_status); } >/dev/null && {
25684 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25685 test ! -s conftest.err
25686 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025687 have_readline=yes
25688else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025689 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025690sed 's/^/| /' conftest.$ac_ext >&5
25691
25692 have_readline=no
25693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025694
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025695rm -f conftest.err conftest.$ac_ext
25696if test $have_readline = yes
25697then
25698 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025699/* confdefs.h. */
25700_ACEOF
25701cat confdefs.h >>conftest.$ac_ext
25702cat >>conftest.$ac_ext <<_ACEOF
25703/* end confdefs.h. */
25704#include <readline/readline.h>
25705
25706_ACEOF
25707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25708 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25709
25710cat >>confdefs.h <<\_ACEOF
25711#define HAVE_RL_CATCH_SIGNAL 1
25712_ACEOF
25713
25714fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025715rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025716
25717fi
25718
Martin v. Löwis82bca632006-02-10 20:49:30 +000025719# End of readline checks: restore LIBS
25720LIBS=$LIBS_no_readline
25721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025722{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25723echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025724if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025725 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025726else
Martin v. Löwis11437992002-04-12 09:54:03 +000025727
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025728if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025729 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025730else
Martin v. Löwis11437992002-04-12 09:54:03 +000025731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025732/* confdefs.h. */
25733_ACEOF
25734cat confdefs.h >>conftest.$ac_ext
25735cat >>conftest.$ac_ext <<_ACEOF
25736/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025737
25738int main()
25739{
25740 int val1 = nice(1);
25741 if (val1 != -1 && val1 == nice(2))
25742 exit(0);
25743 exit(1);
25744}
25745
Martin v. Löwis11437992002-04-12 09:54:03 +000025746_ACEOF
25747rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025748if { (ac_try="$ac_link"
25749case "(($ac_try" in
25750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25751 *) ac_try_echo=$ac_try;;
25752esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025754 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025755 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025757 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025758 { (case "(($ac_try" in
25759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25760 *) ac_try_echo=$ac_try;;
25761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025763 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025764 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025766 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025767 ac_cv_broken_nice=yes
25768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025769 echo "$as_me: program exited with status $ac_status" >&5
25770echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025771sed 's/^/| /' conftest.$ac_ext >&5
25772
Martin v. Löwis11437992002-04-12 09:54:03 +000025773( exit $ac_status )
25774ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025776rm -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 +000025777fi
25778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025779
25780fi
25781
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025782{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25783echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025784if test "$ac_cv_broken_nice" = yes
25785then
Martin v. Löwis11437992002-04-12 09:54:03 +000025786
25787cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025788#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025789_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025790
25791fi
25792
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025793{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25794echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025795if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025796 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025797else
25798 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025799 ac_cv_broken_poll=no
25800else
25801 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025802/* confdefs.h. */
25803_ACEOF
25804cat confdefs.h >>conftest.$ac_ext
25805cat >>conftest.$ac_ext <<_ACEOF
25806/* end confdefs.h. */
25807
25808#include <poll.h>
25809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025810int main()
25811{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025812 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025813 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025814
25815 close (42);
25816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025817 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025818 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025819 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025820 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025821 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025822 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025823 return 1;
25824}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025825
25826_ACEOF
25827rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025828if { (ac_try="$ac_link"
25829case "(($ac_try" in
25830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25831 *) ac_try_echo=$ac_try;;
25832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025834 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025838 { (case "(($ac_try" in
25839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25840 *) ac_try_echo=$ac_try;;
25841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025843 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025844 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025846 (exit $ac_status); }; }; then
25847 ac_cv_broken_poll=yes
25848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025849 echo "$as_me: program exited with status $ac_status" >&5
25850echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025851sed 's/^/| /' conftest.$ac_ext >&5
25852
25853( exit $ac_status )
25854ac_cv_broken_poll=no
25855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025856rm -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 +000025857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025858
25859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025860fi
25861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25863echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025864if test "$ac_cv_broken_poll" = yes
25865then
25866
25867cat >>confdefs.h <<\_ACEOF
25868#define HAVE_BROKEN_POLL 1
25869_ACEOF
25870
25871fi
25872
Brett Cannon43802422005-02-10 20:48:03 +000025873# 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 +000025874# (which is not required by ISO C or UNIX spec) and/or if we support
25875# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025876{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25877echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025878if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025879 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025880else
25881 cat >conftest.$ac_ext <<_ACEOF
25882/* confdefs.h. */
25883_ACEOF
25884cat confdefs.h >>conftest.$ac_ext
25885cat >>conftest.$ac_ext <<_ACEOF
25886/* end confdefs.h. */
25887#include <sys/types.h>
25888#include <$ac_cv_struct_tm>
25889
25890
25891int
25892main ()
25893{
25894static struct tm ac_aggr;
25895if (ac_aggr.tm_zone)
25896return 0;
25897 ;
25898 return 0;
25899}
25900_ACEOF
25901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025902if { (ac_try="$ac_compile"
25903case "(($ac_try" in
25904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25905 *) ac_try_echo=$ac_try;;
25906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025908 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025909 ac_status=$?
25910 grep -v '^ *+' conftest.er1 >conftest.err
25911 rm -f conftest.er1
25912 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914 (exit $ac_status); } && {
25915 test -z "$ac_c_werror_flag" ||
25916 test ! -s conftest.err
25917 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025918 ac_cv_member_struct_tm_tm_zone=yes
25919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025920 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025921sed 's/^/| /' conftest.$ac_ext >&5
25922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025924/* confdefs.h. */
25925_ACEOF
25926cat confdefs.h >>conftest.$ac_ext
25927cat >>conftest.$ac_ext <<_ACEOF
25928/* end confdefs.h. */
25929#include <sys/types.h>
25930#include <$ac_cv_struct_tm>
25931
25932
25933int
25934main ()
25935{
25936static struct tm ac_aggr;
25937if (sizeof ac_aggr.tm_zone)
25938return 0;
25939 ;
25940 return 0;
25941}
25942_ACEOF
25943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944if { (ac_try="$ac_compile"
25945case "(($ac_try" in
25946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25947 *) ac_try_echo=$ac_try;;
25948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025950 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025951 ac_status=$?
25952 grep -v '^ *+' conftest.er1 >conftest.err
25953 rm -f conftest.er1
25954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025956 (exit $ac_status); } && {
25957 test -z "$ac_c_werror_flag" ||
25958 test ! -s conftest.err
25959 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025960 ac_cv_member_struct_tm_tm_zone=yes
25961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025962 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025963sed 's/^/| /' conftest.$ac_ext >&5
25964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025965 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025967
25968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025970
25971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025973{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25974echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25975if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025976
25977cat >>confdefs.h <<_ACEOF
25978#define HAVE_STRUCT_TM_TM_ZONE 1
25979_ACEOF
25980
25981
25982fi
25983
25984if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25985
25986cat >>confdefs.h <<\_ACEOF
25987#define HAVE_TM_ZONE 1
25988_ACEOF
25989
25990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025991 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25992echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025994 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995else
25996 cat >conftest.$ac_ext <<_ACEOF
25997/* confdefs.h. */
25998_ACEOF
25999cat confdefs.h >>conftest.$ac_ext
26000cat >>conftest.$ac_ext <<_ACEOF
26001/* end confdefs.h. */
26002#include <time.h>
26003
26004int
26005main ()
26006{
26007#ifndef tzname
26008 (void) tzname;
26009#endif
26010
26011 ;
26012 return 0;
26013}
26014_ACEOF
26015rm -f conftest.$ac_objext
26016if { (ac_try="$ac_compile"
26017case "(($ac_try" in
26018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26019 *) ac_try_echo=$ac_try;;
26020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026022 (eval "$ac_compile") 2>conftest.er1
26023 ac_status=$?
26024 grep -v '^ *+' conftest.er1 >conftest.err
26025 rm -f conftest.er1
26026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026028 (exit $ac_status); } && {
26029 test -z "$ac_c_werror_flag" ||
26030 test ! -s conftest.err
26031 } && test -s conftest.$ac_objext; then
26032 ac_cv_have_decl_tzname=yes
26033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026035sed 's/^/| /' conftest.$ac_ext >&5
26036
26037 ac_cv_have_decl_tzname=no
26038fi
26039
26040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26041fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026042{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26043echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26044if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026045
26046cat >>confdefs.h <<_ACEOF
26047#define HAVE_DECL_TZNAME 1
26048_ACEOF
26049
26050
26051else
26052 cat >>confdefs.h <<_ACEOF
26053#define HAVE_DECL_TZNAME 0
26054_ACEOF
26055
26056
26057fi
26058
26059
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026060 { echo "$as_me:$LINENO: checking for tzname" >&5
26061echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026062if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026063 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026064else
26065 cat >conftest.$ac_ext <<_ACEOF
26066/* confdefs.h. */
26067_ACEOF
26068cat confdefs.h >>conftest.$ac_ext
26069cat >>conftest.$ac_ext <<_ACEOF
26070/* end confdefs.h. */
26071#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072#if !HAVE_DECL_TZNAME
26073extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026074#endif
26075
26076int
26077main ()
26078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026079return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026080 ;
26081 return 0;
26082}
26083_ACEOF
26084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026085if { (ac_try="$ac_link"
26086case "(($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_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026092 ac_status=$?
26093 grep -v '^ *+' conftest.er1 >conftest.err
26094 rm -f conftest.er1
26095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097 (exit $ac_status); } && {
26098 test -z "$ac_c_werror_flag" ||
26099 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026100 } && test -s conftest$ac_exeext &&
26101 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026102 ac_cv_var_tzname=yes
26103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026104 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026105sed 's/^/| /' conftest.$ac_ext >&5
26106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026107 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109
26110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026111 conftest$ac_exeext conftest.$ac_ext
26112fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026113{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26114echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026115 if test $ac_cv_var_tzname = yes; then
26116
26117cat >>confdefs.h <<\_ACEOF
26118#define HAVE_TZNAME 1
26119_ACEOF
26120
26121 fi
26122fi
26123
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026124
Martin v. Löwis1d459062005-03-14 21:23:33 +000026125# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026126{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26127echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026128if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026130else
26131
26132if test "$cross_compiling" = yes; then
26133 ac_cv_working_tzset=no
26134else
26135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026136/* confdefs.h. */
26137_ACEOF
26138cat confdefs.h >>conftest.$ac_ext
26139cat >>conftest.$ac_ext <<_ACEOF
26140/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026141
26142#include <stdlib.h>
26143#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026144#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026145
26146#if HAVE_TZNAME
26147extern char *tzname[];
26148#endif
26149
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026150int main()
26151{
Brett Cannon18367812003-09-19 00:59:16 +000026152 /* Note that we need to ensure that not only does tzset(3)
26153 do 'something' with localtime, but it works as documented
26154 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026155 This includes making sure that tzname is set properly if
26156 tm->tm_zone does not exist since it is the alternative way
26157 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026158
26159 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026160 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026161 */
26162
Martin v. Löwis1d459062005-03-14 21:23:33 +000026163 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026164 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26165
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026166 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026167 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026168 if (localtime(&groundhogday)->tm_hour != 0)
26169 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026170#if HAVE_TZNAME
26171 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26172 if (strcmp(tzname[0], "UTC") ||
26173 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26174 exit(1);
26175#endif
Brett Cannon18367812003-09-19 00:59:16 +000026176
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026177 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026178 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026179 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026180 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026181#if HAVE_TZNAME
26182 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26183 exit(1);
26184#endif
Brett Cannon18367812003-09-19 00:59:16 +000026185
26186 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26187 tzset();
26188 if (localtime(&groundhogday)->tm_hour != 11)
26189 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026190#if HAVE_TZNAME
26191 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26192 exit(1);
26193#endif
26194
26195#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026196 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26197 exit(1);
26198 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26199 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026200#endif
Brett Cannon18367812003-09-19 00:59:16 +000026201
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026202 exit(0);
26203}
26204
26205_ACEOF
26206rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026207if { (ac_try="$ac_link"
26208case "(($ac_try" in
26209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26210 *) ac_try_echo=$ac_try;;
26211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026214 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026217 { (case "(($ac_try" in
26218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26219 *) ac_try_echo=$ac_try;;
26220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026222 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026223 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026225 (exit $ac_status); }; }; then
26226 ac_cv_working_tzset=yes
26227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026228 echo "$as_me: program exited with status $ac_status" >&5
26229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026230sed 's/^/| /' conftest.$ac_ext >&5
26231
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026232( exit $ac_status )
26233ac_cv_working_tzset=no
26234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026235rm -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 +000026236fi
26237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026238
26239fi
26240
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026241{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26242echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026243if test "$ac_cv_working_tzset" = yes
26244then
26245
26246cat >>confdefs.h <<\_ACEOF
26247#define HAVE_WORKING_TZSET 1
26248_ACEOF
26249
26250fi
26251
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026252# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026253{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26254echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026255if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026256 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026257else
26258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026259/* confdefs.h. */
26260_ACEOF
26261cat confdefs.h >>conftest.$ac_ext
26262cat >>conftest.$ac_ext <<_ACEOF
26263/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026264#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026265int
26266main ()
26267{
26268
26269struct stat st;
26270st.st_mtim.tv_nsec = 1;
26271
26272 ;
26273 return 0;
26274}
26275_ACEOF
26276rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026277if { (ac_try="$ac_compile"
26278case "(($ac_try" in
26279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26280 *) ac_try_echo=$ac_try;;
26281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026285 grep -v '^ *+' conftest.er1 >conftest.err
26286 rm -f conftest.er1
26287 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026289 (exit $ac_status); } && {
26290 test -z "$ac_c_werror_flag" ||
26291 test ! -s conftest.err
26292 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026293 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026296sed 's/^/| /' conftest.$ac_ext >&5
26297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026298 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026299fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26302fi
26303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026304{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26305echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026306if test "$ac_cv_stat_tv_nsec" = yes
26307then
26308
26309cat >>confdefs.h <<\_ACEOF
26310#define HAVE_STAT_TV_NSEC 1
26311_ACEOF
26312
26313fi
26314
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026315# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026316{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26317echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026318if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026319 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026320else
26321 cat >conftest.$ac_ext <<_ACEOF
26322/* confdefs.h. */
26323_ACEOF
26324cat confdefs.h >>conftest.$ac_ext
26325cat >>conftest.$ac_ext <<_ACEOF
26326/* end confdefs.h. */
26327#include <sys/stat.h>
26328int
26329main ()
26330{
26331
26332struct stat st;
26333st.st_mtimespec.tv_nsec = 1;
26334
26335 ;
26336 return 0;
26337}
26338_ACEOF
26339rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026340if { (ac_try="$ac_compile"
26341case "(($ac_try" in
26342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26343 *) ac_try_echo=$ac_try;;
26344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026347 ac_status=$?
26348 grep -v '^ *+' conftest.er1 >conftest.err
26349 rm -f conftest.er1
26350 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026352 (exit $ac_status); } && {
26353 test -z "$ac_c_werror_flag" ||
26354 test ! -s conftest.err
26355 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026356 ac_cv_stat_tv_nsec2=yes
26357else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026358 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026359sed 's/^/| /' conftest.$ac_ext >&5
26360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026362fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26365fi
26366
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026367{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26368echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026369if test "$ac_cv_stat_tv_nsec2" = yes
26370then
26371
26372cat >>confdefs.h <<\_ACEOF
26373#define HAVE_STAT_TV_NSEC2 1
26374_ACEOF
26375
26376fi
26377
Jack Jansen666b1e72001-10-31 12:11:48 +000026378# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026379{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26380echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026381if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026383else
Martin v. Löwis11437992002-04-12 09:54:03 +000026384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026385/* confdefs.h. */
26386_ACEOF
26387cat confdefs.h >>conftest.$ac_ext
26388cat >>conftest.$ac_ext <<_ACEOF
26389/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026390#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026391int
26392main ()
26393{
Jack Jansen666b1e72001-10-31 12:11:48 +000026394
26395 int rtn;
26396 rtn = mvwdelch(0,0,0);
26397
Martin v. Löwis11437992002-04-12 09:54:03 +000026398 ;
26399 return 0;
26400}
26401_ACEOF
26402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026403if { (ac_try="$ac_compile"
26404case "(($ac_try" in
26405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26406 *) ac_try_echo=$ac_try;;
26407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026411 grep -v '^ *+' conftest.er1 >conftest.err
26412 rm -f conftest.er1
26413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026415 (exit $ac_status); } && {
26416 test -z "$ac_c_werror_flag" ||
26417 test ! -s conftest.err
26418 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026419 ac_cv_mvwdelch_is_expression=yes
26420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026422sed 's/^/| /' conftest.$ac_ext >&5
26423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026425fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26428fi
26429
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026430{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26431echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026432
26433if test "$ac_cv_mvwdelch_is_expression" = yes
26434then
Martin v. Löwis11437992002-04-12 09:54:03 +000026435
26436cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026437#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026438_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026439
26440fi
26441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026442{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26443echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026444if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026445 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026446else
Martin v. Löwis11437992002-04-12 09:54:03 +000026447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026448/* confdefs.h. */
26449_ACEOF
26450cat confdefs.h >>conftest.$ac_ext
26451cat >>conftest.$ac_ext <<_ACEOF
26452/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026453#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026454int
26455main ()
26456{
Jack Jansen666b1e72001-10-31 12:11:48 +000026457
26458 WINDOW *w;
26459 w->_flags = 0;
26460
Martin v. Löwis11437992002-04-12 09:54:03 +000026461 ;
26462 return 0;
26463}
26464_ACEOF
26465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026466if { (ac_try="$ac_compile"
26467case "(($ac_try" in
26468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26469 *) ac_try_echo=$ac_try;;
26470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026474 grep -v '^ *+' conftest.er1 >conftest.err
26475 rm -f conftest.er1
26476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478 (exit $ac_status); } && {
26479 test -z "$ac_c_werror_flag" ||
26480 test ! -s conftest.err
26481 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026482 ac_cv_window_has_flags=yes
26483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026485sed 's/^/| /' conftest.$ac_ext >&5
26486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026487 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026488fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26491fi
26492
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026493{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26494echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026495
Jack Jansen666b1e72001-10-31 12:11:48 +000026496
26497if test "$ac_cv_window_has_flags" = yes
26498then
Martin v. Löwis11437992002-04-12 09:54:03 +000026499
26500cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026501#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026502_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026503
26504fi
26505
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026506{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26507echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026508cat >conftest.$ac_ext <<_ACEOF
26509/* confdefs.h. */
26510_ACEOF
26511cat confdefs.h >>conftest.$ac_ext
26512cat >>conftest.$ac_ext <<_ACEOF
26513/* end confdefs.h. */
26514#include <curses.h>
26515int
26516main ()
26517{
26518void *x=is_term_resized
26519 ;
26520 return 0;
26521}
26522_ACEOF
26523rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026524if { (ac_try="$ac_compile"
26525case "(($ac_try" in
26526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26527 *) ac_try_echo=$ac_try;;
26528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026531 ac_status=$?
26532 grep -v '^ *+' conftest.er1 >conftest.err
26533 rm -f conftest.er1
26534 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536 (exit $ac_status); } && {
26537 test -z "$ac_c_werror_flag" ||
26538 test ! -s conftest.err
26539 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026540
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026541cat >>confdefs.h <<\_ACEOF
26542#define HAVE_CURSES_IS_TERM_RESIZED 1
26543_ACEOF
26544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026545 { echo "$as_me:$LINENO: result: yes" >&5
26546echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026548 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026549sed 's/^/| /' conftest.$ac_ext >&5
26550
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026551 { echo "$as_me:$LINENO: result: no" >&5
26552echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026553
26554fi
26555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26557
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026558{ echo "$as_me:$LINENO: checking for resize_term" >&5
26559echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026560cat >conftest.$ac_ext <<_ACEOF
26561/* confdefs.h. */
26562_ACEOF
26563cat confdefs.h >>conftest.$ac_ext
26564cat >>conftest.$ac_ext <<_ACEOF
26565/* end confdefs.h. */
26566#include <curses.h>
26567int
26568main ()
26569{
26570void *x=resize_term
26571 ;
26572 return 0;
26573}
26574_ACEOF
26575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026576if { (ac_try="$ac_compile"
26577case "(($ac_try" in
26578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26579 *) ac_try_echo=$ac_try;;
26580esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026582 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026583 ac_status=$?
26584 grep -v '^ *+' conftest.er1 >conftest.err
26585 rm -f conftest.er1
26586 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026588 (exit $ac_status); } && {
26589 test -z "$ac_c_werror_flag" ||
26590 test ! -s conftest.err
26591 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026592
26593cat >>confdefs.h <<\_ACEOF
26594#define HAVE_CURSES_RESIZE_TERM 1
26595_ACEOF
26596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026597 { echo "$as_me:$LINENO: result: yes" >&5
26598echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026600 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026601sed 's/^/| /' conftest.$ac_ext >&5
26602
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026603 { echo "$as_me:$LINENO: result: no" >&5
26604echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026605
26606fi
26607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026610{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26611echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026612cat >conftest.$ac_ext <<_ACEOF
26613/* confdefs.h. */
26614_ACEOF
26615cat confdefs.h >>conftest.$ac_ext
26616cat >>conftest.$ac_ext <<_ACEOF
26617/* end confdefs.h. */
26618#include <curses.h>
26619int
26620main ()
26621{
26622void *x=resizeterm
26623 ;
26624 return 0;
26625}
26626_ACEOF
26627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026628if { (ac_try="$ac_compile"
26629case "(($ac_try" in
26630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26631 *) ac_try_echo=$ac_try;;
26632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026634 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026635 ac_status=$?
26636 grep -v '^ *+' conftest.er1 >conftest.err
26637 rm -f conftest.er1
26638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026640 (exit $ac_status); } && {
26641 test -z "$ac_c_werror_flag" ||
26642 test ! -s conftest.err
26643 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026644
26645cat >>confdefs.h <<\_ACEOF
26646#define HAVE_CURSES_RESIZETERM 1
26647_ACEOF
26648
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026649 { echo "$as_me:$LINENO: result: yes" >&5
26650echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026651else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026652 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026653sed 's/^/| /' conftest.$ac_ext >&5
26654
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026655 { echo "$as_me:$LINENO: result: no" >&5
26656echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026657
26658fi
26659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026662{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26663echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026664
26665if test -r /dev/ptmx
26666then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026667 { echo "$as_me:$LINENO: result: yes" >&5
26668echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026669
26670cat >>confdefs.h <<\_ACEOF
26671#define HAVE_DEV_PTMX 1
26672_ACEOF
26673
Thomas Wouters89f507f2006-12-13 04:49:30 +000026674else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026675 { echo "$as_me:$LINENO: result: no" >&5
26676echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026677fi
26678
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026679{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26680echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026681
26682if test -r /dev/ptc
26683then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026684 { echo "$as_me:$LINENO: result: yes" >&5
26685echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026686
26687cat >>confdefs.h <<\_ACEOF
26688#define HAVE_DEV_PTC 1
26689_ACEOF
26690
Thomas Wouters89f507f2006-12-13 04:49:30 +000026691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026692 { echo "$as_me:$LINENO: result: no" >&5
26693echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026694fi
26695
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026696if test "$have_long_long" = yes
26697then
26698 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26699echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26700 if test "${ac_cv_have_long_long_format+set}" = set; then
26701 echo $ECHO_N "(cached) $ECHO_C" >&6
26702else
26703 if test "$cross_compiling" = yes; then
26704 ac_cv_have_long_long_format=no
26705else
26706 cat >conftest.$ac_ext <<_ACEOF
26707/* confdefs.h. */
26708_ACEOF
26709cat confdefs.h >>conftest.$ac_ext
26710cat >>conftest.$ac_ext <<_ACEOF
26711/* end confdefs.h. */
26712
26713 #include <stdio.h>
26714 #include <stddef.h>
26715 #include <string.h>
26716
26717 #ifdef HAVE_SYS_TYPES_H
26718 #include <sys/types.h>
26719 #endif
26720
26721 int main()
26722 {
26723 char buffer[256];
26724
26725 if (sprintf(buffer, "%lld", (long long)123) < 0)
26726 return 1;
26727 if (strcmp(buffer, "123"))
26728 return 1;
26729
26730 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26731 return 1;
26732 if (strcmp(buffer, "-123"))
26733 return 1;
26734
26735 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26736 return 1;
26737 if (strcmp(buffer, "123"))
26738 return 1;
26739
26740 return 0;
26741 }
26742
26743_ACEOF
26744rm -f conftest$ac_exeext
26745if { (ac_try="$ac_link"
26746case "(($ac_try" in
26747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26748 *) ac_try_echo=$ac_try;;
26749esac
26750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26751 (eval "$ac_link") 2>&5
26752 ac_status=$?
26753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26755 { (case "(($ac_try" in
26756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26757 *) ac_try_echo=$ac_try;;
26758esac
26759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26760 (eval "$ac_try") 2>&5
26761 ac_status=$?
26762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26763 (exit $ac_status); }; }; then
26764 ac_cv_have_long_long_format=yes
26765else
26766 echo "$as_me: program exited with status $ac_status" >&5
26767echo "$as_me: failed program was:" >&5
26768sed 's/^/| /' conftest.$ac_ext >&5
26769
26770( exit $ac_status )
26771ac_cv_have_long_long_format=no
26772fi
26773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26774fi
26775
26776
26777
26778fi
26779
26780 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26781echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26782fi
26783
Mark Dickinson89d7d412009-12-31 20:50:59 +000026784if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026785then
26786
26787cat >>confdefs.h <<\_ACEOF
26788#define PY_FORMAT_LONG_LONG "ll"
26789_ACEOF
26790
26791fi
26792
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026793if test $ac_sys_system = Darwin
26794then
26795 LIBS="$LIBS -framework CoreFoundation"
26796fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026798{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26799echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026800if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026801 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026802else
26803 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026804 ac_cv_have_size_t_format="cross -- assuming yes"
26805
Thomas Wouters477c8d52006-05-27 19:21:47 +000026806else
26807 cat >conftest.$ac_ext <<_ACEOF
26808/* confdefs.h. */
26809_ACEOF
26810cat confdefs.h >>conftest.$ac_ext
26811cat >>conftest.$ac_ext <<_ACEOF
26812/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026813
Thomas Wouters477c8d52006-05-27 19:21:47 +000026814#include <stdio.h>
26815#include <stddef.h>
26816#include <string.h>
26817
Christian Heimes2c181612007-12-17 20:04:13 +000026818#ifdef HAVE_SYS_TYPES_H
26819#include <sys/types.h>
26820#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026821
26822#ifdef HAVE_SSIZE_T
26823typedef ssize_t Py_ssize_t;
26824#elif SIZEOF_VOID_P == SIZEOF_LONG
26825typedef long Py_ssize_t;
26826#else
26827typedef int Py_ssize_t;
26828#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026829
Christian Heimes2c181612007-12-17 20:04:13 +000026830int main()
26831{
26832 char buffer[256];
26833
Thomas Wouters477c8d52006-05-27 19:21:47 +000026834 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26835 return 1;
26836
Thomas Wouters89f507f2006-12-13 04:49:30 +000026837 if (strcmp(buffer, "123"))
26838 return 1;
26839
26840 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26841 return 1;
26842
26843 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026844 return 1;
26845
26846 return 0;
26847}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026848
Thomas Wouters477c8d52006-05-27 19:21:47 +000026849_ACEOF
26850rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851if { (ac_try="$ac_link"
26852case "(($ac_try" in
26853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26854 *) ac_try_echo=$ac_try;;
26855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026857 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026858 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026861 { (case "(($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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026866 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026867 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026869 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026870 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026871else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026872 echo "$as_me: program exited with status $ac_status" >&5
26873echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026874sed 's/^/| /' conftest.$ac_ext >&5
26875
26876( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026877ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026878fi
26879rm -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 +000026880fi
26881
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026884{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26885echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026886if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026887
26888cat >>confdefs.h <<\_ACEOF
26889#define PY_FORMAT_SIZE_T "z"
26890_ACEOF
26891
26892fi
26893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026894{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26895echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026896if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026898else
Martin v. Löwis11437992002-04-12 09:54:03 +000026899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026900/* confdefs.h. */
26901_ACEOF
26902cat confdefs.h >>conftest.$ac_ext
26903cat >>conftest.$ac_ext <<_ACEOF
26904/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026905
26906#ifdef HAVE_SYS_TYPES_H
26907#include <sys/types.h>
26908#endif
26909#ifdef HAVE_SYS_SOCKET_H
26910#include <sys/socket.h>
26911#endif
26912
26913
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026914typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026915int
26916main ()
26917{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026918if ((ac__type_new_ *) 0)
26919 return 0;
26920if (sizeof (ac__type_new_))
26921 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026922 ;
26923 return 0;
26924}
26925_ACEOF
26926rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026927if { (ac_try="$ac_compile"
26928case "(($ac_try" in
26929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26930 *) ac_try_echo=$ac_try;;
26931esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026935 grep -v '^ *+' conftest.er1 >conftest.err
26936 rm -f conftest.er1
26937 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026939 (exit $ac_status); } && {
26940 test -z "$ac_c_werror_flag" ||
26941 test ! -s conftest.err
26942 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026943 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026946sed 's/^/| /' conftest.$ac_ext >&5
26947
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026948 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026950
26951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026952fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026953{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26954echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26955if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026956 :
26957else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026958
Martin v. Löwis01c04012002-11-11 14:58:44 +000026959cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026960#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026961_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026962
26963fi
26964
Michael W. Hudson54241132001-12-07 15:38:26 +000026965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026966{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26967echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026968if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026969 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026970else
26971 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026972 ac_cv_broken_mbstowcs=no
26973else
26974 cat >conftest.$ac_ext <<_ACEOF
26975/* confdefs.h. */
26976_ACEOF
26977cat confdefs.h >>conftest.$ac_ext
26978cat >>conftest.$ac_ext <<_ACEOF
26979/* end confdefs.h. */
26980
26981#include<stdlib.h>
26982int main() {
26983 size_t len = -1;
26984 const char *str = "text";
26985 len = mbstowcs(NULL, str, 0);
26986 return (len != 4);
26987}
26988
26989_ACEOF
26990rm -f conftest$ac_exeext
26991if { (ac_try="$ac_link"
26992case "(($ac_try" in
26993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26994 *) ac_try_echo=$ac_try;;
26995esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026997 (eval "$ac_link") 2>&5
26998 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27001 { (case "(($ac_try" in
27002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27003 *) ac_try_echo=$ac_try;;
27004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027006 (eval "$ac_try") 2>&5
27007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027009 (exit $ac_status); }; }; then
27010 ac_cv_broken_mbstowcs=no
27011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027012 echo "$as_me: program exited with status $ac_status" >&5
27013echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027014sed 's/^/| /' conftest.$ac_ext >&5
27015
27016( exit $ac_status )
27017ac_cv_broken_mbstowcs=yes
27018fi
27019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27020fi
27021
27022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027023fi
27024
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027025{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27026echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027027if test "$ac_cv_broken_mbstowcs" = yes
27028then
27029
27030cat >>confdefs.h <<\_ACEOF
27031#define HAVE_BROKEN_MBSTOWCS 1
27032_ACEOF
27033
27034fi
27035
Antoine Pitroub52ec782009-01-25 16:34:23 +000027036# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27038echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027039
27040# Check whether --with-computed-gotos was given.
27041if test "${with_computed_gotos+set}" = set; then
27042 withval=$with_computed_gotos;
27043if test "$withval" != no
27044then
27045
27046cat >>confdefs.h <<\_ACEOF
27047#define USE_COMPUTED_GOTOS 1
27048_ACEOF
27049
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027050 { echo "$as_me:$LINENO: result: yes" >&5
27051echo "${ECHO_T}yes" >&6; }
27052else { echo "$as_me:$LINENO: result: no" >&5
27053echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027054fi
27055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027056 { echo "$as_me:$LINENO: result: no" >&5
27057echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027058fi
27059
27060
27061
Michael W. Hudson54241132001-12-07 15:38:26 +000027062
27063
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027064for h in `(cd $srcdir;echo Python/thread_*.h)`
27065do
27066 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27067done
27068
Michael W. Hudson54241132001-12-07 15:38:26 +000027069
Neal Norwitzd24499d2005-12-18 21:36:39 +000027070SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027071{ echo "$as_me:$LINENO: checking for build directories" >&5
27072echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027073for dir in $SRCDIRS; do
27074 if test ! -d $dir; then
27075 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027076 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027077done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027078{ echo "$as_me:$LINENO: result: done" >&5
27079echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027080
Guido van Rossum627b2d71993-12-24 10:39:16 +000027081# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027082ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027083
Martin v. Löwis11437992002-04-12 09:54:03 +000027084cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027085# This file is a shell script that caches the results of configure
27086# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027087# scripts and configure runs, see configure's option --config-cache.
27088# It is not useful on other systems. If it contains results you don't
27089# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027090#
Martin v. Löwis11437992002-04-12 09:54:03 +000027091# config.status only pays attention to the cache file if you give it
27092# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027093#
Skip Montanaro6dead952003-09-25 14:50:04 +000027094# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027095# loading this file, other *unset* `ac_cv_foo' will be assigned the
27096# following values.
27097
27098_ACEOF
27099
Guido van Rossumf78abae1997-01-21 22:02:36 +000027100# The following way of writing the cache mishandles newlines in values,
27101# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027102# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027103# Ultrix sh set writes to stderr and can't be redirected directly,
27104# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027105(
27106 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27107 eval ac_val=\$$ac_var
27108 case $ac_val in #(
27109 *${as_nl}*)
27110 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27112echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027113 esac
27114 case $ac_var in #(
27115 _ | IFS | as_nl) ;; #(
27116 *) $as_unset $ac_var ;;
27117 esac ;;
27118 esac
27119 done
27120
Martin v. Löwis11437992002-04-12 09:54:03 +000027121 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027122 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27123 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027124 # `set' does not quote correctly, so add quotes (double-quote
27125 # substitution turns \\\\ into \\, and sed turns \\ into \).
27126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027127 "s/'/'\\\\''/g;
27128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027129 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027130 *)
27131 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027132 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027133 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027134 esac |
27135 sort
27136) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027137 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027138 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027139 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027140 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027141 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27142 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027143 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27144 :end' >>confcache
27145if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27146 if test -w "$cache_file"; then
27147 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027148 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27149echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027150 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027151 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027152 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27153echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027154 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027155fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027156rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027158test "x$prefix" = xNONE && prefix=$ac_default_prefix
27159# Let make expand exec_prefix.
27160test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027162DEFS=-DHAVE_CONFIG_H
27163
Skip Montanaro6dead952003-09-25 14:50:04 +000027164ac_libobjs=
27165ac_ltlibobjs=
27166for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27167 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027168 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027169 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027170 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27171 # will be set to the directory where LIBOBJS objects are built.
27172 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27173 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027174done
27175LIBOBJS=$ac_libobjs
27176
27177LTLIBOBJS=$ac_ltlibobjs
27178
27179
Martin v. Löwis11437992002-04-12 09:54:03 +000027180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027181: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027182ac_clean_files_save=$ac_clean_files
27183ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027184{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27185echo "$as_me: creating $CONFIG_STATUS" >&6;}
27186cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027187#! $SHELL
27188# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027189# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027190# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027191# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027192
Martin v. Löwis11437992002-04-12 09:54:03 +000027193debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027194ac_cs_recheck=false
27195ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027196SHELL=\${CONFIG_SHELL-$SHELL}
27197_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027199cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027200## --------------------- ##
27201## M4sh Initialization. ##
27202## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027204# Be more Bourne compatible
27205DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027206if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27207 emulate sh
27208 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027209 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027210 # is contrary to our usage. Disable this feature.
27211 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027212 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027213else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027214 case `(set -o) 2>/dev/null` in
27215 *posix*) set -o posix ;;
27216esac
27217
Michael W. Hudson54241132001-12-07 15:38:26 +000027218fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027219
27220
Michael W. Hudson54241132001-12-07 15:38:26 +000027221
Michael W. Hudson54241132001-12-07 15:38:26 +000027222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027223# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027224# Avoid depending upon Character Ranges.
27225as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27226as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27227as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27228as_cr_digits='0123456789'
27229as_cr_alnum=$as_cr_Letters$as_cr_digits
27230
27231# The user is always right.
27232if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027233 echo "#! /bin/sh" >conf$$.sh
27234 echo "exit 0" >>conf$$.sh
27235 chmod +x conf$$.sh
27236 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27237 PATH_SEPARATOR=';'
27238 else
27239 PATH_SEPARATOR=:
27240 fi
27241 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027242fi
27243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027244# Support unset when possible.
27245if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27246 as_unset=unset
27247else
27248 as_unset=false
27249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027251
27252# IFS
27253# We need space, tab and new line, in precisely that order. Quoting is
27254# there to prevent editors from complaining about space-tab.
27255# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27256# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027257as_nl='
27258'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027259IFS=" "" $as_nl"
27260
27261# Find who we are. Look in the path if we contain no directory separator.
27262case $0 in
27263 *[\\/]* ) as_myself=$0 ;;
27264 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027265for as_dir in $PATH
27266do
27267 IFS=$as_save_IFS
27268 test -z "$as_dir" && as_dir=.
27269 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27270done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027271IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027273 ;;
27274esac
27275# We did not find ourselves, most probably we were run as `sh COMMAND'
27276# in which case we are not to be found in the path.
27277if test "x$as_myself" = x; then
27278 as_myself=$0
27279fi
27280if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027281 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027282 { (exit 1); exit 1; }
27283fi
27284
27285# Work around bugs in pre-3.0 UWIN ksh.
27286for as_var in ENV MAIL MAILPATH
27287do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27288done
27289PS1='$ '
27290PS2='> '
27291PS4='+ '
27292
27293# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027294for as_var in \
27295 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27296 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27297 LC_TELEPHONE LC_TIME
27298do
27299 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27300 eval $as_var=C; export $as_var
27301 else
27302 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27303 fi
27304done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027305
27306# Required to use basename.
27307if expr a : '\(a\)' >/dev/null 2>&1 &&
27308 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27309 as_expr=expr
27310else
27311 as_expr=false
27312fi
27313
27314if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27315 as_basename=basename
27316else
27317 as_basename=false
27318fi
27319
27320
27321# Name of the executable.
27322as_me=`$as_basename -- "$0" ||
27323$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27324 X"$0" : 'X\(//\)$' \| \
27325 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027326echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027327 sed '/^.*\/\([^/][^/]*\)\/*$/{
27328 s//\1/
27329 q
27330 }
27331 /^X\/\(\/\/\)$/{
27332 s//\1/
27333 q
27334 }
27335 /^X\/\(\/\).*/{
27336 s//\1/
27337 q
27338 }
27339 s/.*/./; q'`
27340
27341# CDPATH.
27342$as_unset CDPATH
27343
27344
27345
Martin v. Löwis11437992002-04-12 09:54:03 +000027346 as_lineno_1=$LINENO
27347 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027348 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027349 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027350
Martin v. Löwis11437992002-04-12 09:54:03 +000027351 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27352 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027353 # line-number line after each line using $LINENO; the second 'sed'
27354 # does the real work. The second script uses 'N' to pair each
27355 # line-number line with the line containing $LINENO, and appends
27356 # trailing '-' during substitution so that $LINENO is not a special
27357 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027358 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027359 # scripts with optimization help from Paolo Bonzini. Blame Lee
27360 # E. McMahon (1931-1989) for sed's syntax. :-)
27361 sed -n '
27362 p
27363 /[$]LINENO/=
27364 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027365 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027366 s/[$]LINENO.*/&-/
27367 t lineno
27368 b
27369 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027370 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027371 :loop
27372 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027373 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027374 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027375 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027377 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027378 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027379
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 # Don't try to exec as it changes $[0], causing all sort of problems
27381 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 # original and so on. Autoconf is especially sensitive to this).
27383 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027384 # Exit status is that of the last command.
27385 exit
27386}
27387
27388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027389if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27390 as_dirname=dirname
27391else
27392 as_dirname=false
27393fi
27394
27395ECHO_C= ECHO_N= ECHO_T=
27396case `echo -n x` in
27397-n*)
27398 case `echo 'x\c'` in
27399 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27400 *) ECHO_C='\c';;
27401 esac;;
27402*)
27403 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027404esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027406if expr a : '\(a\)' >/dev/null 2>&1 &&
27407 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027408 as_expr=expr
27409else
27410 as_expr=false
27411fi
27412
27413rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414if test -d conf$$.dir; then
27415 rm -f conf$$.dir/conf$$.file
27416else
27417 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027418 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027419fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027420echo >conf$$.file
27421if ln -s conf$$.file conf$$ 2>/dev/null; then
27422 as_ln_s='ln -s'
27423 # ... but there are two gotchas:
27424 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27425 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27426 # In both cases, we have to default to `cp -p'.
27427 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027428 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027429elif ln conf$$.file conf$$ 2>/dev/null; then
27430 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027431else
27432 as_ln_s='cp -p'
27433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27435rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027436
Skip Montanaro6dead952003-09-25 14:50:04 +000027437if mkdir -p . 2>/dev/null; then
27438 as_mkdir_p=:
27439else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027440 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027441 as_mkdir_p=false
27442fi
27443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027444if test -x / >/dev/null 2>&1; then
27445 as_test_x='test -x'
27446else
27447 if ls -dL / >/dev/null 2>&1; then
27448 as_ls_L_option=L
27449 else
27450 as_ls_L_option=
27451 fi
27452 as_test_x='
27453 eval sh -c '\''
27454 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 else
27457 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027458 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027459 esac;
27460 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27461 ???[sx]*):;;*)false;;esac;fi
27462 '\'' sh
27463 '
27464fi
27465as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027466
27467# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027468as_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 +000027469
27470# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027471as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027472
27473
Martin v. Löwis11437992002-04-12 09:54:03 +000027474exec 6>&1
27475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027476# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027477# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027478# values after options handling.
27479ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027480This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027481generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027482
27483 CONFIG_FILES = $CONFIG_FILES
27484 CONFIG_HEADERS = $CONFIG_HEADERS
27485 CONFIG_LINKS = $CONFIG_LINKS
27486 CONFIG_COMMANDS = $CONFIG_COMMANDS
27487 $ $0 $@
27488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027489on `(hostname || uname -n) 2>/dev/null | sed 1q`
27490"
27491
Martin v. Löwis11437992002-04-12 09:54:03 +000027492_ACEOF
27493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027494cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027495# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027496config_files="$ac_config_files"
27497config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027499_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027500
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027502ac_cs_usage="\
27503\`$as_me' instantiates files from templates according to the
27504current configuration.
27505
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027506Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027507
27508 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027509 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027510 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027511 -d, --debug don't remove temporary files
27512 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027513 --file=FILE[:TEMPLATE]
27514 instantiate the configuration file FILE
27515 --header=FILE[:TEMPLATE]
27516 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027517
27518Configuration files:
27519$config_files
27520
27521Configuration headers:
27522$config_headers
27523
27524Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027526_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027527cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027528ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027529python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027530configured by $0, generated by GNU Autoconf 2.61,
27531 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027533Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027534This config.status script is free software; the Free Software Foundation
27535gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027536
27537ac_pwd='$ac_pwd'
27538srcdir='$srcdir'
27539INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027540_ACEOF
27541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027542cat >>$CONFIG_STATUS <<\_ACEOF
27543# If no file are specified by the user, then we need to provide default
27544# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027545ac_need_defaults=:
27546while test $# != 0
27547do
27548 case $1 in
27549 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027550 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27551 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027552 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027553 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027555 ac_option=$1
27556 ac_optarg=$2
27557 ac_shift=shift
27558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027559 esac
27560
Skip Montanaro6dead952003-09-25 14:50:04 +000027561 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027562 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027563 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27564 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027565 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027566 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027567 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027568 debug=: ;;
27569 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027570 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027571 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027572 ac_need_defaults=false;;
27573 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027574 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027575 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027576 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027577 --he | --h)
27578 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027579 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027580Try \`$0 --help' for more information." >&2
27581 { (exit 1); exit 1; }; };;
27582 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027583 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027584 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27585 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27586 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027587
27588 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027589 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027590Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027591 { (exit 1); exit 1; }; } ;;
27592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027593 *) ac_config_targets="$ac_config_targets $1"
27594 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027595
27596 esac
27597 shift
27598done
27599
Skip Montanaro6dead952003-09-25 14:50:04 +000027600ac_configure_extra_args=
27601
27602if $ac_cs_silent; then
27603 exec 6>/dev/null
27604 ac_configure_extra_args="$ac_configure_extra_args --silent"
27605fi
27606
27607_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027608cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027609if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027610 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27611 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027612 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027613 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027614fi
27615
Martin v. Löwis11437992002-04-12 09:54:03 +000027616_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027617cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618exec 5>>config.log
27619{
27620 echo
27621 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27622## Running $as_me. ##
27623_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027624 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027625} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027627_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027628cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027629_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027630
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027631cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027632
27633# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027634for ac_config_target in $ac_config_targets
27635do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027636 case $ac_config_target in
27637 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27638 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27639 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027640 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27641 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027642 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27643 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027644 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027645
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027646 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27647echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027648 { (exit 1); exit 1; }; };;
27649 esac
27650done
27651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027652
Martin v. Löwis11437992002-04-12 09:54:03 +000027653# If the user did not use the arguments to specify the items to instantiate,
27654# then the envvar interface is used. Set only those that are not.
27655# We use the long form for the default assignment because of an extremely
27656# bizarre bug on SunOS 4.1.3.
27657if $ac_need_defaults; then
27658 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27659 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27660fi
27661
Skip Montanaro6dead952003-09-25 14:50:04 +000027662# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027664# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027665# Hook for its removal unless debugging.
27666# Note that there is a small window in which the directory will not be cleaned:
27667# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027668$debug ||
27669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027670 tmp=
27671 trap 'exit_status=$?
27672 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27673' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027674 trap '{ (exit 1); exit 1; }' 1 2 13 15
27675}
Martin v. Löwis11437992002-04-12 09:54:03 +000027676# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027677
Martin v. Löwis11437992002-04-12 09:54:03 +000027678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027679 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027680 test -n "$tmp" && test -d "$tmp"
27681} ||
27682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027683 tmp=./conf$$-$RANDOM
27684 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027685} ||
27686{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027688 { (exit 1); exit 1; }
27689}
27690
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027691#
27692# Set up the sed scripts for CONFIG_FILES section.
27693#
27694
27695# No need to generate the scripts if there are no CONFIG_FILES.
27696# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027697if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027698
27699_ACEOF
27700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027701
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703ac_delim='%!_!# '
27704for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027705 cat >conf$$subs.sed <<_ACEOF
27706SHELL!$SHELL$ac_delim
27707PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27708PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27709PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27710PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27711PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27712PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27713exec_prefix!$exec_prefix$ac_delim
27714prefix!$prefix$ac_delim
27715program_transform_name!$program_transform_name$ac_delim
27716bindir!$bindir$ac_delim
27717sbindir!$sbindir$ac_delim
27718libexecdir!$libexecdir$ac_delim
27719datarootdir!$datarootdir$ac_delim
27720datadir!$datadir$ac_delim
27721sysconfdir!$sysconfdir$ac_delim
27722sharedstatedir!$sharedstatedir$ac_delim
27723localstatedir!$localstatedir$ac_delim
27724includedir!$includedir$ac_delim
27725oldincludedir!$oldincludedir$ac_delim
27726docdir!$docdir$ac_delim
27727infodir!$infodir$ac_delim
27728htmldir!$htmldir$ac_delim
27729dvidir!$dvidir$ac_delim
27730pdfdir!$pdfdir$ac_delim
27731psdir!$psdir$ac_delim
27732libdir!$libdir$ac_delim
27733localedir!$localedir$ac_delim
27734mandir!$mandir$ac_delim
27735DEFS!$DEFS$ac_delim
27736ECHO_C!$ECHO_C$ac_delim
27737ECHO_N!$ECHO_N$ac_delim
27738ECHO_T!$ECHO_T$ac_delim
27739LIBS!$LIBS$ac_delim
27740build_alias!$build_alias$ac_delim
27741host_alias!$host_alias$ac_delim
27742target_alias!$target_alias$ac_delim
27743VERSION!$VERSION$ac_delim
27744SOVERSION!$SOVERSION$ac_delim
27745CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27746UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27747ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027748LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27750PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27751PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27752PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27753PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27754FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27755FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27756FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27757FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27758FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27759MACHDEP!$MACHDEP$ac_delim
27760SGI_ABI!$SGI_ABI$ac_delim
27761CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27762EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27763CC!$CC$ac_delim
27764CFLAGS!$CFLAGS$ac_delim
27765LDFLAGS!$LDFLAGS$ac_delim
27766CPPFLAGS!$CPPFLAGS$ac_delim
27767ac_ct_CC!$ac_ct_CC$ac_delim
27768EXEEXT!$EXEEXT$ac_delim
27769OBJEXT!$OBJEXT$ac_delim
27770CXX!$CXX$ac_delim
27771MAINCC!$MAINCC$ac_delim
27772CPP!$CPP$ac_delim
27773GREP!$GREP$ac_delim
27774EGREP!$EGREP$ac_delim
27775BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27776LIBRARY!$LIBRARY$ac_delim
27777LDLIBRARY!$LDLIBRARY$ac_delim
27778DLLLIBRARY!$DLLLIBRARY$ac_delim
27779BLDLIBRARY!$BLDLIBRARY$ac_delim
27780LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27781INSTSONAME!$INSTSONAME$ac_delim
27782RUNSHARED!$RUNSHARED$ac_delim
27783LINKCC!$LINKCC$ac_delim
27784GNULD!$GNULD$ac_delim
27785RANLIB!$RANLIB$ac_delim
27786AR!$AR$ac_delim
27787ARFLAGS!$ARFLAGS$ac_delim
27788SVNVERSION!$SVNVERSION$ac_delim
27789INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27790INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27791INSTALL_DATA!$INSTALL_DATA$ac_delim
27792LN!$LN$ac_delim
27793OPT!$OPT$ac_delim
27794BASECFLAGS!$BASECFLAGS$ac_delim
27795UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27796OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27797LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27798SO!$SO$ac_delim
27799LDSHARED!$LDSHARED$ac_delim
27800BLDSHARED!$BLDSHARED$ac_delim
27801CCSHARED!$CCSHARED$ac_delim
27802LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027803_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 break
27807 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027808 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27809echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810 { (exit 1); exit 1; }; }
27811 else
27812 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027813 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027814done
27815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027816ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27817if test -n "$ac_eof"; then
27818 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27819 ac_eof=`expr $ac_eof + 1`
27820fi
27821
27822cat >>$CONFIG_STATUS <<_ACEOF
27823cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27824/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027825_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027826sed '
27827s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27828s/^/s,@/; s/!/@,|#_!!_#|/
27829:n
27830t n
27831s/'"$ac_delim"'$/,g/; t
27832s/$/\\/; p
27833N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27834' >>$CONFIG_STATUS <conf$$subs.sed
27835rm -f conf$$subs.sed
27836cat >>$CONFIG_STATUS <<_ACEOF
27837CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027838_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027839
27840
27841ac_delim='%!_!# '
27842for ac_last_try in false false false false false :; do
27843 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027844CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027845SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000027846PKG_CONFIG!$PKG_CONFIG$ac_delim
27847LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027848USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27849SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27850USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27851LDLAST!$LDLAST$ac_delim
27852THREADOBJ!$THREADOBJ$ac_delim
27853DLINCLDIR!$DLINCLDIR$ac_delim
27854DYNLOADFILE!$DYNLOADFILE$ac_delim
27855MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27856TRUE!$TRUE$ac_delim
27857LIBOBJS!$LIBOBJS$ac_delim
27858HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27859HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27860HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27861HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27862HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27863LIBM!$LIBM$ac_delim
27864LIBC!$LIBC$ac_delim
27865THREADHEADERS!$THREADHEADERS$ac_delim
27866SRCDIRS!$SRCDIRS$ac_delim
27867LTLIBOBJS!$LTLIBOBJS$ac_delim
27868_ACEOF
27869
Benjamin Petersond78735d2010-01-01 16:04:23 +000027870 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027871 break
27872 elif $ac_last_try; then
27873 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27874echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027876 else
27877 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27878 fi
27879done
27880
27881ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27882if test -n "$ac_eof"; then
27883 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27884 ac_eof=`expr $ac_eof + 1`
27885fi
27886
27887cat >>$CONFIG_STATUS <<_ACEOF
27888cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27889/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027890_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027891sed '
27892s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27893s/^/s,@/; s/!/@,|#_!!_#|/
27894:n
27895t n
27896s/'"$ac_delim"'$/,g/; t
27897s/$/\\/; p
27898N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27899' >>$CONFIG_STATUS <conf$$subs.sed
27900rm -f conf$$subs.sed
27901cat >>$CONFIG_STATUS <<_ACEOF
27902:end
27903s/|#_!!_#|//g
27904CEOF$ac_eof
27905_ACEOF
27906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027907
27908# VPATH may cause trouble with some makes, so we remove $(srcdir),
27909# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27910# trailing colons and then remove the whole line if VPATH becomes empty
27911# (actually we leave an empty line to preserve line numbers).
27912if test "x$srcdir" = x.; then
27913 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27914s/:*\$(srcdir):*/:/
27915s/:*\${srcdir}:*/:/
27916s/:*@srcdir@:*/:/
27917s/^\([^=]*=[ ]*\):*/\1/
27918s/:*$//
27919s/^[^=]*=[ ]*$//
27920}'
27921fi
27922
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027923cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027924fi # test -n "$CONFIG_FILES"
27925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027926
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027927for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027928do
27929 case $ac_tag in
27930 :[FHLC]) ac_mode=$ac_tag; continue;;
27931 esac
27932 case $ac_mode$ac_tag in
27933 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027934 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27935echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027936 { (exit 1); exit 1; }; };;
27937 :[FH]-) ac_tag=-:-;;
27938 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27939 esac
27940 ac_save_IFS=$IFS
27941 IFS=:
27942 set x $ac_tag
27943 IFS=$ac_save_IFS
27944 shift
27945 ac_file=$1
27946 shift
27947
27948 case $ac_mode in
27949 :L) ac_source=$1;;
27950 :[FH])
27951 ac_file_inputs=
27952 for ac_f
27953 do
27954 case $ac_f in
27955 -) ac_f="$tmp/stdin";;
27956 *) # Look for the file first in the build tree, then in the source tree
27957 # (if the path is not absolute). The absolute path cannot be DOS-style,
27958 # because $ac_f cannot contain `:'.
27959 test -f "$ac_f" ||
27960 case $ac_f in
27961 [\\/$]*) false;;
27962 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27963 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027964 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27965echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027966 { (exit 1); exit 1; }; };;
27967 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027968 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027969 done
27970
27971 # Let's still pretend it is `configure' which instantiates (i.e., don't
27972 # use $as_me), people would be surprised to read:
27973 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027974 configure_input="Generated from "`IFS=:
27975 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027976 if test x"$ac_file" != x-; then
27977 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027978 { echo "$as_me:$LINENO: creating $ac_file" >&5
27979echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027980 fi
27981
27982 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027983 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027984 esac
27985 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027986 esac
27987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027988 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027989$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027990 X"$ac_file" : 'X\(//\)[^/]' \| \
27991 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027992 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027993echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027994 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27995 s//\1/
27996 q
27997 }
27998 /^X\(\/\/\)[^/].*/{
27999 s//\1/
28000 q
28001 }
28002 /^X\(\/\/\)$/{
28003 s//\1/
28004 q
28005 }
28006 /^X\(\/\).*/{
28007 s//\1/
28008 q
28009 }
28010 s/.*/./; q'`
28011 { as_dir="$ac_dir"
28012 case $as_dir in #(
28013 -*) as_dir=./$as_dir;;
28014 esac
28015 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028016 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028017 while :; do
28018 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028019 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028020 *) as_qdir=$as_dir;;
28021 esac
28022 as_dirs="'$as_qdir' $as_dirs"
28023 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028024$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028025 X"$as_dir" : 'X\(//\)[^/]' \| \
28026 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028027 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028028echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028029 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28030 s//\1/
28031 q
28032 }
28033 /^X\(\/\/\)[^/].*/{
28034 s//\1/
28035 q
28036 }
28037 /^X\(\/\/\)$/{
28038 s//\1/
28039 q
28040 }
28041 /^X\(\/\).*/{
28042 s//\1/
28043 q
28044 }
28045 s/.*/./; q'`
28046 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028048 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028049 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28050echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028051 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028052 ac_builddir=.
28053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028054case "$ac_dir" in
28055.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28056*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028057 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028058 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028059 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028060 case $ac_top_builddir_sub in
28061 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28062 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28063 esac ;;
28064esac
28065ac_abs_top_builddir=$ac_pwd
28066ac_abs_builddir=$ac_pwd$ac_dir_suffix
28067# for backward compatibility:
28068ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028069
28070case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028071 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028073 ac_top_srcdir=$ac_top_builddir_sub
28074 ac_abs_top_srcdir=$ac_pwd ;;
28075 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028076 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028077 ac_top_srcdir=$srcdir
28078 ac_abs_top_srcdir=$srcdir ;;
28079 *) # Relative name.
28080 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28081 ac_top_srcdir=$ac_top_build_prefix$srcdir
28082 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028083esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028084ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028085
Martin v. Löwis11437992002-04-12 09:54:03 +000028086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028087 case $ac_mode in
28088 :F)
28089 #
28090 # CONFIG_FILE
28091 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028092
28093 case $INSTALL in
28094 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028095 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028096 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028097_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028099cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028100# If the template does not know about datarootdir, expand it.
28101# FIXME: This hack should be removed a few years after 2.60.
28102ac_datarootdir_hack=; ac_datarootdir_seen=
28103
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028104case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028105 p
28106 q
28107}
28108/@datadir@/p
28109/@docdir@/p
28110/@infodir@/p
28111/@localedir@/p
28112/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028113' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028114*datarootdir*) ac_datarootdir_seen=yes;;
28115*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028116 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28117echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028118_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028119cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028120 ac_datarootdir_hack='
28121 s&@datadir@&$datadir&g
28122 s&@docdir@&$docdir&g
28123 s&@infodir@&$infodir&g
28124 s&@localedir@&$localedir&g
28125 s&@mandir@&$mandir&g
28126 s&\\\${datarootdir}&$datarootdir&g' ;;
28127esac
28128_ACEOF
28129
28130# Neutralize VPATH when `$srcdir' = `.'.
28131# Shell code in configure.ac might set extrasub.
28132# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028133cat >>$CONFIG_STATUS <<_ACEOF
28134 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028135$extrasub
28136_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028137cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028138:t
28139/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028140s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028141s&@top_builddir@&$ac_top_builddir_sub&;t t
28142s&@srcdir@&$ac_srcdir&;t t
28143s&@abs_srcdir@&$ac_abs_srcdir&;t t
28144s&@top_srcdir@&$ac_top_srcdir&;t t
28145s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28146s&@builddir@&$ac_builddir&;t t
28147s&@abs_builddir@&$ac_abs_builddir&;t t
28148s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28149s&@INSTALL@&$ac_INSTALL&;t t
28150$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028151" $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 +000028152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028153test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28154 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28155 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028156 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028157which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028158echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028159which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028161 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028162 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028163 -) cat "$tmp/out"; rm -f "$tmp/out";;
28164 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28165 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028166 ;;
28167 :H)
28168 #
28169 # CONFIG_HEADER
28170 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028171_ACEOF
28172
28173# Transform confdefs.h into a sed script `conftest.defines', that
28174# substitutes the proper values into config.h.in to produce config.h.
28175rm -f conftest.defines conftest.tail
28176# First, append a space to every undef/define line, to ease matching.
28177echo 's/$/ /' >conftest.defines
28178# Then, protect against being on the right side of a sed subst, or in
28179# an unquoted here document, in config.status. If some macros were
28180# called several times there might be several #defines for the same
28181# symbol, which is useless. But do not sort them, since the last
28182# AC_DEFINE must be honored.
28183ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28184# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28185# NAME is the cpp macro being defined, VALUE is the value it is being given.
28186# PARAMS is the parameter list in the macro definition--in most cases, it's
28187# just an empty string.
28188ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28189ac_dB='\\)[ (].*,\\1define\\2'
28190ac_dC=' '
28191ac_dD=' ,'
28192
28193uniq confdefs.h |
28194 sed -n '
28195 t rset
28196 :rset
28197 s/^[ ]*#[ ]*define[ ][ ]*//
28198 t ok
28199 d
28200 :ok
28201 s/[\\&,]/\\&/g
28202 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28203 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28204 ' >>conftest.defines
28205
28206# Remove the space that was appended to ease matching.
28207# Then replace #undef with comments. This is necessary, for
28208# example, in the case of _POSIX_SOURCE, which is predefined and required
28209# on some systems where configure will not decide to define it.
28210# (The regexp can be short, since the line contains either #define or #undef.)
28211echo 's/ $//
28212s,^[ #]*u.*,/* & */,' >>conftest.defines
28213
28214# Break up conftest.defines:
28215ac_max_sed_lines=50
28216
28217# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28218# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28219# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28220# et cetera.
28221ac_in='$ac_file_inputs'
28222ac_out='"$tmp/out1"'
28223ac_nxt='"$tmp/out2"'
28224
28225while :
28226do
28227 # Write a here document:
28228 cat >>$CONFIG_STATUS <<_ACEOF
28229 # First, check the format of the line:
28230 cat >"\$tmp/defines.sed" <<\\CEOF
28231/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28232/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28233b
28234:def
28235_ACEOF
28236 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28237 echo 'CEOF
28238 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28239 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28240 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28241 grep . conftest.tail >/dev/null || break
28242 rm -f conftest.defines
28243 mv conftest.tail conftest.defines
28244done
28245rm -f conftest.defines conftest.tail
28246
28247echo "ac_result=$ac_in" >>$CONFIG_STATUS
28248cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028249 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028250 echo "/* $configure_input */" >"$tmp/config.h"
28251 cat "$ac_result" >>"$tmp/config.h"
28252 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28253 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28254echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028255 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028256 rm -f $ac_file
28257 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028258 fi
28259 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028260 echo "/* $configure_input */"
28261 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028262 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028263 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028264 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028266
28267 esac
28268
28269done # for ac_tag
28270
Guido van Rossum627b2d71993-12-24 10:39:16 +000028271
Martin v. Löwis11437992002-04-12 09:54:03 +000028272{ (exit 0); exit 0; }
28273_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028274chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028275ac_clean_files=$ac_clean_files_save
28276
28277
28278# configure is writing to config.log, and then calls config.status.
28279# config.status does its own redirection, appending to config.log.
28280# Unfortunately, on DOS this fails, as config.log is still kept open
28281# by configure, so config.status won't be able to write to it; its
28282# output is simply discarded. So we exec the FD to /dev/null,
28283# effectively closing config.log, so it can be properly (re)opened and
28284# appended to by config.status. When coming back to configure, we
28285# need to make the FD available again.
28286if test "$no_create" != yes; then
28287 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028288 ac_config_status_args=
28289 test "$silent" = yes &&
28290 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028291 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028292 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028293 exec 5>>config.log
28294 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28295 # would make configure fail if this is the last instruction.
28296 $ac_cs_success || { (exit 1); exit 1; }
28297fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028298
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028299
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028300echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028301if test ! -f Modules/Setup
28302then
28303 cp $srcdir/Modules/Setup.dist Modules/Setup
28304fi
28305
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028306echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028307if test ! -f Modules/Setup.local
28308then
28309 echo "# Edit this file for local setup changes" >Modules/Setup.local
28310fi
28311
28312echo "creating Makefile"
28313$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28314 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028315 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028316mv config.c Modules