blob: d0b086905d02d2dfa0b0494ca74a097d028efa5c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +00002# From configure.in Revision: 76301 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001356 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with(out)-pymalloc disable/enable specialized mallocs
1358 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001359 --with-fpectl enable SIGFPE catching
1360 --with-libm=STRING math library
1361 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001362 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001363 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1364 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366Some influential environment variables:
1367 CC C compiler command
1368 CFLAGS C compiler flags
1369 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1370 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 LIBS libraries to pass to the linker, e.g. -l<library>
1372 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1373 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 CPP C preprocessor
1375
1376Use these variables to override the choices made by `configure' or to help
1377it to find libraries and programs with nonstandard names/locations.
1378
Georg Brandle2e15612009-05-20 18:25:10 +00001379Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001382fi
1383
1384if test "$ac_init_help" = "recursive"; then
1385 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001387 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_builddir=.
1389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390case "$ac_dir" in
1391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1392*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001395 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 case $ac_top_builddir_sub in
1397 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1399 esac ;;
1400esac
1401ac_abs_top_builddir=$ac_pwd
1402ac_abs_builddir=$ac_pwd$ac_dir_suffix
1403# for backward compatibility:
1404ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001407 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001409 ac_top_srcdir=$ac_top_builddir_sub
1410 ac_abs_top_srcdir=$ac_pwd ;;
1411 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$srcdir
1414 ac_abs_top_srcdir=$srcdir ;;
1415 *) # Relative name.
1416 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1417 ac_top_srcdir=$ac_top_build_prefix$srcdir
1418 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001419esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422 cd "$ac_dir" || { ac_status=$?; continue; }
1423 # Check for guested configure.
1424 if test -f "$ac_srcdir/configure.gnu"; then
1425 echo &&
1426 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1427 elif test -f "$ac_srcdir/configure"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001431 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 fi || ac_status=$?
1433 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 done
1435fi
1436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001438if $ac_init_version; then
1439 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001440python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001441generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445This configure script is free software; the Free Software Foundation
1446gives unlimited permission to copy, distribute and modify it.
1447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This file contains any messages produced by compilers while
1452running configure, to aid debugging if configure makes a mistake.
1453
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001454It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001455generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457 $ $0 $@
1458
1459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001461{
1462cat <<_ASUNAME
1463## --------- ##
1464## Platform. ##
1465## --------- ##
1466
1467hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1468uname -m = `(uname -m) 2>/dev/null || echo unknown`
1469uname -r = `(uname -r) 2>/dev/null || echo unknown`
1470uname -s = `(uname -s) 2>/dev/null || echo unknown`
1471uname -v = `(uname -v) 2>/dev/null || echo unknown`
1472
1473/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1474/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1475
1476/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1477/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1478/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001480/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1481/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1482/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1483
1484_ASUNAME
1485
1486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1487for as_dir in $PATH
1488do
1489 IFS=$as_save_IFS
1490 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001491 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495} >&5
1496
1497cat >&5 <<_ACEOF
1498
1499
1500## ----------- ##
1501## Core tests. ##
1502## ----------- ##
1503
1504_ACEOF
1505
1506
1507# Keep a trace of the command line.
1508# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_configure_args0=
1514ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_must_keep_next=false
1516for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001517do
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 for ac_arg
1519 do
1520 case $ac_arg in
1521 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1522 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523 | -silent | --silent | --silen | --sile | --sil)
1524 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001526 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001527 esac
1528 case $ac_pass in
1529 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1530 2)
1531 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1532 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 case $ac_arg in
1536 *=* | --config-cache | -C | -disable-* | --disable-* \
1537 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1538 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1539 | -with-* | --with-* | -without-* | --without-* | --x)
1540 case "$ac_configure_args0 " in
1541 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1542 esac
1543 ;;
1544 -* ) ac_must_keep_next=true ;;
1545 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 ;;
1549 esac
1550 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001551done
Skip Montanaro6dead952003-09-25 14:50:04 +00001552$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1553$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555# When interrupted or exit'd, cleanup temporary files, and complete
1556# config.log. We remove comments because anyway the quotes in there
1557# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558# WARNING: Use '\'' to represent an apostrophe within the trap.
1559# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560trap 'exit_status=$?
1561 # Save into config.log some information that might help in debugging.
1562 {
1563 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001564
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 cat <<\_ASBOX
1566## ---------------- ##
1567## Cache variables. ##
1568## ---------------- ##
1569_ASBOX
1570 echo
1571 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572(
1573 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1574 eval ac_val=\$$ac_var
1575 case $ac_val in #(
1576 *${as_nl}*)
1577 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001578 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1579echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 esac
1581 case $ac_var in #(
1582 _ | IFS | as_nl) ;; #(
1583 *) $as_unset $ac_var ;;
1584 esac ;;
1585 esac
1586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 "s/'\''/'\''\\\\'\'''\''/g;
1592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1593 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001594 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 esac |
1598 sort
1599)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001601
1602 cat <<\_ASBOX
1603## ----------------- ##
1604## Output variables. ##
1605## ----------------- ##
1606_ASBOX
1607 echo
1608 for ac_var in $ac_subst_vars
1609 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 eval ac_val=\$$ac_var
1611 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001612 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001614 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001615 done | sort
1616 echo
1617
1618 if test -n "$ac_subst_files"; then
1619 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620## ------------------- ##
1621## File substitutions. ##
1622## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001623_ASBOX
1624 echo
1625 for ac_var in $ac_subst_files
1626 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 eval ac_val=\$$ac_var
1628 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001629 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001631 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001632 done | sort
1633 echo
1634 fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 if test -s confdefs.h; then
1637 cat <<\_ASBOX
1638## ----------- ##
1639## confdefs.h. ##
1640## ----------- ##
1641_ASBOX
1642 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 echo
1645 fi
1646 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001647 echo "$as_me: caught signal $ac_signal"
1648 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 rm -f core *.core core.conftest.* &&
1651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001654for ac_signal in 1 2 13 15; do
1655 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1656done
1657ac_signal=0
1658
1659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001661
1662# Predefined preprocessor variables.
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_NAME "$PACKAGE_NAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_VERSION "$PACKAGE_VERSION"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_STRING "$PACKAGE_STRING"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1686_ACEOF
1687
1688
1689# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001690# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001691if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001692 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$ac_default_prefix/share/config.site" \
1697 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699shift
1700for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1704echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 . "$ac_site_file"
1707 fi
1708done
1709
1710if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # Some versions of bash will fail to source /dev/null (special
1712 # files actually), so we avoid doing that.
1713 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001714 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1715echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 esac
1720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001722 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1723echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 >$cache_file
1725fi
1726
1727# Check that the precious variables saved in the cache have kept the same
1728# value.
1729ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1732 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 case $ac_old_set,$ac_new_set in
1736 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001737 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 ac_cache_corrupted=: ;;
1740 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,);;
1745 *)
1746 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1748echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1749 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1750echo "$as_me: former value: $ac_old_val" >&2;}
1751 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1752echo "$as_me: current value: $ac_new_val" >&2;}
1753 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 fi;;
1755 esac
1756 # Pass precious variables to config.status.
1757 if test "$ac_new_set" = set; then
1758 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001759 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 *) ac_arg=$ac_var=$ac_new_val ;;
1761 esac
1762 case " $ac_configure_args " in
1763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1764 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1765 esac
1766 fi
1767done
1768if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001769 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1770echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1771 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1772echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001773 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
1775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
Guido van Rossum7f43da71994-08-01 12:15:30 +00001800ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1804ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806
Michael W. Hudson54241132001-12-07 15:38:26 +00001807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001808ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
1810
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
Benjamin Petersond23f8222009-04-05 19:13:16 +00001812if test "$prefix" != "/"; then
1813 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1814fi
1815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001820
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001821# We don't use PACKAGE_ variables, and they cause conflicts
1822# with other autoconf-based packages that include Python.h
1823grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1824rm confdefs.h
1825mv confdefs.h.new confdefs.h
1826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001828VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwis1142de32002-03-29 16:28:31 +00001830
1831SOVERSION=1.0
1832
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833# The later defininition of _XOPEN_SOURCE disables certain features
1834# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _GNU_SOURCE 1
1838_ACEOF
1839
1840
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define _NETBSD_SOURCE 1
1847_ACEOF
1848
1849
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1852# them.
1853
1854cat >>confdefs.h <<\_ACEOF
1855#define __BSD_VISIBLE 1
1856_ACEOF
1857
1858
Martin v. Löwisd6320502004-08-12 13:45:08 +00001859# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1860# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _BSD_TYPES 1
1864_ACEOF
1865
1866
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1869# them.
1870
1871cat >>confdefs.h <<\_ACEOF
1872#define _DARWIN_C_SOURCE 1
1873_ACEOF
1874
1875
1876
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001877define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001878
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001879# Arguments passed to configure.
1880
1881CONFIG_ARGS="$ac_configure_args"
1882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001883# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001884if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001885 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001886 case $enableval in
1887 yes)
1888 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1889 ;;
1890 esac
1891 case $enableval in
1892 no)
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895 ;;
1896 *)
1897 UNIVERSALSDK=$enableval
1898 ;;
1899 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001900
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901else
1902
1903 UNIVERSALSDK=
1904 enable_universalsdk=
1905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907
1908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001909
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001910
1911
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001912UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001913{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1914echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001915
1916# Check whether --with-universal-archs was given.
1917if test "${with_universal_archs+set}" = set; then
1918 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001919 { echo "$as_me:$LINENO: result: $withval" >&5
1920echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001921 UNIVERSAL_ARCHS="$withval"
1922
1923else
1924
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001925 { echo "$as_me:$LINENO: result: 32-bit" >&5
1926echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001927
1928fi
1929
1930
1931
1932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001933
1934# Check whether --with-framework-name was given.
1935if test "${with_framework_name+set}" = set; then
1936 withval=$with_framework_name;
1937 PYTHONFRAMEWORK=${withval}
1938 PYTHONFRAMEWORKDIR=${withval}.framework
1939 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1940
1941else
1942
1943 PYTHONFRAMEWORK=Python
1944 PYTHONFRAMEWORKDIR=Python.framework
1945 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1946
1947fi
1948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001949# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001951 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001952 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001953 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001954 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001955 esac
1956 case $enableval in
1957 no)
1958 PYTHONFRAMEWORK=
1959 PYTHONFRAMEWORKDIR=no-framework
1960 PYTHONFRAMEWORKPREFIX=
1961 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001962 FRAMEWORKINSTALLFIRST=
1963 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001964 FRAMEWORKALTINSTALLFIRST=
1965 FRAMEWORKALTINSTALLLAST=
1966 if test "x${prefix}" = "xNONE"; then
1967 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1968 else
1969 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1970 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001971 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001972 ;;
1973 *)
1974 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001977 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001978 if test "$UNIVERSAL_ARCHS" = "all"
1979 then
1980 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001981 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001982 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1985 fi
1986
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001987 if test "x${prefix}" = "xNONE" ; then
1988 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1989 else
1990 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1991 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001992 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001993
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001994 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001995 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001996 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001998 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001999
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002000 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2001
2002 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2003
Jack Jansene578a632001-08-15 01:27:14 +00002004 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002005
Guido van Rossum563e7081996-09-10 18:20:48 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007
Jack Jansene578a632001-08-15 01:27:14 +00002008 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002010 PYTHONFRAMEWORKPREFIX=
2011 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002012 FRAMEWORKINSTALLFIRST=
2013 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002014 FRAMEWORKALTINSTALLFIRST=
2015 FRAMEWORKALTINSTALLLAST=
2016 if test "x${prefix}" = "xNONE" ; then
2017 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2018 else
2019 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2020 fi
Jack Jansene578a632001-08-15 01:27:14 +00002021 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002022
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002023 if test "$UNIVERSAL_ARCHS" = "all"
2024 then
2025 FRAMEWORKINSTALLLAST=update4wayuniversal
2026 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2027 fi
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
2030
Thomas Wouters477c8d52006-05-27 19:21:47 +00002031
2032
Michael W. Hudson54241132001-12-07 15:38:26 +00002033
2034
2035
2036
Jack Jansene578a632001-08-15 01:27:14 +00002037
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002038
2039
2040
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002041
Jack Jansene578a632001-08-15 01:27:14 +00002042##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002043## AC_HELP_STRING(--with-dyld,
2044## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002045##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046# Set name for machine-dependent library files
2047
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002048{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2049echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050if test -z "$MACHDEP"
2051then
Guido van Rossum563e7081996-09-10 18:20:48 +00002052 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002053 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_md_system=`echo $ac_sys_system |
2060 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2061 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002062 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002064
Guido van Rossum07397971997-04-29 21:49:50 +00002065 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002066 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002067 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002068 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 esac
2071fi
Guido van Rossum91922671997-10-09 20:24:13 +00002072
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002073# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2074# disable features if it is defined, without any means to access these
2075# features as extensions. For these systems, we skip the definition of
2076# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2077# some feature, make sure there is no alternative way to access this
2078# feature. Also, when using wildcards, make sure you have verified the
2079# need for not defining _XOPEN_SOURCE on all systems matching the
2080# wildcard, and that the wildcard does not include future systems
2081# (which may remove their limitations).
2082case $ac_sys_system/$ac_sys_release in
2083 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2084 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002085 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002086 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002087 define_xopen_source=no
2088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2089 # also defined. This can be overridden by defining _BSD_SOURCE
2090 # As this has a different meaning on Linux, only define it on OpenBSD
2091
2092cat >>confdefs.h <<\_ACEOF
2093#define _BSD_SOURCE 1
2094_ACEOF
2095
2096 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002097 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2098 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2099 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002100 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002101 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002102 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2103 # of union __?sigval. Reported by Stuart Bishop.
2104 SunOS/5.6)
2105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002110 define_xopen_source=no;;
2111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002115 # On FreeBSD 4, the math functions C89 does not cover are never defined
2116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2117 FreeBSD/4.*)
2118 define_xopen_source=no;;
2119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2121 # identifies itself as Darwin/7.*
2122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2123 # disables platform specific features beyond repair.
2124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # has no effect, don't bother defining them
2126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2129 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2130 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002131 AIX/4)
2132 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002133 AIX/5)
2134 if test `uname -r` -eq 1; then
2135 define_xopen_source=no
2136 fi
2137 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002138 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2139 # defining NI_NUMERICHOST.
2140 QNX/6.3.2)
2141 define_xopen_source=no
2142 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002143
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002144esac
2145
2146if test $define_xopen_source = yes
2147then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2149 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002150 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2151 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002152 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002153 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 500
2157_ACEOF
2158
2159 ;;
2160 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002164_ACEOF
2165
Skip Montanarof0d5f792004-08-15 14:08:23 +00002166 ;;
2167 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2170 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2171 # several APIs are not declared. Since this is also needed in some
2172 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 # except for Solaris 10, where it must not be defined,
2174 # as it implies XPG4.2
2175 case $ac_sys_system/$ac_sys_release in
2176 SunOS/5.10)
2177 ;;
2178 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
2180cat >>confdefs.h <<\_ACEOF
2181#define _XOPEN_SOURCE_EXTENDED 1
2182_ACEOF
2183
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 ;;
2185 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002187
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188cat >>confdefs.h <<\_ACEOF
2189#define _POSIX_C_SOURCE 200112L
2190_ACEOF
2191
2192
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002193fi
2194
Guido van Rossum91922671997-10-09 20:24:13 +00002195#
2196# SGI compilers allow the specification of the both the ABI and the
2197# ISA on the command line. Depending on the values of these switches,
2198# different and often incompatable code will be generated.
2199#
2200# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2201# thus supply support for various ABI/ISA combinations. The MACHDEP
2202# variable is also adjusted.
2203#
2204
2205if test ! -z "$SGI_ABI"
2206then
2207 CC="cc $SGI_ABI"
2208 LDFLAGS="$SGI_ABI $LDFLAGS"
2209 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002211{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2212echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002213
Jack Jansen6b08a402004-06-03 12:41:45 +00002214# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2215# it may influence the way we can build extensions, so distutils
2216# needs to check it
2217
Thomas Wouters477c8d52006-05-27 19:21:47 +00002218
Jack Jansen6b08a402004-06-03 12:41:45 +00002219CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002222{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2223echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002224ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002225{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2226echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002227
Guido van Rossum627b2d71993-12-24 10:39:16 +00002228# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002229
2230# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2231# for debug/optimization stuff. BASECFLAGS is for flags that are required
2232# just to get things to compile and link. Users are free to override OPT
2233# when running configure or make. The build should not break if they do.
2234# BASECFLAGS should generally not be messed with, however.
2235
2236# XXX shouldn't some/most/all of this code be merged with the stuff later
2237# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002238{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2239echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002241# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002244 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002245 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246 without_gcc=yes;;
2247 yes) CC=gcc
2248 without_gcc=no;;
2249 *) CC=$withval
2250 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002251 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002252else
Martin v. Löwis11437992002-04-12 09:54:03 +00002253
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002254 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002255 AIX*) CC=cc_r
2256 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002257 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002259fi
2260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2262echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002263
Guido van Rossum8b131c51995-03-09 14:10:13 +00002264# If the user switches compilers, we can't believe the cache
2265if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2266then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002267 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002268(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&2;}
2271 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002272fi
2273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274ac_ext=c
2275ac_cpp='$CPP $CPPFLAGS'
2276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2278ac_compiler_gnu=$ac_cv_c_compiler_gnu
2279if test -n "$ac_tool_prefix"; then
2280 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2281set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002284if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002286else
2287 if test -n "$CC"; then
2288 ac_cv_prog_CC="$CC" # Let the user override the test.
2289else
Martin v. Löwis11437992002-04-12 09:54:03 +00002290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2291for as_dir in $PATH
2292do
2293 IFS=$as_save_IFS
2294 test -z "$as_dir" && as_dir=.
2295 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002297 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 break 2
2300 fi
2301done
2302done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002304
Jack Jansendd19cf82001-12-06 22:36:17 +00002305fi
2306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002307CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002308if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002309 { echo "$as_me:$LINENO: result: $CC" >&5
2310echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002312 { echo "$as_me:$LINENO: result: no" >&5
2313echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314fi
2315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317fi
2318if test -z "$ac_cv_prog_CC"; then
2319 ac_ct_CC=$CC
2320 # Extract the first word of "gcc", so it can be a program name with args.
2321set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002326else
2327 if test -n "$ac_ct_CC"; then
2328 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2329else
2330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 break 2
2340 fi
2341done
2342done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345fi
2346fi
2347ac_ct_CC=$ac_cv_prog_ac_ct_CC
2348if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002349 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2350echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356 if test "x$ac_ct_CC" = x; then
2357 CC=""
2358 else
2359 case $cross_compiling:$ac_tool_warned in
2360yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2362whose name does not start with the host triplet. If you think this
2363configuration is useful to you, please write to autoconf@gnu.org." >&5
2364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2365whose name does not start with the host triplet. If you think this
2366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367ac_tool_warned=yes ;;
2368esac
2369 CC=$ac_ct_CC
2370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371else
2372 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002373fi
2374
Jack Jansendd19cf82001-12-06 22:36:17 +00002375if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376 if test -n "$ac_tool_prefix"; then
2377 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002378set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002383else
2384 if test -n "$CC"; then
2385 ac_cv_prog_CC="$CC" # Let the user override the test.
2386else
Martin v. Löwis11437992002-04-12 09:54:03 +00002387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402fi
2403fi
2404CC=$ac_cv_prog_CC
2405if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002406 { echo "$as_me:$LINENO: result: $CC" >&5
2407echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$CC"; then
2417 # Extract the first word of "cc", so it can be a program name with args.
2418set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2436 ac_prog_rejected=yes
2437 continue
2438 fi
2439 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 break 2
2442 fi
2443done
2444done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447if test $ac_prog_rejected = yes; then
2448 # We found a bogon in the path, so make sure we never use it.
2449 set dummy $ac_cv_prog_CC
2450 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452 # We chose a different compiler from the bogus one.
2453 # However, it has the same basename, so the bogon will be chosen
2454 # first if we set CC to just the basename; use the full file name.
2455 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 fi
2458fi
2459fi
2460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002461CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002463 { echo "$as_me:$LINENO: result: $CC" >&5
2464echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002466 { echo "$as_me:$LINENO: result: no" >&5
2467echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468fi
2469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470
Martin v. Löwis11437992002-04-12 09:54:03 +00002471fi
2472if test -z "$CC"; then
2473 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 do
2476 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2477set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Martin v. Löwis11437992002-04-12 09:54:03 +00002486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
2498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501fi
2502fi
2503CC=$ac_cv_prog_CC
2504if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002510fi
2511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$CC" && break
2514 done
2515fi
2516if test -z "$CC"; then
2517 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002519do
2520 # Extract the first word of "$ac_prog", so it can be a program name with args.
2521set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002526else
2527 if test -n "$ac_ct_CC"; then
2528 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2529else
2530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2531for as_dir in $PATH
2532do
2533 IFS=$as_save_IFS
2534 test -z "$as_dir" && as_dir=.
2535 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545fi
2546fi
2547ac_ct_CC=$ac_cv_prog_ac_ct_CC
2548if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002549 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2550echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002552 { echo "$as_me:$LINENO: result: no" >&5
2553echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 test -n "$ac_ct_CC" && break
2558done
Michael W. Hudson54241132001-12-07 15:38:26 +00002559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 if test "x$ac_ct_CC" = x; then
2561 CC=""
2562 else
2563 case $cross_compiling:$ac_tool_warned in
2564yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002565{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2566whose name does not start with the host triplet. If you think this
2567configuration is useful to you, please write to autoconf@gnu.org." >&5
2568echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2569whose name does not start with the host triplet. If you think this
2570configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571ac_tool_warned=yes ;;
2572esac
2573 CC=$ac_ct_CC
2574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002575fi
2576
2577fi
2578
2579
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002581See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
2586# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002587echo "$as_me:$LINENO: checking for C compiler version" >&5
2588ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589{ (ac_try="$ac_compiler --version >&5"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599{ (ac_try="$ac_compiler -v >&5"
2600case "(($ac_try" in
2601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602 *) ac_try_echo=$ac_try;;
2603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609{ (ac_try="$ac_compiler -V >&5"
2610case "(($ac_try" in
2611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2612 *) ac_try_echo=$ac_try;;
2613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 (exit $ac_status); }
2619
2620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002621/* confdefs.h. */
2622_ACEOF
2623cat confdefs.h >>conftest.$ac_ext
2624cat >>conftest.$ac_ext <<_ACEOF
2625/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627int
2628main ()
2629{
2630
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Try to create an executable without -o first, disregard a.out.
2638# It will help us diagnose broken compilers, and finding out an intuition
2639# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2641echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2643#
2644# List of possible output files, starting from the most likely.
2645# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2646# only as a last resort. b.out is created by i960 compilers.
2647ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2648#
2649# The IRIX 6 linker writes into existing files which may not be
2650# executable, retaining their permissions. Remove them first so a
2651# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652ac_rmfiles=
2653for ac_file in $ac_files
2654do
2655 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002656 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2658 esac
2659done
2660rm -f $ac_rmfiles
2661
2662if { (ac_try="$ac_link_default"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2673# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2674# in a Makefile. We should not override ac_cv_exeext if it was cached,
2675# so that the user can short-circuit this test for compilers unknown to
2676# Autoconf.
2677for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002678do
2679 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002681 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002682 ;;
2683 [ab].out )
2684 # We found the default executable, but exeext='' is most
2685 # certainly right.
2686 break;;
2687 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2689 then :; else
2690 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2691 fi
2692 # We set ac_cv_exeext here because the later test for it is not
2693 # safe: cross compilers may not add the suffix if given an `-o'
2694 # argument, so we may need to know it at that point already.
2695 # Even if this section looks crufty: it has the advantage of
2696 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002697 break;;
2698 * )
2699 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702test "$ac_cv_exeext" = no && ac_cv_exeext=
2703
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002704else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 ac_file=''
2706fi
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ echo "$as_me:$LINENO: result: $ac_file" >&5
2709echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002716echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002718 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002724# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2726echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002727# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2728# If not cross compiling, check that we can run a simple program.
2729if test "$cross_compiling" != yes; then
2730 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 { (case "(($ac_try" in
2732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733 *) ac_try_echo=$ac_try;;
2734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 (exit $ac_status); }; }; then
2740 cross_compiling=no
2741 else
2742 if test "$cross_compiling" = maybe; then
2743 cross_compiling=yes
2744 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002746If you meant to cross compile, use \`--host'.
2747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749If you meant to cross compile, use \`--host'.
2750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 fi
2753 fi
2754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755{ echo "$as_me:$LINENO: result: yes" >&5
2756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2764{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2765echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769if { (ac_try="$ac_link"
2770case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002779 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2780# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2781# work properly (i.e., refer to `conftest.exe'), while it won't with
2782# `rm'.
2783for ac_file in conftest.exe conftest conftest.*; do
2784 test -f "$ac_file" || continue
2785 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002787 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2788 break;;
2789 * ) break;;
2790 esac
2791done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002794See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002798fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002799
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002800rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2802echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002803
2804rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002805EXEEXT=$ac_cv_exeext
2806ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2808echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002811else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 cat >conftest.$ac_ext <<_ACEOF
2813/* confdefs.h. */
2814_ACEOF
2815cat confdefs.h >>conftest.$ac_ext
2816cat >>conftest.$ac_ext <<_ACEOF
2817/* end confdefs.h. */
2818
2819int
2820main ()
2821{
2822
2823 ;
2824 return 0;
2825}
2826_ACEOF
2827rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828if { (ac_try="$ac_compile"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 for ac_file in conftest.o conftest.obj conftest.*; do
2839 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2843 break;;
2844 esac
2845done
2846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002848sed 's/^/| /' conftest.$ac_ext >&5
2849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002852echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002854 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855fi
2856
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002857rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002858fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2860echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861OBJEXT=$ac_cv_objext
2862ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002863{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2864echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002865if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002867else
2868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002874
Martin v. Löwis11437992002-04-12 09:54:03 +00002875int
2876main ()
2877{
2878#ifndef __GNUC__
2879 choke me
2880#endif
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002895 grep -v '^ *+' conftest.er1 >conftest.err
2896 rm -f conftest.er1
2897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (exit $ac_status); } && {
2900 test -z "$ac_c_werror_flag" ||
2901 test ! -s conftest.err
2902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 ac_compiler_gnu=yes
2904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002906sed 's/^/| /' conftest.$ac_ext >&5
2907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910
2911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_cv_c_compiler_gnu=$ac_compiler_gnu
2913
2914fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2916echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2917GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002918ac_test_CFLAGS=${CFLAGS+set}
2919ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002920{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2921echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002924else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_save_c_werror_flag=$ac_c_werror_flag
2926 ac_c_werror_flag=yes
2927 ac_cv_prog_cc_g=no
2928 CFLAGS="-g"
2929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936int
2937main ()
2938{
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945if { (ac_try="$ac_compile"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 (exit $ac_status); } && {
2958 test -z "$ac_c_werror_flag" ||
2959 test ! -s conftest.err
2960 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002964sed 's/^/| /' conftest.$ac_ext >&5
2965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002966 CFLAGS=""
2967 cat >conftest.$ac_ext <<_ACEOF
2968/* confdefs.h. */
2969_ACEOF
2970cat confdefs.h >>conftest.$ac_ext
2971cat >>conftest.$ac_ext <<_ACEOF
2972/* end confdefs.h. */
2973
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
2983if { (ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (eval "$ac_compile") 2>conftest.er1
2990 ac_status=$?
2991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 (exit $ac_status); } && {
2996 test -z "$ac_c_werror_flag" ||
2997 test ! -s conftest.err
2998 } && test -s conftest.$ac_objext; then
2999 :
3000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003001 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002sed 's/^/| /' conftest.$ac_ext >&5
3003
3004 ac_c_werror_flag=$ac_save_c_werror_flag
3005 CFLAGS="-g"
3006 cat >conftest.$ac_ext <<_ACEOF
3007/* confdefs.h. */
3008_ACEOF
3009cat confdefs.h >>conftest.$ac_ext
3010cat >>conftest.$ac_ext <<_ACEOF
3011/* end confdefs.h. */
3012
3013int
3014main ()
3015{
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021rm -f conftest.$ac_objext
3022if { (ac_try="$ac_compile"
3023case "(($ac_try" in
3024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025 *) ac_try_echo=$ac_try;;
3026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (eval "$ac_compile") 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 (exit $ac_status); } && {
3035 test -z "$ac_c_werror_flag" ||
3036 test ! -s conftest.err
3037 } && test -s conftest.$ac_objext; then
3038 ac_cv_prog_cc_g=yes
3039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003040 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048
3049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3050fi
3051
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003055{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3056echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059elif test $ac_cv_prog_cc_g = yes; then
3060 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003061 CFLAGS="-g -O2"
3062 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003063 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064 fi
3065else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003066 if test "$GCC" = yes; then
3067 CFLAGS="-O2"
3068 else
3069 CFLAGS=
3070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3073echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003075 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003076else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003078ac_save_CC=$CC
3079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003080/* confdefs.h. */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h. */
3085#include <stdarg.h>
3086#include <stdio.h>
3087#include <sys/types.h>
3088#include <sys/stat.h>
3089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3090struct buf { int x; };
3091FILE * (*rcsopen) (struct buf *, struct stat *, int);
3092static char *e (p, i)
3093 char **p;
3094 int i;
3095{
3096 return p[i];
3097}
3098static char *f (char * (*g) (char **, int), char **p, ...)
3099{
3100 char *s;
3101 va_list v;
3102 va_start (v,p);
3103 s = g (p, va_arg (v,int));
3104 va_end (v);
3105 return s;
3106}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003107
3108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3109 function prototypes and stuff, but not '\xHH' hex character constants.
3110 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3113 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3118 inside strings and character constants. */
3119#define FOO(x) 'x'
3120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3121
Skip Montanaro6dead952003-09-25 14:50:04 +00003122int test (int i, double x);
3123struct s1 {int (*f) (int a);};
3124struct s2 {int (*f) (double a);};
3125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3126int argc;
3127char **argv;
3128int
3129main ()
3130{
3131return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3132 ;
3133 return 0;
3134}
3135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003138do
3139 CC="$ac_save_CC $ac_arg"
3140 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141if { (ac_try="$ac_compile"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149 grep -v '^ *+' conftest.er1 >conftest.err
3150 rm -f conftest.er1
3151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 (exit $ac_status); } && {
3154 test -z "$ac_c_werror_flag" ||
3155 test ! -s conftest.err
3156 } && test -s conftest.$ac_objext; then
3157 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003160sed 's/^/| /' conftest.$ac_ext >&5
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162
Skip Montanaro6dead952003-09-25 14:50:04 +00003163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
3165rm -f core conftest.err conftest.$ac_objext
3166 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003167done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003169CC=$ac_save_CC
3170
3171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172# AC_CACHE_VAL
3173case "x$ac_cv_prog_cc_c89" in
3174 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003175 { echo "$as_me:$LINENO: result: none needed" >&5
3176echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: unsupported" >&5
3179echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003182 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3183echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003184esac
3185
Skip Montanaro6dead952003-09-25 14:50:04 +00003186
Martin v. Löwis11437992002-04-12 09:54:03 +00003187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
3195
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003196{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3197echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202
3203 case $withval in
3204 no) with_cxx_main=no
3205 MAINCC='$(CC)';;
3206 yes) with_cxx_main=yes
3207 MAINCC='$(CXX)';;
3208 *) with_cxx_main=yes
3209 MAINCC=$withval
3210 if test -z "$CXX"
3211 then
3212 CXX=$withval
3213 fi;;
3214 esac
3215else
3216
3217 with_cxx_main=no
3218 MAINCC='$(CC)'
3219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003222{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3223echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003224
3225preset_cxx="$CXX"
3226if test -z "$CXX"
3227then
3228 case "$CC" in
3229 gcc) # Extract the first word of "g++", so it can be a program name with args.
3230set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003234 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235else
3236 case $CXX in
3237 [\\/]* | ?:[\\/]*)
3238 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3239 ;;
3240 *)
3241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in notfound
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
3246 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003248 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250 break 2
3251 fi
3252done
3253done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3257 ;;
3258esac
3259fi
3260CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262 { echo "$as_me:$LINENO: result: $CXX" >&5
3263echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 { echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269 ;;
3270 cc) # Extract the first word of "c++", so it can be a program name with args.
3271set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003275 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276else
3277 case $CXX in
3278 [\\/]* | ?:[\\/]*)
3279 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in notfound
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003289 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 break 2
3292 fi
3293done
3294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296
3297 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3298 ;;
3299esac
3300fi
3301CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303 { echo "$as_me:$LINENO: result: $CXX" >&5
3304echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 { echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310 ;;
3311 esac
3312 if test "$CXX" = "notfound"
3313 then
3314 CXX=""
3315 fi
3316fi
3317if test -z "$CXX"
3318then
3319 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3320do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327else
3328 if test -n "$CXX"; then
3329 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3330else
3331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003338 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340 break 2
3341 fi
3342done
3343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345
3346fi
3347fi
3348CXX=$ac_cv_prog_CXX
3349if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003350 { echo "$as_me:$LINENO: result: $CXX" >&5
3351echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003353 { echo "$as_me:$LINENO: result: no" >&5
3354echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003355fi
3356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358 test -n "$CXX" && break
3359done
3360test -n "$CXX" || CXX="notfound"
3361
3362 if test "$CXX" = "notfound"
3363 then
3364 CXX=""
3365 fi
3366fi
3367if test "$preset_cxx" != "$CXX"
3368then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003369 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370
3371 By default, distutils will build C++ extension modules with \"$CXX\".
3372 If this is not intended, then set CXX on the configure command line.
3373 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003374echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375
3376 By default, distutils will build C++ extension modules with \"$CXX\".
3377 If this is not intended, then set CXX on the configure command line.
3378 " >&2;}
3379fi
3380
3381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003383
3384ac_ext=c
3385ac_cpp='$CPP $CPPFLAGS'
3386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003389{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3390echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003391# On Suns, sometimes $CPP names a directory.
3392if test -n "$CPP" && test -d "$CPP"; then
3393 CPP=
3394fi
3395if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003398else
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 # Double quotes because CPP needs to be expanded
3400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3401 do
3402 ac_preproc_ok=false
3403for ac_c_preproc_warn_flag in '' yes
3404do
3405 # Use a header file that comes with gcc, so configuring glibc
3406 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3408 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003409 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 # not just through cpp. "Syntax error" is here to catch this case.
3411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
3417#ifdef __STDC__
3418# include <limits.h>
3419#else
3420# include <assert.h>
3421#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003422 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003423_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424if { (ac_try="$ac_cpp conftest.$ac_ext"
3425case "(($ac_try" in
3426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3427 *) ac_try_echo=$ac_try;;
3428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003432 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 rm -f conftest.er1
3434 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 (exit $ac_status); } >/dev/null && {
3437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3438 test ! -s conftest.err
3439 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 :
3441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003443sed 's/^/| /' conftest.$ac_ext >&5
3444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # Broken: fails on valid input.
3446continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # can be detected and how.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003459#include <ac_nonexistent.h>
3460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461if { (ac_try="$ac_cpp conftest.$ac_ext"
3462case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003469 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 rm -f conftest.er1
3471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (exit $ac_status); } >/dev/null && {
3474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3475 test ! -s conftest.err
3476 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Broken: success on invalid input.
3478continue
3479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003481sed 's/^/| /' conftest.$ac_ext >&5
3482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Passes both tests.
3484ac_preproc_ok=:
3485break
3486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488rm -f conftest.err conftest.$ac_ext
3489
3490done
3491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3492rm -f conftest.err conftest.$ac_ext
3493if $ac_preproc_ok; then
3494 break
3495fi
3496
3497 done
3498 ac_cv_prog_CPP=$CPP
3499
3500fi
3501 CPP=$ac_cv_prog_CPP
3502else
3503 ac_cv_prog_CPP=$CPP
3504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505{ echo "$as_me:$LINENO: result: $CPP" >&5
3506echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507ac_preproc_ok=false
3508for ac_c_preproc_warn_flag in '' yes
3509do
3510 # Use a header file that comes with gcc, so configuring glibc
3511 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3513 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # On the NeXT, cc -E runs the code through the compiler's parser,
3515 # not just through cpp. "Syntax error" is here to catch this case.
3516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* confdefs.h. */
3518_ACEOF
3519cat confdefs.h >>conftest.$ac_ext
3520cat >>conftest.$ac_ext <<_ACEOF
3521/* end confdefs.h. */
3522#ifdef __STDC__
3523# include <limits.h>
3524#else
3525# include <assert.h>
3526#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003527 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529if { (ac_try="$ac_cpp conftest.$ac_ext"
3530case "(($ac_try" in
3531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532 *) ac_try_echo=$ac_try;;
3533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 rm -f conftest.er1
3539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 (exit $ac_status); } >/dev/null && {
3542 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3543 test ! -s conftest.err
3544 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 :
3546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003548sed 's/^/| /' conftest.$ac_ext >&5
3549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # Broken: fails on valid input.
3551continue
3552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f conftest.err conftest.$ac_ext
3555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # can be detected and how.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003564#include <ac_nonexistent.h>
3565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 rm -f conftest.er1
3576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (exit $ac_status); } >/dev/null && {
3579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3580 test ! -s conftest.err
3581 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Broken: success on invalid input.
3583continue
3584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Passes both tests.
3589ac_preproc_ok=:
3590break
3591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f conftest.err conftest.$ac_ext
3594
3595done
3596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3597rm -f conftest.err conftest.$ac_ext
3598if $ac_preproc_ok; then
3599 :
3600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003602See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003603echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
3608ac_ext=c
3609ac_cpp='$CPP $CPPFLAGS'
3610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3612ac_compiler_gnu=$ac_cv_c_compiler_gnu
3613
3614
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003615{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3616echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620 # Extract the first word of "grep ggrep" to use in msg output
3621if test -z "$GREP"; then
3622set dummy grep ggrep; ac_prog_name=$2
3623if test "${ac_cv_path_GREP+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
3625else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003627# Loop through the user's path and test for each of PROGNAME-LIST
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
3633 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
3635 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3636 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3637 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 # Check for GNU $ac_path_GREP
3639case `"$ac_path_GREP" --version 2>&1` in
3640*GNU*)
3641 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3642*)
3643 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 while :
3646 do
3647 cat "conftest.in" "conftest.in" >"conftest.tmp"
3648 mv "conftest.tmp" "conftest.in"
3649 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003650 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3652 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3653 ac_count=`expr $ac_count + 1`
3654 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3655 # Best one so far, save it but keep looking for a better one
3656 ac_cv_path_GREP="$ac_path_GREP"
3657 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 # 10*(2^10) chars as input seems more than enough
3660 test $ac_count -gt 10 && break
3661 done
3662 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3663esac
3664
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 done
3668done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003669
3670done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003672
3673
3674fi
3675
3676GREP="$ac_cv_path_GREP"
3677if test -z "$GREP"; then
3678 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3679echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683else
3684 ac_cv_path_GREP=$GREP
3685fi
3686
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3690echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 GREP="$ac_cv_path_GREP"
3692
3693
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694{ echo "$as_me:$LINENO: checking for egrep" >&5
3695echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003697 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698else
3699 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3700 then ac_cv_path_EGREP="$GREP -E"
3701 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702 # Extract the first word of "egrep" to use in msg output
3703if test -z "$EGREP"; then
3704set dummy egrep; ac_prog_name=$2
3705if test "${ac_cv_path_EGREP+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3707else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003709# Loop through the user's path and test for each of PROGNAME-LIST
3710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
3715 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
3717 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3718 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3719 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 # Check for GNU $ac_path_EGREP
3721case `"$ac_path_EGREP" --version 2>&1` in
3722*GNU*)
3723 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3724*)
3725 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 while :
3728 do
3729 cat "conftest.in" "conftest.in" >"conftest.tmp"
3730 mv "conftest.tmp" "conftest.in"
3731 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003732 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3734 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3735 ac_count=`expr $ac_count + 1`
3736 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3737 # Best one so far, save it but keep looking for a better one
3738 ac_cv_path_EGREP="$ac_path_EGREP"
3739 ac_path_EGREP_max=$ac_count
3740 fi
3741 # 10*(2^10) chars as input seems more than enough
3742 test $ac_count -gt 10 && break
3743 done
3744 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3745esac
3746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 done
3750done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003751
3752done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003754
3755
3756fi
3757
3758EGREP="$ac_cv_path_EGREP"
3759if test -z "$EGREP"; then
3760 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3761echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765else
3766 ac_cv_path_EGREP=$EGREP
3767fi
3768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 fi
3771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003772{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3773echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003775
3776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003777
3778{ echo "$as_me:$LINENO: checking for AIX" >&5
3779echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3780cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003781/* confdefs.h. */
3782_ACEOF
3783cat confdefs.h >>conftest.$ac_ext
3784cat >>conftest.$ac_ext <<_ACEOF
3785/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786#ifdef _AIX
3787 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003788#endif
3789
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003790_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792 $EGREP "yes" >/dev/null 2>&1; then
3793 { echo "$as_me:$LINENO: result: yes" >&5
3794echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003795cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003796#define _ALL_SOURCE 1
3797_ACEOF
3798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003799else
3800 { echo "$as_me:$LINENO: result: no" >&5
3801echo "${ECHO_T}no" >&6; }
3802fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003803rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003804
3805
3806
3807# Check for unsupported systems
3808case $ac_sys_system/$ac_sys_release in
3809atheos*|Linux*/1*)
3810 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3811 echo See README for details.
3812 exit 1;;
3813esac
3814
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3817echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003818
3819# Check whether --with-suffix was given.
3820if test "${with_suffix+set}" = set; then
3821 withval=$with_suffix;
3822 case $withval in
3823 no) EXEEXT=;;
3824 yes) EXEEXT=.exe;;
3825 *) EXEEXT=$withval;;
3826 esac
3827fi
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3830echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831
3832# Test whether we're running on a non-case-sensitive system, in which
3833# case we give a warning if no ext is given
3834
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003835{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3836echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837if test ! -d CaseSensitiveTestDir; then
3838mkdir CaseSensitiveTestDir
3839fi
3840
3841if test -d casesensitivetestdir
3842then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: yes" >&5
3844echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=.exe
3846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847 { echo "$as_me:$LINENO: result: no" >&5
3848echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849 BUILDEXEEXT=$EXEEXT
3850fi
3851rmdir CaseSensitiveTestDir
3852
3853case $MACHDEP in
3854bsdos*)
3855 case $CC in
3856 gcc) CC="$CC -D_HAVE_BSDI";;
3857 esac;;
3858esac
3859
3860case $ac_sys_system in
3861hp*|HP*)
3862 case $CC in
3863 cc|*/cc) CC="$CC -Ae";;
3864 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865SunOS*)
3866 # Some functions have a prototype only with that define, e.g. confstr
3867
3868cat >>confdefs.h <<\_ACEOF
3869#define __EXTENSIONS__ 1
3870_ACEOF
3871
3872 ;;
3873esac
3874
3875
3876
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3878echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879if test -z "$LIBRARY"
3880then
3881 LIBRARY='libpython$(VERSION).a'
3882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003883{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3884echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003885
3886# LDLIBRARY is the name of the library to link against (as opposed to the
3887# name of the library into which to insert object files). BLDLIBRARY is also
3888# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3889# is blank as the main program is not linked directly against LDLIBRARY.
3890# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3891# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3892# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3893# DLLLIBRARY is the shared (i.e., DLL) library.
3894#
3895# RUNSHARED is used to run shared python without installed libraries
3896#
3897# INSTSONAME is the name of the shared library that will be use to install
3898# on the system - some systems like version suffix, others don't
3899
3900
3901
3902
3903
3904
3905LDLIBRARY="$LIBRARY"
3906BLDLIBRARY='$(LDLIBRARY)'
3907INSTSONAME='$(LDLIBRARY)'
3908DLLLIBRARY=''
3909LDLIBRARYDIR=''
3910RUNSHARED=''
3911
3912# LINKCC is the command that links the python executable -- default is $(CC).
3913# If CXX is set, and if it is needed to link a main function that was
3914# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3915# python might then depend on the C++ runtime
3916# This is altered for AIX in order to build the export list before
3917# linking.
3918
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003919{ echo "$as_me:$LINENO: checking LINKCC" >&5
3920echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003921if test -z "$LINKCC"
3922then
3923 LINKCC='$(PURIFY) $(MAINCC)'
3924 case $ac_sys_system in
3925 AIX*)
3926 exp_extra="\"\""
3927 if test $ac_sys_release -ge 5 -o \
3928 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3929 exp_extra="."
3930 fi
3931 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003932 QNX*)
3933 # qcc must be used because the other compilers do not
3934 # support -N.
3935 LINKCC=qcc;;
3936 esac
3937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003938{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3939echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003940
3941# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3942# make sure we default having it set to "no": this is used by
3943# distutils.unixccompiler to know if it should add --enable-new-dtags
3944# to linker command lines, and failing to detect GNU ld simply results
3945# in the same bahaviour as before.
3946
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003947{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3948echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949ac_prog=ld
3950if test "$GCC" = yes; then
3951 ac_prog=`$CC -print-prog-name=ld`
3952fi
3953case `"$ac_prog" -V 2>&1 < /dev/null` in
3954 *GNU*)
3955 GNULD=yes;;
3956 *)
3957 GNULD=no;;
3958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003959{ echo "$as_me:$LINENO: result: $GNULD" >&5
3960echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003962{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3963echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003964# Check whether --enable-shared was given.
3965if test "${enable_shared+set}" = set; then
3966 enableval=$enable_shared;
3967fi
3968
3969
3970if test -z "$enable_shared"
3971then
3972 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003973 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974 enable_shared="yes";;
3975 *)
3976 enable_shared="no";;
3977 esac
3978fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3980echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003982{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3983echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003984# Check whether --enable-profiling was given.
3985if test "${enable_profiling+set}" = set; then
3986 enableval=$enable_profiling; ac_save_cc="$CC"
3987 CC="$CC -pg"
3988 if test "$cross_compiling" = yes; then
3989 ac_enable_profiling="no"
3990else
3991 cat >conftest.$ac_ext <<_ACEOF
3992/* confdefs.h. */
3993_ACEOF
3994cat confdefs.h >>conftest.$ac_ext
3995cat >>conftest.$ac_ext <<_ACEOF
3996/* end confdefs.h. */
3997int main() { return 0; }
3998_ACEOF
3999rm -f conftest$ac_exeext
4000if { (ac_try="$ac_link"
4001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004006 (eval "$ac_link") 2>&5
4007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4010 { (case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015 (eval "$ac_try") 2>&5
4016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018 (exit $ac_status); }; }; then
4019 ac_enable_profiling="yes"
4020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004021 echo "$as_me: program exited with status $ac_status" >&5
4022echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023sed 's/^/| /' conftest.$ac_ext >&5
4024
4025( exit $ac_status )
4026ac_enable_profiling="no"
4027fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4029fi
4030
4031
4032 CC="$ac_save_cc"
4033fi
4034
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004035{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4036echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037
4038case "$ac_enable_profiling" in
4039 "yes")
4040 BASECFLAGS="-pg $BASECFLAGS"
4041 LDFLAGS="-pg $LDFLAGS"
4042 ;;
4043esac
4044
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4046echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047
4048# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4049# library that we build, but we do not want to link against it (we
4050# will find it with a -framework option). For this reason there is an
4051# extra variable BLDLIBRARY against which Python and the extension
4052# modules are linked, BLDLIBRARY. This is normally the same as
4053# LDLIBRARY, but empty for MacOSX framework builds.
4054if test "$enable_framework"
4055then
4056 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4057 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4058 BLDLIBRARY=''
4059else
4060 BLDLIBRARY='$(LDLIBRARY)'
4061fi
4062
4063# Other platforms follow
4064if test $enable_shared = "yes"; then
4065
4066cat >>confdefs.h <<\_ACEOF
4067#define Py_ENABLE_SHARED 1
4068_ACEOF
4069
4070 case $ac_sys_system in
4071 CYGWIN*)
4072 LDLIBRARY='libpython$(VERSION).dll.a'
4073 DLLLIBRARY='libpython$(VERSION).dll'
4074 ;;
4075 SunOS*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 INSTSONAME="$LDLIBRARY".$SOVERSION
4080 ;;
4081 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4082 LDLIBRARY='libpython$(VERSION).so'
4083 BLDLIBRARY='-L. -lpython$(VERSION)'
4084 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4085 case $ac_sys_system in
4086 FreeBSD*)
4087 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4088 ;;
4089 esac
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 hp*|HP*)
4093 case `uname -m` in
4094 ia64)
4095 LDLIBRARY='libpython$(VERSION).so'
4096 ;;
4097 *)
4098 LDLIBRARY='libpython$(VERSION).sl'
4099 ;;
4100 esac
4101 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4102 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4103 ;;
4104 OSF*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004109 Darwin*)
4110 LDLIBRARY='libpython$(VERSION).dylib'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
4112 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4113 ;;
4114
4115 esac
4116else # shared is disabled
4117 case $ac_sys_system in
4118 CYGWIN*)
4119 BLDLIBRARY='$(LIBRARY)'
4120 LDLIBRARY='libpython$(VERSION).dll.a'
4121 ;;
4122 esac
4123fi
4124
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4126echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127
4128if test -n "$ac_tool_prefix"; then
4129 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004131{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004133if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004134 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004135else
4136 if test -n "$RANLIB"; then
4137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138else
4139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4140for as_dir in $PATH
4141do
4142 IFS=$as_save_IFS
4143 test -z "$as_dir" && as_dir=.
4144 for ac_exec_ext in '' $ac_executable_extensions; do
4145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004148 break 2
4149 fi
4150done
4151done
4152IFS=$as_save_IFS
4153
4154fi
4155fi
4156RANLIB=$ac_cv_prog_RANLIB
4157if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4159echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004161 { echo "$as_me:$LINENO: result: no" >&5
4162echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004163fi
4164
4165
4166fi
4167if test -z "$ac_cv_prog_RANLIB"; then
4168 ac_ct_RANLIB=$RANLIB
4169 # Extract the first word of "ranlib", so it can be a program name with args.
4170set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004171{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004173if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004174 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004175else
4176 if test -n "$ac_ct_RANLIB"; then
4177 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
4184 for ac_exec_ext in '' $ac_executable_extensions; do
4185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004188 break 2
4189 fi
4190done
4191done
4192IFS=$as_save_IFS
4193
4194fi
4195fi
4196ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4197if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004198 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4199echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004201 { echo "$as_me:$LINENO: result: no" >&5
4202echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004203fi
4204
4205 if test "x$ac_ct_RANLIB" = x; then
4206 RANLIB=":"
4207 else
4208 case $cross_compiling:$ac_tool_warned in
4209yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004210{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4211whose name does not start with the host triplet. If you think this
4212configuration is useful to you, please write to autoconf@gnu.org." >&5
4213echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4214whose name does not start with the host triplet. If you think this
4215configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216ac_tool_warned=yes ;;
4217esac
4218 RANLIB=$ac_ct_RANLIB
4219 fi
4220else
4221 RANLIB="$ac_cv_prog_RANLIB"
4222fi
4223
4224
4225for ac_prog in ar aal
4226do
4227 # Extract the first word of "$ac_prog", so it can be a program name with args.
4228set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
4234 if test -n "$AR"; then
4235 ac_cv_prog_AR="$AR" # Let the user override the test.
4236else
4237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
4242 for ac_exec_ext in '' $ac_executable_extensions; do
4243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4244 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004246 break 2
4247 fi
4248done
4249done
4250IFS=$as_save_IFS
4251
4252fi
4253fi
4254AR=$ac_cv_prog_AR
4255if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004256 { echo "$as_me:$LINENO: result: $AR" >&5
4257echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004259 { echo "$as_me:$LINENO: result: no" >&5
4260echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004261fi
4262
4263
4264 test -n "$AR" && break
4265done
4266test -n "$AR" || AR="ar"
4267
4268
4269# tweak ARFLAGS only if the user didn't set it on the command line
4270
4271if test -z "$ARFLAGS"
4272then
4273 ARFLAGS="rc"
4274fi
4275
4276
4277# Extract the first word of "svnversion", so it can be a program name with args.
4278set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004281if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004282 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004283else
4284 if test -n "$SVNVERSION"; then
4285 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4286else
4287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4294 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004296 break 2
4297 fi
4298done
4299done
4300IFS=$as_save_IFS
4301
4302 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4303fi
4304fi
4305SVNVERSION=$ac_cv_prog_SVNVERSION
4306if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004307 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4308echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310 { echo "$as_me:$LINENO: result: no" >&5
4311echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312fi
4313
4314
4315if test $SVNVERSION = found
4316then
4317 SVNVERSION="svnversion \$(srcdir)"
4318else
4319 SVNVERSION="echo Unversioned directory"
4320fi
4321
4322case $MACHDEP in
4323bsdos*|hp*|HP*)
4324 # install -d does not work on BSDI or HP-UX
4325 if test -z "$INSTALL"
4326 then
4327 INSTALL="${srcdir}/install-sh -c"
4328 fi
4329esac
4330ac_aux_dir=
4331for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4332 if test -f "$ac_dir/install-sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install-sh -c"
4335 break
4336 elif test -f "$ac_dir/install.sh"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/install.sh -c"
4339 break
4340 elif test -f "$ac_dir/shtool"; then
4341 ac_aux_dir=$ac_dir
4342 ac_install_sh="$ac_aux_dir/shtool install -c"
4343 break
4344 fi
4345done
4346if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004347 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4348echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004349 { (exit 1); exit 1; }; }
4350fi
4351
4352# These three variables are undocumented and unsupported,
4353# and are intended to be withdrawn in a future Autoconf release.
4354# They can cause serious problems if a builder's source tree is in a directory
4355# whose full name contains unusual characters.
4356ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4357ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4358ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4359
4360
4361# Find a good install program. We prefer a C program (faster),
4362# so one script is as good as another. But avoid the broken or
4363# incompatible versions:
4364# SysV /etc/install, /usr/sbin/install
4365# SunOS /usr/etc/install
4366# IRIX /sbin/install
4367# AIX /bin/install
4368# AmigaOS /C/install, which installs bootblocks on floppy discs
4369# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4370# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4371# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4372# OS/2's system install, which has a completely different semantic
4373# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4375echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376if test -z "$INSTALL"; then
4377if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004379else
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 # Account for people who put trailing slashes in PATH elements.
4386case $as_dir/ in
4387 ./ | .// | /cC/* | \
4388 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4389 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4390 /usr/ucb/* ) ;;
4391 *)
4392 # OSF1 and SCO ODT 3.0 have their own names for install.
4393 # Don't use installbsd from OSF since it installs stuff as root
4394 # by default.
4395 for ac_prog in ginstall scoinst install; do
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4398 if test $ac_prog = install &&
4399 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # AIX install. It has an incompatible calling convention.
4401 :
4402 elif test $ac_prog = install &&
4403 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4404 # program-specific install script used by HP pwplus--don't use.
4405 :
4406 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4408 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409 fi
4410 fi
4411 done
4412 done
4413 ;;
4414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004415done
4416IFS=$as_save_IFS
4417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004418
4419fi
4420 if test "${ac_cv_path_install+set}" = set; then
4421 INSTALL=$ac_cv_path_install
4422 else
4423 # As a last resort, use the slow shell script. Don't cache a
4424 # value for INSTALL within a source directory, because that will
4425 # break other packages using the cache if that directory is
4426 # removed, or if the value is a relative name.
4427 INSTALL=$ac_install_sh
4428 fi
4429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004430{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4431echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432
4433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4434# It thinks the first close brace ends the variable substitution.
4435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4436
4437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4438
4439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4440
4441
4442# Not every filesystem supports hard links
4443
4444if test -z "$LN" ; then
4445 case $ac_sys_system in
4446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004447 *) LN=ln;;
4448 esac
4449fi
4450
4451# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4453echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
4455# Check whether --with-pydebug was given.
4456if test "${with_pydebug+set}" = set; then
4457 withval=$with_pydebug;
4458if test "$withval" != no
4459then
4460
4461cat >>confdefs.h <<\_ACEOF
4462#define Py_DEBUG 1
4463_ACEOF
4464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465 { echo "$as_me:$LINENO: result: yes" >&5
4466echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468else { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004472 { echo "$as_me:$LINENO: result: no" >&5
4473echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474fi
4475
4476
4477# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4478# merged with this chunk of code?
4479
4480# Optimizer/debugger flags
4481# ------------------------
4482# (The following bit of code is complicated enough - please keep things
4483# indented properly. Just pretend you're editing Python code. ;-)
4484
4485# There are two parallel sets of case statements below, one that checks to
4486# see if OPT was set and one that does BASECFLAGS setting based upon
4487# compiler and platform. BASECFLAGS tweaks need to be made even if the
4488# user set OPT.
4489
4490# tweak OPT based on compiler and platform, only if the user didn't set
4491# it on the command line
4492
4493if test -z "$OPT"
4494then
4495 case $GCC in
4496 yes)
4497 if test "$CC" != 'g++' ; then
4498 STRICT_PROTO="-Wstrict-prototypes"
4499 fi
4500 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4501 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4502 WRAP="-fwrapv"
4503 fi
4504 case $ac_cv_prog_cc_g in
4505 yes)
4506 if test "$Py_DEBUG" = 'true' ; then
4507 # Optimization messes up debuggers, so turn it off for
4508 # debug builds.
4509 OPT="-g -Wall $STRICT_PROTO"
4510 else
4511 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4512 fi
4513 ;;
4514 *)
4515 OPT="-O3 -Wall $STRICT_PROTO"
4516 ;;
4517 esac
4518 case $ac_sys_system in
4519 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4520 ;;
4521 esac
4522 ;;
4523
4524 *)
4525 OPT="-O"
4526 ;;
4527 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528fi
4529
4530
4531
4532# The -arch flags for universal builds on OSX
4533UNIVERSAL_ARCH_FLAGS=
4534
4535
4536# tweak BASECFLAGS based on compiler and platform
4537case $GCC in
4538yes)
4539 # Python violates C99 rules, by casting between incompatible
4540 # pointer types. GCC may generate bad code as a result of that,
4541 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004542 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4543echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004544 ac_save_cc="$CC"
4545 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004546 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004547 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004548else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004549 cat >conftest.$ac_ext <<_ACEOF
4550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004555
4556int
4557main ()
4558{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004560 ;
4561 return 0;
4562}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004563_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004564rm -f conftest.$ac_objext
4565if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566case "(($ac_try" in
4567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4568 *) ac_try_echo=$ac_try;;
4569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004571 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004572 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004573 grep -v '^ *+' conftest.er1 >conftest.err
4574 rm -f conftest.er1
4575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 (exit $ac_status); } && {
4578 test -z "$ac_c_werror_flag" ||
4579 test ! -s conftest.err
4580 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004581 ac_cv_no_strict_aliasing_ok=yes
4582else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004583 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584sed 's/^/| /' conftest.$ac_ext >&5
4585
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004586 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004587fi
4588
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004590fi
4591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004593 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4594echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595 if test $ac_cv_no_strict_aliasing_ok = yes
4596 then
4597 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4598 fi
4599
4600 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4601 # support. Without this, treatment of subnormals doesn't follow
4602 # the standard.
4603 case $ac_sys_machine in
4604 alpha*)
4605 BASECFLAGS="$BASECFLAGS -mieee"
4606 ;;
4607 esac
4608
4609 case $ac_sys_system in
4610 SCO_SV*)
4611 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4612 ;;
4613 # is there any other compiler on Darwin besides gcc?
4614 Darwin*)
4615 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4616 # used to be here, but non-Apple gcc doesn't accept them.
4617
4618
4619 if test "${enable_universalsdk}"; then
4620 UNIVERSAL_ARCH_FLAGS=""
4621 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4622 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4623 ARCH_RUN_32BIT=""
4624
4625 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004627 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4630 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4631 ARCH_RUN_32BIT="arch -i386 -ppc"
4632
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004633 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4634 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4635 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"
4639 ARCH_RUN_32BIT="arch -i386 -ppc"
4640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004642 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4643echo "$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 +00004644 { (exit 1); exit 1; }; }
4645
4646 fi
4647
4648
4649 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4650 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4651 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4652 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4653 fi
4654 fi
4655
4656 # Calculate the right deployment target for this build.
4657 #
4658 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4659 if test ${cur_target} '>' 10.2; then
4660 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004661 if test ${enable_universalsdk}; then
4662 if test "${UNIVERSAL_ARCHS}" = "all"; then
4663 # Ensure that the default platform for a
4664 # 4-way universal build is OSX 10.5,
4665 # that's the first OS release where
4666 # 4-way builds make sense.
4667 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004668
4669 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4670 cur_target='10.5'
4671
4672 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4673 cur_target='10.5'
4674
4675 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4676 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004677 fi
4678 else
4679 if test `arch` = "i386"; then
4680 # On Intel macs default to a deployment
4681 # target of 10.4, that's the first OSX
4682 # release with Intel support.
4683 cur_target="10.4"
4684 fi
4685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686 fi
4687 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4688
4689 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4690 # environment with a value that is the same as what we'll use
4691 # in the Makefile to ensure that we'll get the same compiler
4692 # environment during configure and build time.
4693 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4694 export MACOSX_DEPLOYMENT_TARGET
4695 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4696
4697 ;;
4698 OSF*)
4699 BASECFLAGS="$BASECFLAGS -mieee"
4700 ;;
4701 esac
4702 ;;
4703
4704*)
4705 case $ac_sys_system in
4706 OpenUNIX*|UnixWare*)
4707 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4708 ;;
4709 OSF*)
4710 BASECFLAGS="$BASECFLAGS -ieee -std"
4711 ;;
4712 SCO_SV*)
4713 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4714 ;;
4715 esac
4716 ;;
4717esac
4718
4719if test "$Py_DEBUG" = 'true'; then
4720 :
4721else
4722 OPT="-DNDEBUG $OPT"
4723fi
4724
4725if test "$ac_arch_flags"
4726then
4727 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4728fi
4729
4730# disable check for icc since it seems to pass, but generates a warning
4731if test "$CC" = icc
4732then
4733 ac_cv_opt_olimit_ok=no
4734fi
4735
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004736{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4737echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004739 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740else
4741 ac_save_cc="$CC"
4742CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004743cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744/* confdefs.h. */
4745_ACEOF
4746cat confdefs.h >>conftest.$ac_ext
4747cat >>conftest.$ac_ext <<_ACEOF
4748/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004749
4750int
4751main ()
4752{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004754 ;
4755 return 0;
4756}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004758rm -f conftest.$ac_objext
4759if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760case "(($ac_try" in
4761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4762 *) ac_try_echo=$ac_try;;
4763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004765 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004767 grep -v '^ *+' conftest.er1 >conftest.err
4768 rm -f conftest.er1
4769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004771 (exit $ac_status); } && {
4772 test -z "$ac_c_werror_flag" ||
4773 test ! -s conftest.err
4774 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 ac_cv_opt_olimit_ok=yes
4776else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004777 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778sed 's/^/| /' conftest.$ac_ext >&5
4779
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004780 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781fi
4782
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784CC="$ac_save_cc"
4785fi
4786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004787{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4788echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789if test $ac_cv_opt_olimit_ok = yes; then
4790 case $ac_sys_system in
4791 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4792 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4793 # environment?
4794 Darwin*)
4795 ;;
4796 *)
4797 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4798 ;;
4799 esac
4800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004801 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4802echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004804 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805else
4806 ac_save_cc="$CC"
4807 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808 cat >conftest.$ac_ext <<_ACEOF
4809/* confdefs.h. */
4810_ACEOF
4811cat confdefs.h >>conftest.$ac_ext
4812cat >>conftest.$ac_ext <<_ACEOF
4813/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004814
4815int
4816main ()
4817{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004819 ;
4820 return 0;
4821}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004823rm -f conftest.$ac_objext
4824if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825case "(($ac_try" in
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004830 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004832 grep -v '^ *+' conftest.er1 >conftest.err
4833 rm -f conftest.er1
4834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004836 (exit $ac_status); } && {
4837 test -z "$ac_c_werror_flag" ||
4838 test ! -s conftest.err
4839 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840 ac_cv_olimit_ok=yes
4841else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004842 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843sed 's/^/| /' conftest.$ac_ext >&5
4844
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846fi
4847
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 CC="$ac_save_cc"
4850fi
4851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004852 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4853echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 if test $ac_cv_olimit_ok = yes; then
4855 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4856 fi
4857fi
4858
4859# Check whether GCC supports PyArg_ParseTuple format
4860if test "$GCC" = "yes"
4861then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004862 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4863echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 save_CFLAGS=$CFLAGS
4865 CFLAGS="$CFLAGS -Werror"
4866 cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872
4873 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4874
4875int
4876main ()
4877{
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (ac_try="$ac_compile"
4885case "(($ac_try" in
4886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4887 *) ac_try_echo=$ac_try;;
4888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 (eval "$ac_compile") 2>conftest.er1
4891 ac_status=$?
4892 grep -v '^ *+' conftest.er1 >conftest.err
4893 rm -f conftest.er1
4894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 (exit $ac_status); } && {
4897 test -z "$ac_c_werror_flag" ||
4898 test ! -s conftest.err
4899 } && test -s conftest.$ac_objext; then
4900
4901cat >>confdefs.h <<\_ACEOF
4902#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4903_ACEOF
4904
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 { echo "$as_me:$LINENO: result: yes" >&5
4906echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004908 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909sed 's/^/| /' conftest.$ac_ext >&5
4910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004911 { echo "$as_me:$LINENO: result: no" >&5
4912echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913
4914fi
4915
4916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4917 CFLAGS=$save_CFLAGS
4918fi
4919
4920# On some compilers, pthreads are available without further options
4921# (e.g. MacOS X). On some of these systems, the compiler will not
4922# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4923# So we have to see first whether pthreads are available without
4924# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004925{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4926echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004928 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929else
4930 if test "$cross_compiling" = yes; then
4931 ac_cv_pthread_is_default=no
4932else
4933 cat >conftest.$ac_ext <<_ACEOF
4934/* confdefs.h. */
4935_ACEOF
4936cat confdefs.h >>conftest.$ac_ext
4937cat >>conftest.$ac_ext <<_ACEOF
4938/* end confdefs.h. */
4939
4940#include <pthread.h>
4941
4942void* routine(void* p){return NULL;}
4943
4944int main(){
4945 pthread_t p;
4946 if(pthread_create(&p,NULL,routine,NULL)!=0)
4947 return 1;
4948 (void)pthread_detach(p);
4949 return 0;
4950}
4951
4952_ACEOF
4953rm -f conftest$ac_exeext
4954if { (ac_try="$ac_link"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (eval "$ac_link") 2>&5
4961 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4964 { (case "(($ac_try" in
4965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4966 *) ac_try_echo=$ac_try;;
4967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 (eval "$ac_try") 2>&5
4970 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 (exit $ac_status); }; }; then
4973
4974 ac_cv_pthread_is_default=yes
4975 ac_cv_kthread=no
4976 ac_cv_pthread=no
4977
4978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 echo "$as_me: program exited with status $ac_status" >&5
4980echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983( exit $ac_status )
4984ac_cv_pthread_is_default=no
4985fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4987fi
4988
4989
4990
4991fi
4992
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4994echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995
4996
4997if test $ac_cv_pthread_is_default = yes
4998then
4999 ac_cv_kpthread=no
5000else
5001# -Kpthread, if available, provides the right #defines
5002# and linker options to make pthread_create available
5003# Some compilers won't report that they do not support -Kpthread,
5004# so we need to run a program to see whether it really made the
5005# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005006{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5007echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005009 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010else
5011 ac_save_cc="$CC"
5012CC="$CC -Kpthread"
5013if test "$cross_compiling" = yes; then
5014 ac_cv_kpthread=no
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022
5023#include <pthread.h>
5024
5025void* routine(void* p){return NULL;}
5026
5027int main(){
5028 pthread_t p;
5029 if(pthread_create(&p,NULL,routine,NULL)!=0)
5030 return 1;
5031 (void)pthread_detach(p);
5032 return 0;
5033}
5034
5035_ACEOF
5036rm -f conftest$ac_exeext
5037if { (ac_try="$ac_link"
5038case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 (eval "$ac_link") 2>&5
5044 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5047 { (case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (eval "$ac_try") 2>&5
5053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (exit $ac_status); }; }; then
5056 ac_cv_kpthread=yes
5057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005058 echo "$as_me: program exited with status $ac_status" >&5
5059echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060sed 's/^/| /' conftest.$ac_ext >&5
5061
5062( exit $ac_status )
5063ac_cv_kpthread=no
5064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5066fi
5067
5068
5069CC="$ac_save_cc"
5070fi
5071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005072{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5073echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074fi
5075
5076if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5077then
5078# -Kthread, if available, provides the right #defines
5079# and linker options to make pthread_create available
5080# Some compilers won't report that they do not support -Kthread,
5081# so we need to run a program to see whether it really made the
5082# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005083{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5084echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005085if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005086 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087else
5088 ac_save_cc="$CC"
5089CC="$CC -Kthread"
5090if test "$cross_compiling" = yes; then
5091 ac_cv_kthread=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 (exit $ac_status); }; }; then
5133 ac_cv_kthread=yes
5134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140ac_cv_kthread=no
5141fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144
5145
5146CC="$ac_save_cc"
5147fi
5148
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005149{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5150echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151fi
5152
5153if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5154then
5155# -pthread, if available, provides the right #defines
5156# and linker options to make pthread_create available
5157# Some compilers won't report that they do not support -pthread,
5158# so we need to run a program to see whether it really made the
5159# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005160{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5161echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005163 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164else
5165 ac_save_cc="$CC"
5166CC="$CC -pthread"
5167if test "$cross_compiling" = yes; then
5168 ac_cv_pthread=no
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176
5177#include <pthread.h>
5178
5179void* routine(void* p){return NULL;}
5180
5181int main(){
5182 pthread_t p;
5183 if(pthread_create(&p,NULL,routine,NULL)!=0)
5184 return 1;
5185 (void)pthread_detach(p);
5186 return 0;
5187}
5188
5189_ACEOF
5190rm -f conftest$ac_exeext
5191if { (ac_try="$ac_link"
5192case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (eval "$ac_link") 2>&5
5198 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5201 { (case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_pthread=yes
5211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005212 echo "$as_me: program exited with status $ac_status" >&5
5213echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_pthread=no
5218fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5220fi
5221
5222
5223CC="$ac_save_cc"
5224fi
5225
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005226{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5227echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230# If we have set a CC compiler flag for thread support then
5231# check if it works for CXX, too.
5232ac_cv_cxx_thread=no
5233if test ! -z "$CXX"
5234then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005235{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5236echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237ac_save_cxx="$CXX"
5238
5239if test "$ac_cv_kpthread" = "yes"
5240then
5241 CXX="$CXX -Kpthread"
5242 ac_cv_cxx_thread=yes
5243elif test "$ac_cv_kthread" = "yes"
5244then
5245 CXX="$CXX -Kthread"
5246 ac_cv_cxx_thread=yes
5247elif test "$ac_cv_pthread" = "yes"
5248then
5249 CXX="$CXX -pthread"
5250 ac_cv_cxx_thread=yes
5251fi
5252
5253if test $ac_cv_cxx_thread = yes
5254then
5255 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5256 $CXX -c conftest.$ac_ext 2>&5
5257 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5258 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5259 then
5260 ac_cv_cxx_thread=yes
5261 else
5262 ac_cv_cxx_thread=no
5263 fi
5264 rm -fr conftest*
5265fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005266{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5267echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268fi
5269CXX="$ac_save_cxx"
5270
5271
5272# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5274echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277else
5278 cat >conftest.$ac_ext <<_ACEOF
5279/* confdefs.h. */
5280_ACEOF
5281cat confdefs.h >>conftest.$ac_ext
5282cat >>conftest.$ac_ext <<_ACEOF
5283/* end confdefs.h. */
5284#include <stdlib.h>
5285#include <stdarg.h>
5286#include <string.h>
5287#include <float.h>
5288
5289int
5290main ()
5291{
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (ac_try="$ac_compile"
5299case "(($ac_try" in
5300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5301 *) ac_try_echo=$ac_try;;
5302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 (eval "$ac_compile") 2>conftest.er1
5305 ac_status=$?
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 (exit $ac_status); } && {
5311 test -z "$ac_c_werror_flag" ||
5312 test ! -s conftest.err
5313 } && test -s conftest.$ac_objext; then
5314 ac_cv_header_stdc=yes
5315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005316 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319 ac_cv_header_stdc=no
5320fi
5321
5322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5323
5324if test $ac_cv_header_stdc = yes; then
5325 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5326 cat >conftest.$ac_ext <<_ACEOF
5327/* confdefs.h. */
5328_ACEOF
5329cat confdefs.h >>conftest.$ac_ext
5330cat >>conftest.$ac_ext <<_ACEOF
5331/* end confdefs.h. */
5332#include <string.h>
5333
5334_ACEOF
5335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5336 $EGREP "memchr" >/dev/null 2>&1; then
5337 :
5338else
5339 ac_cv_header_stdc=no
5340fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005341rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342
5343fi
5344
5345if test $ac_cv_header_stdc = yes; then
5346 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353#include <stdlib.h>
5354
5355_ACEOF
5356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5357 $EGREP "free" >/dev/null 2>&1; then
5358 :
5359else
5360 ac_cv_header_stdc=no
5361fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005362rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365
5366if test $ac_cv_header_stdc = yes; then
5367 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5368 if test "$cross_compiling" = yes; then
5369 :
5370else
5371 cat >conftest.$ac_ext <<_ACEOF
5372/* confdefs.h. */
5373_ACEOF
5374cat confdefs.h >>conftest.$ac_ext
5375cat >>conftest.$ac_ext <<_ACEOF
5376/* end confdefs.h. */
5377#include <ctype.h>
5378#include <stdlib.h>
5379#if ((' ' & 0x0FF) == 0x020)
5380# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5381# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5382#else
5383# define ISLOWER(c) \
5384 (('a' <= (c) && (c) <= 'i') \
5385 || ('j' <= (c) && (c) <= 'r') \
5386 || ('s' <= (c) && (c) <= 'z'))
5387# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5388#endif
5389
5390#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5391int
5392main ()
5393{
5394 int i;
5395 for (i = 0; i < 256; i++)
5396 if (XOR (islower (i), ISLOWER (i))
5397 || toupper (i) != TOUPPER (i))
5398 return 2;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest$ac_exeext
5403if { (ac_try="$ac_link"
5404case "(($ac_try" in
5405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5406 *) ac_try_echo=$ac_try;;
5407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 (eval "$ac_link") 2>&5
5410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5413 { (case "(($ac_try" in
5414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5415 *) ac_try_echo=$ac_try;;
5416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 (eval "$ac_try") 2>&5
5419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 (exit $ac_status); }; }; then
5422 :
5423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005424 echo "$as_me: program exited with status $ac_status" >&5
5425echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426sed 's/^/| /' conftest.$ac_ext >&5
5427
5428( exit $ac_status )
5429ac_cv_header_stdc=no
5430fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5432fi
5433
5434
5435fi
5436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5438echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439if test $ac_cv_header_stdc = yes; then
5440
5441cat >>confdefs.h <<\_ACEOF
5442#define STDC_HEADERS 1
5443_ACEOF
5444
5445fi
5446
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5458 inttypes.h stdint.h unistd.h
5459do
5460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5461{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5464 echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466 cat >conftest.$ac_ext <<_ACEOF
5467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
5472$ac_includes_default
5473
5474#include <$ac_header>
5475_ACEOF
5476rm -f conftest.$ac_objext
5477if { (ac_try="$ac_compile"
5478case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5481esac
5482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5483 (eval "$ac_compile") 2>conftest.er1
5484 ac_status=$?
5485 grep -v '^ *+' conftest.er1 >conftest.err
5486 rm -f conftest.er1
5487 cat conftest.err >&5
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); } && {
5490 test -z "$ac_c_werror_flag" ||
5491 test ! -s conftest.err
5492 } && test -s conftest.$ac_objext; then
5493 eval "$as_ac_Header=yes"
5494else
5495 echo "$as_me: failed program was:" >&5
5496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498 eval "$as_ac_Header=no"
5499fi
5500
5501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5502fi
5503ac_res=`eval echo '${'$as_ac_Header'}'`
5504 { echo "$as_me:$LINENO: result: $ac_res" >&5
5505echo "${ECHO_T}$ac_res" >&6; }
5506if test `eval echo '${'$as_ac_Header'}'` = yes; then
5507 cat >>confdefs.h <<_ACEOF
5508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5509_ACEOF
5510
5511fi
5512
5513done
5514
5515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Martin v. Löwis11437992002-04-12 09:54:03 +00005517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
Anthony Baxter8a560de2004-10-13 15:30:56 +00005552
Martin v. Löwisc3001752005-01-23 09:27:24 +00005553
Martin v. Löwis11017b12006-01-14 18:12:57 +00005554
Thomas Wouters477c8d52006-05-27 19:21:47 +00005555
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005556
5557
5558
5559
5560
5561
5562
5563
Thomas Wouters89f507f2006-12-13 04:49:30 +00005564
Christian Heimes043d6f62008-01-07 17:19:16 +00005565
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005566
5567
Christian Heimesbbe741d2008-03-28 10:53:29 +00005568
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005569
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005570for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5571fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005572ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005573shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005574unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005575sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5576sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005577sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005578sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005579sys/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 +00005580sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005581bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005582do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005583as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005585 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005589fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005590ac_res=`eval echo '${'$as_ac_Header'}'`
5591 { echo "$as_me:$LINENO: result: $ac_res" >&5
5592echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593else
Martin v. Löwis11437992002-04-12 09:54:03 +00005594 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005595{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5596echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005603$ac_includes_default
5604#include <$ac_header>
5605_ACEOF
5606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005607if { (ac_try="$ac_compile"
5608case "(($ac_try" in
5609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5610 *) ac_try_echo=$ac_try;;
5611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005615 grep -v '^ *+' conftest.er1 >conftest.err
5616 rm -f conftest.er1
5617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619 (exit $ac_status); } && {
5620 test -z "$ac_c_werror_flag" ||
5621 test ! -s conftest.err
5622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005626sed 's/^/| /' conftest.$ac_ext >&5
5627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005628 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005630
5631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005632{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5633echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005634
5635# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005636{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5637echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005644#include <$ac_header>
5645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646if { (ac_try="$ac_cpp conftest.$ac_ext"
5647case "(($ac_try" in
5648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5649 *) ac_try_echo=$ac_try;;
5650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005654 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005655 rm -f conftest.er1
5656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658 (exit $ac_status); } >/dev/null && {
5659 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5660 test ! -s conftest.err
5661 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 ac_header_preproc=yes
5663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005665sed 's/^/| /' conftest.$ac_ext >&5
5666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005669
Martin v. Löwis11437992002-04-12 09:54:03 +00005670rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005671{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5672echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673
5674# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005675case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5676 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005677 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5678echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5679 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5680echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005681 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005682 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005684 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5685echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5686 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5687echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5688 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5689echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5690 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5691echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5693echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5694 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5695echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005697## -------------------------------------- ##
5698## Report this to http://bugs.python.org/ ##
5699## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005700_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005701 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5705echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005706if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005707 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005708else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005711ac_res=`eval echo '${'$as_ac_Header'}'`
5712 { echo "$as_me:$LINENO: result: $ac_res" >&5
5713echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714
5715fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005716if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005718#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005719_ACEOF
5720
5721fi
5722
Guido van Rossum627b2d71993-12-24 10:39:16 +00005723done
5724
Martin v. Löwis11437992002-04-12 09:54:03 +00005725
5726
5727
5728
5729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005730ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005731for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005732 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5733{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5734echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005737else
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744#include <sys/types.h>
5745#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747int
5748main ()
5749{
5750if ((DIR *) 0)
5751return 0;
5752 ;
5753 return 0;
5754}
5755_ACEOF
5756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005757if { (ac_try="$ac_compile"
5758case "(($ac_try" in
5759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5760 *) ac_try_echo=$ac_try;;
5761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769 (exit $ac_status); } && {
5770 test -z "$ac_c_werror_flag" ||
5771 test ! -s conftest.err
5772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005780
5781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005782fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005783ac_res=`eval echo '${'$as_ac_Header'}'`
5784 { echo "$as_me:$LINENO: result: $ac_res" >&5
5785echo "${ECHO_T}$ac_res" >&6; }
5786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794done
5795# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5796if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5798echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005799if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801else
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005804/* confdefs.h. */
5805_ACEOF
5806cat confdefs.h >>conftest.$ac_ext
5807cat >>conftest.$ac_ext <<_ACEOF
5808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005810/* Override any GCC internal prototype to avoid an error.
5811 Use char because int might match the return type of a GCC
5812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005813#ifdef __cplusplus
5814extern "C"
5815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005816char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005820return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005821 ;
5822 return 0;
5823}
5824_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825for ac_lib in '' dir; do
5826 if test -z "$ac_lib"; then
5827 ac_res="none required"
5828 else
5829 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005831 fi
5832 rm -f conftest.$ac_objext conftest$ac_exeext
5833if { (ac_try="$ac_link"
5834case "(($ac_try" in
5835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836 *) ac_try_echo=$ac_try;;
5837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005840 ac_status=$?
5841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005845 (exit $ac_status); } && {
5846 test -z "$ac_c_werror_flag" ||
5847 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005848 } && test -s conftest$ac_exeext &&
5849 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005852 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855
Thomas Wouters477c8d52006-05-27 19:21:47 +00005856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857
5858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5859 conftest$ac_exeext
5860 if test "${ac_cv_search_opendir+set}" = set; then
5861 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863done
5864if test "${ac_cv_search_opendir+set}" = set; then
5865 :
5866else
5867 ac_cv_search_opendir=no
5868fi
5869rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005870LIBS=$ac_func_search_save_LIBS
5871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005872{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5873echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874ac_res=$ac_cv_search_opendir
5875if test "$ac_res" != no; then
5876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Michael W. Hudson54241132001-12-07 15:38:26 +00005880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005881 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5882echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005883if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005884 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005885else
5886 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005894/* Override any GCC internal prototype to avoid an error.
5895 Use char because int might match the return type of a GCC
5896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005897#ifdef __cplusplus
5898extern "C"
5899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005900char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005901int
5902main ()
5903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ;
5906 return 0;
5907}
5908_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909for ac_lib in '' x; do
5910 if test -z "$ac_lib"; then
5911 ac_res="none required"
5912 else
5913 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005915 fi
5916 rm -f conftest.$ac_objext conftest$ac_exeext
5917if { (ac_try="$ac_link"
5918case "(($ac_try" in
5919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5920 *) ac_try_echo=$ac_try;;
5921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005924 ac_status=$?
5925 grep -v '^ *+' conftest.er1 >conftest.err
5926 rm -f conftest.er1
5927 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929 (exit $ac_status); } && {
5930 test -z "$ac_c_werror_flag" ||
5931 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005932 } && test -s conftest$ac_exeext &&
5933 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005936 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005937sed 's/^/| /' conftest.$ac_ext >&5
5938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939
Thomas Wouters477c8d52006-05-27 19:21:47 +00005940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941
5942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5943 conftest$ac_exeext
5944 if test "${ac_cv_search_opendir+set}" = set; then
5945 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947done
5948if test "${ac_cv_search_opendir+set}" = set; then
5949 :
5950else
5951 ac_cv_search_opendir=no
5952fi
5953rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005954LIBS=$ac_func_search_save_LIBS
5955fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005956{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5957echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958ac_res=$ac_cv_search_opendir
5959if test "$ac_res" != no; then
5960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962fi
5963
5964fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005965
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5967echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005970else
5971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978int
5979main ()
5980{
5981return makedev(0, 0);
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006004 ac_cv_header_sys_types_h_makedev=yes
6005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014
6015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006016{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6017echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018
6019if test $ac_cv_header_sys_types_h_makedev = no; then
6020if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006021 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6022echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6027echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028else
6029 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006030{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6031echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038$ac_includes_default
6039#include <sys/mkdev.h>
6040_ACEOF
6041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042if { (ac_try="$ac_compile"
6043case "(($ac_try" in
6044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6045 *) ac_try_echo=$ac_try;;
6046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050 grep -v '^ *+' conftest.er1 >conftest.err
6051 rm -f conftest.er1
6052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054 (exit $ac_status); } && {
6055 test -z "$ac_c_werror_flag" ||
6056 test ! -s conftest.err
6057 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058 ac_header_compiler=yes
6059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006061sed 's/^/| /' conftest.$ac_ext >&5
6062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006067{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6068echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069
6070# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006071{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6072echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079#include <sys/mkdev.h>
6080_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081if { (ac_try="$ac_cpp conftest.$ac_ext"
6082case "(($ac_try" in
6083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6084 *) ac_try_echo=$ac_try;;
6085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006089 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 rm -f conftest.er1
6091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 (exit $ac_status); } >/dev/null && {
6094 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6095 test ! -s conftest.err
6096 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_header_preproc=yes
6098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006100sed 's/^/| /' conftest.$ac_ext >&5
6101
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 ac_header_preproc=no
6103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006106{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6107echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108
6109# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6111 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006112 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6113echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6114 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6115echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006117 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6120echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6125 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6126echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006132## -------------------------------------- ##
6133## Report this to http://bugs.python.org/ ##
6134## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006135_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006137 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6140echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006142 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
6144 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006146{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6147echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148
6149fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006150if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152cat >>confdefs.h <<\_ACEOF
6153#define MAJOR_IN_MKDEV 1
6154_ACEOF
6155
6156fi
6157
6158
6159
6160 if test $ac_cv_header_sys_mkdev_h = no; then
6161 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6163echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006165 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006167{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6168echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169else
6170 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6172echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* confdefs.h. */
6175_ACEOF
6176cat confdefs.h >>conftest.$ac_ext
6177cat >>conftest.$ac_ext <<_ACEOF
6178/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179$ac_includes_default
6180#include <sys/sysmacros.h>
6181_ACEOF
6182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183if { (ac_try="$ac_compile"
6184case "(($ac_try" in
6185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6186 *) ac_try_echo=$ac_try;;
6187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_header_compiler=yes
6200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006202sed 's/^/| /' conftest.$ac_ext >&5
6203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6209echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210
6211# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6213echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* confdefs.h. */
6216_ACEOF
6217cat confdefs.h >>conftest.$ac_ext
6218cat >>conftest.$ac_ext <<_ACEOF
6219/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220#include <sys/sysmacros.h>
6221_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222if { (ac_try="$ac_cpp conftest.$ac_ext"
6223case "(($ac_try" in
6224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6225 *) ac_try_echo=$ac_try;;
6226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006230 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231 rm -f conftest.er1
6232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 (exit $ac_status); } >/dev/null && {
6235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6236 test ! -s conftest.err
6237 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 ac_header_preproc=yes
6239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006241sed 's/^/| /' conftest.$ac_ext >&5
6242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 ac_header_preproc=no
6244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6248echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249
6250# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6252 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006253 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6254echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6256echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006258 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006260 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6261echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6265echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6266 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6267echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006273## -------------------------------------- ##
6274## Report this to http://bugs.python.org/ ##
6275## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006276_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006278 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6281echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284else
6285 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006287{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6288echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006291if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293cat >>confdefs.h <<\_ACEOF
6294#define MAJOR_IN_SYSMACROS 1
6295_ACEOF
6296
6297fi
6298
6299
6300 fi
6301fi
6302
Michael W. Hudson54241132001-12-07 15:38:26 +00006303
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305
6306for ac_header in term.h
6307do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6309{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6310echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006312 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313else
6314 cat >conftest.$ac_ext <<_ACEOF
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006320
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006321#ifdef HAVE_CURSES_H
6322#include <curses.h>
6323#endif
6324
6325
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006326#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327_ACEOF
6328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329if { (ac_try="$ac_compile"
6330case "(($ac_try" in
6331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332 *) ac_try_echo=$ac_try;;
6333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336 ac_status=$?
6337 grep -v '^ *+' conftest.er1 >conftest.err
6338 rm -f conftest.er1
6339 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341 (exit $ac_status); } && {
6342 test -z "$ac_c_werror_flag" ||
6343 test ! -s conftest.err
6344 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006345 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006347 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348sed 's/^/| /' conftest.$ac_ext >&5
6349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006350 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006352
6353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006355ac_res=`eval echo '${'$as_ac_Header'}'`
6356 { echo "$as_me:$LINENO: result: $ac_res" >&5
6357echo "${ECHO_T}$ac_res" >&6; }
6358if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006360#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363fi
6364
6365done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366
6367
Martin v. Löwis11017b12006-01-14 18:12:57 +00006368# On Linux, netlink.h requires asm/types.h
6369
6370for ac_header in linux/netlink.h
6371do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6373{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6374echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006375if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
6384
6385#ifdef HAVE_ASM_TYPES_H
6386#include <asm/types.h>
6387#endif
6388#ifdef HAVE_SYS_SOCKET_H
6389#include <sys/socket.h>
6390#endif
6391
6392
6393#include <$ac_header>
6394_ACEOF
6395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396if { (ac_try="$ac_compile"
6397case "(($ac_try" in
6398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399 *) ac_try_echo=$ac_try;;
6400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403 ac_status=$?
6404 grep -v '^ *+' conftest.er1 >conftest.err
6405 rm -f conftest.er1
6406 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408 (exit $ac_status); } && {
6409 test -z "$ac_c_werror_flag" ||
6410 test ! -s conftest.err
6411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412 eval "$as_ac_Header=yes"
6413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006414 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415sed 's/^/| /' conftest.$ac_ext >&5
6416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419
6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006422ac_res=`eval echo '${'$as_ac_Header'}'`
6423 { echo "$as_me:$LINENO: result: $ac_res" >&5
6424echo "${ECHO_T}$ac_res" >&6; }
6425if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006426 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006427#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006428_ACEOF
6429
6430fi
6431
6432done
6433
6434
Guido van Rossum627b2d71993-12-24 10:39:16 +00006435# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006436was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006437{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6438echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006440/* confdefs.h. */
6441_ACEOF
6442cat confdefs.h >>conftest.$ac_ext
6443cat >>conftest.$ac_ext <<_ACEOF
6444/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006446
6447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006449 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006450 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006451else
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453
6454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006458
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006460rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006462{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6463echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006464
Neal Norwitz11690112002-07-30 01:08:28 +00006465# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006466{ echo "$as_me:$LINENO: checking for makedev" >&5
6467echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006469/* confdefs.h. */
6470_ACEOF
6471cat confdefs.h >>conftest.$ac_ext
6472cat >>conftest.$ac_ext <<_ACEOF
6473/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006474#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006475int
6476main ()
6477{
6478 makedev(0, 0)
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484if { (ac_try="$ac_link"
6485case "(($ac_try" in
6486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6487 *) ac_try_echo=$ac_try;;
6488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006490 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006492 grep -v '^ *+' conftest.er1 >conftest.err
6493 rm -f conftest.er1
6494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496 (exit $ac_status); } && {
6497 test -z "$ac_c_werror_flag" ||
6498 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499 } && test -s conftest$ac_exeext &&
6500 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006501 ac_cv_has_makedev=yes
6502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006504sed 's/^/| /' conftest.$ac_ext >&5
6505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006506 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508
6509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006511if test "$ac_cv_has_makedev" = "no"; then
6512 # we didn't link, try if _OSF_SOURCE will allow us to link
6513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006519
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006520#define _OSF_SOURCE 1
6521#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006522
Neal Norwitz11690112002-07-30 01:08:28 +00006523int
6524main ()
6525{
6526 makedev(0, 0)
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006532if { (ac_try="$ac_link"
6533case "(($ac_try" in
6534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6535 *) ac_try_echo=$ac_try;;
6536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006538 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006540 grep -v '^ *+' conftest.er1 >conftest.err
6541 rm -f conftest.er1
6542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544 (exit $ac_status); } && {
6545 test -z "$ac_c_werror_flag" ||
6546 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006547 } && test -s conftest$ac_exeext &&
6548 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ac_cv_has_makedev=yes
6550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006552sed 's/^/| /' conftest.$ac_ext >&5
6553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
6557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006558 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006559 if test "$ac_cv_has_makedev" = "yes"; then
6560
6561cat >>confdefs.h <<\_ACEOF
6562#define _OSF_SOURCE 1
6563_ACEOF
6564
6565 fi
6566fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006567{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6568echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006569if test "$ac_cv_has_makedev" = "yes"; then
6570
6571cat >>confdefs.h <<\_ACEOF
6572#define HAVE_MAKEDEV 1
6573_ACEOF
6574
6575fi
6576
Martin v. Löwis399a6892002-10-04 10:22:02 +00006577# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6578# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6579# defined, but the compiler does not support pragma redefine_extname,
6580# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6581# structures (such as rlimit64) without declaring them. As a
6582# work-around, disable LFS on such configurations
6583
6584use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006585{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6586echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006593
6594#define _LARGEFILE_SOURCE 1
6595#define _FILE_OFFSET_BITS 64
6596#include <sys/resource.h>
6597
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598int
6599main ()
6600{
6601struct rlimit foo;
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607if { (ac_try="$ac_compile"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
6622 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006623 sol_lfs_bug=no
6624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006632{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6633echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634if test "$sol_lfs_bug" = "yes"; then
6635 use_lfs=no
6636fi
6637
6638if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006639# Two defines needed to enable largefile support on various platforms
6640# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642cat >>confdefs.h <<\_ACEOF
6643#define _LARGEFILE_SOURCE 1
6644_ACEOF
6645
6646
6647cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006648#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006649_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006652
Guido van Rossum84e7b241996-08-19 21:59:00 +00006653# Add some code to confdefs.h so that the test for off_t works on SCO
6654cat >> confdefs.h <<\EOF
6655#if defined(SCO_DS)
6656#undef _OFF_T
6657#endif
6658EOF
6659
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006661{ echo "$as_me:$LINENO: checking for mode_t" >&5
6662echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006663if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006666 cat >conftest.$ac_ext <<_ACEOF
6667/* confdefs.h. */
6668_ACEOF
6669cat confdefs.h >>conftest.$ac_ext
6670cat >>conftest.$ac_ext <<_ACEOF
6671/* end confdefs.h. */
6672$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006673typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006674int
6675main ()
6676{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006677if ((ac__type_new_ *) 0)
6678 return 0;
6679if (sizeof (ac__type_new_))
6680 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006681 ;
6682 return 0;
6683}
6684_ACEOF
6685rm -f conftest.$ac_objext
6686if { (ac_try="$ac_compile"
6687case "(($ac_try" in
6688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6689 *) ac_try_echo=$ac_try;;
6690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006692 (eval "$ac_compile") 2>conftest.er1
6693 ac_status=$?
6694 grep -v '^ *+' conftest.er1 >conftest.err
6695 rm -f conftest.er1
6696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006698 (exit $ac_status); } && {
6699 test -z "$ac_c_werror_flag" ||
6700 test ! -s conftest.err
6701 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006705sed 's/^/| /' conftest.$ac_ext >&5
6706
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006707 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006712{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6713echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6714if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716else
Martin v. Löwis11437992002-04-12 09:54:03 +00006717
6718cat >>confdefs.h <<_ACEOF
6719#define mode_t int
6720_ACEOF
6721
6722fi
6723
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724{ echo "$as_me:$LINENO: checking for off_t" >&5
6725echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006726if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006729 cat >conftest.$ac_ext <<_ACEOF
6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
6735$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006736typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006737int
6738main ()
6739{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006740if ((ac__type_new_ *) 0)
6741 return 0;
6742if (sizeof (ac__type_new_))
6743 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006744 ;
6745 return 0;
6746}
6747_ACEOF
6748rm -f conftest.$ac_objext
6749if { (ac_try="$ac_compile"
6750case "(($ac_try" in
6751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752 *) ac_try_echo=$ac_try;;
6753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006755 (eval "$ac_compile") 2>conftest.er1
6756 ac_status=$?
6757 grep -v '^ *+' conftest.er1 >conftest.err
6758 rm -f conftest.er1
6759 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006761 (exit $ac_status); } && {
6762 test -z "$ac_c_werror_flag" ||
6763 test ! -s conftest.err
6764 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006765 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006768sed 's/^/| /' conftest.$ac_ext >&5
6769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006775{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6776echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6777if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006779else
Martin v. Löwis11437992002-04-12 09:54:03 +00006780
6781cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
6784
6785fi
6786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787{ echo "$as_me:$LINENO: checking for pid_t" >&5
6788echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006789if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006792 cat >conftest.$ac_ext <<_ACEOF
6793/* confdefs.h. */
6794_ACEOF
6795cat confdefs.h >>conftest.$ac_ext
6796cat >>conftest.$ac_ext <<_ACEOF
6797/* end confdefs.h. */
6798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006799typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006800int
6801main ()
6802{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006803if ((ac__type_new_ *) 0)
6804 return 0;
6805if (sizeof (ac__type_new_))
6806 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (ac_try="$ac_compile"
6813case "(($ac_try" in
6814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6815 *) ac_try_echo=$ac_try;;
6816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006818 (eval "$ac_compile") 2>conftest.er1
6819 ac_status=$?
6820 grep -v '^ *+' conftest.er1 >conftest.err
6821 rm -f conftest.er1
6822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006824 (exit $ac_status); } && {
6825 test -z "$ac_c_werror_flag" ||
6826 test ! -s conftest.err
6827 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006828 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006831sed 's/^/| /' conftest.$ac_ext >&5
6832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835
6836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006838{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6839echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6840if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842else
Martin v. Löwis11437992002-04-12 09:54:03 +00006843
6844cat >>confdefs.h <<_ACEOF
6845#define pid_t int
6846_ACEOF
6847
6848fi
6849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6851echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006852if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006854else
6855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006861#include <sys/types.h>
6862#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006863
Martin v. Löwis11437992002-04-12 09:54:03 +00006864int
6865main ()
6866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873if { (ac_try="$ac_compile"
6874case "(($ac_try" in
6875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6876 *) ac_try_echo=$ac_try;;
6877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885 (exit $ac_status); } && {
6886 test -z "$ac_c_werror_flag" ||
6887 test ! -s conftest.err
6888 } && test -s conftest.$ac_objext; then
6889 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006892sed 's/^/| /' conftest.$ac_ext >&5
6893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896
6897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006898fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006899{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6900echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905
Michael W. Hudson54241132001-12-07 15:38:26 +00006906
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006907{ echo "$as_me:$LINENO: checking for size_t" >&5
6908echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006909if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006912 cat >conftest.$ac_ext <<_ACEOF
6913/* confdefs.h. */
6914_ACEOF
6915cat confdefs.h >>conftest.$ac_ext
6916cat >>conftest.$ac_ext <<_ACEOF
6917/* end confdefs.h. */
6918$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006919typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006920int
6921main ()
6922{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923if ((ac__type_new_ *) 0)
6924 return 0;
6925if (sizeof (ac__type_new_))
6926 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006927 ;
6928 return 0;
6929}
6930_ACEOF
6931rm -f conftest.$ac_objext
6932if { (ac_try="$ac_compile"
6933case "(($ac_try" in
6934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6935 *) ac_try_echo=$ac_try;;
6936esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006938 (eval "$ac_compile") 2>conftest.er1
6939 ac_status=$?
6940 grep -v '^ *+' conftest.er1 >conftest.err
6941 rm -f conftest.er1
6942 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006944 (exit $ac_status); } && {
6945 test -z "$ac_c_werror_flag" ||
6946 test ! -s conftest.err
6947 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006948 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006953 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006958{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6959echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6960if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962else
Martin v. Löwis11437992002-04-12 09:54:03 +00006963
6964cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
6967
6968fi
6969
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6971echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006972if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006974else
6975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006976/* confdefs.h. */
6977_ACEOF
6978cat confdefs.h >>conftest.$ac_ext
6979cat >>conftest.$ac_ext <<_ACEOF
6980/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006982
6983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006985 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986 ac_cv_type_uid_t=yes
6987else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988 ac_cv_type_uid_t=no
6989fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006990rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6994echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006995if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997cat >>confdefs.h <<\_ACEOF
6998#define uid_t int
6999_ACEOF
7000
7001
7002cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005
7006fi
7007
Mark Dickinsonbd792642009-03-18 20:06:12 +00007008
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7010echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007011if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007012 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007013else
7014 ac_cv_c_uint32_t=no
7015 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7016 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7017 cat >conftest.$ac_ext <<_ACEOF
7018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
7023$ac_includes_default
7024int
7025main ()
7026{
7027static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7028test_array [0] = 0
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007041 (eval "$ac_compile") 2>conftest.er1
7042 ac_status=$?
7043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
7051 case $ac_type in
7052 uint32_t) ac_cv_c_uint32_t=yes ;;
7053 *) ac_cv_c_uint32_t=$ac_type ;;
7054esac
7055
7056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007057 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058sed 's/^/| /' conftest.$ac_ext >&5
7059
7060
7061fi
7062
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064 test "$ac_cv_c_uint32_t" != no && break
7065 done
7066fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007067{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7068echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007069 case $ac_cv_c_uint32_t in #(
7070 no|yes) ;; #(
7071 *)
7072
7073cat >>confdefs.h <<\_ACEOF
7074#define _UINT32_T 1
7075_ACEOF
7076
7077
7078cat >>confdefs.h <<_ACEOF
7079#define uint32_t $ac_cv_c_uint32_t
7080_ACEOF
7081;;
7082 esac
7083
7084
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007085 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7086echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007087if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007088 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007089else
7090 ac_cv_c_uint64_t=no
7091 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7092 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
7100int
7101main ()
7102{
7103static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7104test_array [0] = 0
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
7110rm -f conftest.$ac_objext
7111if { (ac_try="$ac_compile"
7112case "(($ac_try" in
7113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7114 *) ac_try_echo=$ac_try;;
7115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117 (eval "$ac_compile") 2>conftest.er1
7118 ac_status=$?
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007123 (exit $ac_status); } && {
7124 test -z "$ac_c_werror_flag" ||
7125 test ! -s conftest.err
7126 } && test -s conftest.$ac_objext; then
7127 case $ac_type in
7128 uint64_t) ac_cv_c_uint64_t=yes ;;
7129 *) ac_cv_c_uint64_t=$ac_type ;;
7130esac
7131
7132else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007133 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
7136
7137fi
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140 test "$ac_cv_c_uint64_t" != no && break
7141 done
7142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007143{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7144echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007145 case $ac_cv_c_uint64_t in #(
7146 no|yes) ;; #(
7147 *)
7148
7149cat >>confdefs.h <<\_ACEOF
7150#define _UINT64_T 1
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define uint64_t $ac_cv_c_uint64_t
7156_ACEOF
7157;;
7158 esac
7159
7160
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007161 { echo "$as_me:$LINENO: checking for int32_t" >&5
7162echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007163if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007165else
7166 ac_cv_c_int32_t=no
7167 for ac_type in 'int32_t' 'int' 'long int' \
7168 'long long int' 'short int' 'signed char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 cat >conftest.$ac_ext <<_ACEOF
7204/* confdefs.h. */
7205_ACEOF
7206cat confdefs.h >>conftest.$ac_ext
7207cat >>conftest.$ac_ext <<_ACEOF
7208/* end confdefs.h. */
7209$ac_includes_default
7210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007214 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215test_array [0] = 0
7216
7217 ;
7218 return 0;
7219}
7220_ACEOF
7221rm -f conftest.$ac_objext
7222if { (ac_try="$ac_compile"
7223case "(($ac_try" in
7224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7225 *) ac_try_echo=$ac_try;;
7226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007228 (eval "$ac_compile") 2>conftest.er1
7229 ac_status=$?
7230 grep -v '^ *+' conftest.er1 >conftest.err
7231 rm -f conftest.er1
7232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007234 (exit $ac_status); } && {
7235 test -z "$ac_c_werror_flag" ||
7236 test ! -s conftest.err
7237 } && test -s conftest.$ac_objext; then
7238 :
7239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007240 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007241sed 's/^/| /' conftest.$ac_ext >&5
7242
7243 case $ac_type in
7244 int32_t) ac_cv_c_int32_t=yes ;;
7245 *) ac_cv_c_int32_t=$ac_type ;;
7246esac
7247
7248fi
7249
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255
7256fi
7257
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259 test "$ac_cv_c_int32_t" != no && break
7260 done
7261fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7263echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007264 case $ac_cv_c_int32_t in #(
7265 no|yes) ;; #(
7266 *)
7267
7268cat >>confdefs.h <<_ACEOF
7269#define int32_t $ac_cv_c_int32_t
7270_ACEOF
7271;;
7272 esac
7273
7274
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007275 { echo "$as_me:$LINENO: checking for int64_t" >&5
7276echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007277if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007278 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007279else
7280 ac_cv_c_int64_t=no
7281 for ac_type in 'int64_t' 'int' 'long int' \
7282 'long long int' 'short int' 'signed char'; do
7283 cat >conftest.$ac_ext <<_ACEOF
7284/* confdefs.h. */
7285_ACEOF
7286cat confdefs.h >>conftest.$ac_ext
7287cat >>conftest.$ac_ext <<_ACEOF
7288/* end confdefs.h. */
7289$ac_includes_default
7290int
7291main ()
7292{
7293static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7294test_array [0] = 0
7295
7296 ;
7297 return 0;
7298}
7299_ACEOF
7300rm -f conftest.$ac_objext
7301if { (ac_try="$ac_compile"
7302case "(($ac_try" in
7303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7304 *) ac_try_echo=$ac_try;;
7305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007307 (eval "$ac_compile") 2>conftest.er1
7308 ac_status=$?
7309 grep -v '^ *+' conftest.er1 >conftest.err
7310 rm -f conftest.er1
7311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007313 (exit $ac_status); } && {
7314 test -z "$ac_c_werror_flag" ||
7315 test ! -s conftest.err
7316 } && test -s conftest.$ac_objext; then
7317 cat >conftest.$ac_ext <<_ACEOF
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
7323$ac_includes_default
7324int
7325main ()
7326{
7327static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007328 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007329test_array [0] = 0
7330
7331 ;
7332 return 0;
7333}
7334_ACEOF
7335rm -f conftest.$ac_objext
7336if { (ac_try="$ac_compile"
7337case "(($ac_try" in
7338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7339 *) ac_try_echo=$ac_try;;
7340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007342 (eval "$ac_compile") 2>conftest.er1
7343 ac_status=$?
7344 grep -v '^ *+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007348 (exit $ac_status); } && {
7349 test -z "$ac_c_werror_flag" ||
7350 test ! -s conftest.err
7351 } && test -s conftest.$ac_objext; then
7352 :
7353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007354 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
7357 case $ac_type in
7358 int64_t) ac_cv_c_int64_t=yes ;;
7359 *) ac_cv_c_int64_t=$ac_type ;;
7360esac
7361
7362fi
7363
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369
7370fi
7371
7372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373 test "$ac_cv_c_int64_t" != no && break
7374 done
7375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7377echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007378 case $ac_cv_c_int64_t in #(
7379 no|yes) ;; #(
7380 *)
7381
7382cat >>confdefs.h <<_ACEOF
7383#define int64_t $ac_cv_c_int64_t
7384_ACEOF
7385;;
7386 esac
7387
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007388{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7389echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007390if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007392else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007393 cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
7399$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007400typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007401int
7402main ()
7403{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007404if ((ac__type_new_ *) 0)
7405 return 0;
7406if (sizeof (ac__type_new_))
7407 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
7413if { (ac_try="$ac_compile"
7414case "(($ac_try" in
7415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416 *) ac_try_echo=$ac_try;;
7417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007419 (eval "$ac_compile") 2>conftest.er1
7420 ac_status=$?
7421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007429 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007431 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007434 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007436
7437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007439{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7440echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7441if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442
7443cat >>confdefs.h <<\_ACEOF
7444#define HAVE_SSIZE_T 1
7445_ACEOF
7446
7447fi
7448
Jack Jansendd19cf82001-12-06 22:36:17 +00007449
Michael W. Hudson54241132001-12-07 15:38:26 +00007450# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007451# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007452{ echo "$as_me:$LINENO: checking for int" >&5
7453echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7454if test "${ac_cv_type_int+set}" = set; then
7455 echo $ECHO_N "(cached) $ECHO_C" >&6
7456else
7457 cat >conftest.$ac_ext <<_ACEOF
7458/* confdefs.h. */
7459_ACEOF
7460cat confdefs.h >>conftest.$ac_ext
7461cat >>conftest.$ac_ext <<_ACEOF
7462/* end confdefs.h. */
7463$ac_includes_default
7464typedef int ac__type_new_;
7465int
7466main ()
7467{
7468if ((ac__type_new_ *) 0)
7469 return 0;
7470if (sizeof (ac__type_new_))
7471 return 0;
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (ac_try="$ac_compile"
7478case "(($ac_try" in
7479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7480 *) ac_try_echo=$ac_try;;
7481esac
7482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7483 (eval "$ac_compile") 2>conftest.er1
7484 ac_status=$?
7485 grep -v '^ *+' conftest.er1 >conftest.err
7486 rm -f conftest.er1
7487 cat conftest.err >&5
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); } && {
7490 test -z "$ac_c_werror_flag" ||
7491 test ! -s conftest.err
7492 } && test -s conftest.$ac_objext; then
7493 ac_cv_type_int=yes
7494else
7495 echo "$as_me: failed program was:" >&5
7496sed 's/^/| /' conftest.$ac_ext >&5
7497
7498 ac_cv_type_int=no
7499fi
7500
7501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7502fi
7503{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7504echo "${ECHO_T}$ac_cv_type_int" >&6; }
7505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007506# The cast to long int works around a bug in the HP C Compiler
7507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7509# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007510{ echo "$as_me:$LINENO: checking size of int" >&5
7511echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007512if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007513 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007514else
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 if test "$cross_compiling" = yes; then
7516 # Depending upon the size, compute the lo and hi bounds.
7517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007524 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007525int
7526main ()
7527{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007529test_array [0] = 0
7530
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536if { (ac_try="$ac_compile"
7537case "(($ac_try" in
7538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539 *) ac_try_echo=$ac_try;;
7540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548 (exit $ac_status); } && {
7549 test -z "$ac_c_werror_flag" ||
7550 test ! -s conftest.err
7551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 ac_lo=0 ac_mid=0
7553 while :; do
7554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007555/* confdefs.h. */
7556_ACEOF
7557cat confdefs.h >>conftest.$ac_ext
7558cat >>conftest.$ac_ext <<_ACEOF
7559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007560$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007561 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007562int
7563main ()
7564{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007566test_array [0] = 0
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
7572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573if { (ac_try="$ac_compile"
7574case "(($ac_try" in
7575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7576 *) ac_try_echo=$ac_try;;
7577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007581 grep -v '^ *+' conftest.er1 >conftest.err
7582 rm -f conftest.er1
7583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585 (exit $ac_status); } && {
7586 test -z "$ac_c_werror_flag" ||
7587 test ! -s conftest.err
7588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ac_hi=$ac_mid; break
7590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594 ac_lo=`expr $ac_mid + 1`
7595 if test $ac_lo -le $ac_mid; then
7596 ac_lo= ac_hi=
7597 break
7598 fi
7599 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601
7602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 done
7604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007606sed 's/^/| /' conftest.$ac_ext >&5
7607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007609/* confdefs.h. */
7610_ACEOF
7611cat confdefs.h >>conftest.$ac_ext
7612cat >>conftest.$ac_ext <<_ACEOF
7613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007615 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007616int
7617main ()
7618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007620test_array [0] = 0
7621
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627if { (ac_try="$ac_compile"
7628case "(($ac_try" in
7629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7630 *) ac_try_echo=$ac_try;;
7631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007635 grep -v '^ *+' conftest.er1 >conftest.err
7636 rm -f conftest.er1
7637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639 (exit $ac_status); } && {
7640 test -z "$ac_c_werror_flag" ||
7641 test ! -s conftest.err
7642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 ac_hi=-1 ac_mid=-1
7644 while :; do
7645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* confdefs.h. */
7647_ACEOF
7648cat confdefs.h >>conftest.$ac_ext
7649cat >>conftest.$ac_ext <<_ACEOF
7650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007652 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007657test_array [0] = 0
7658
7659 ;
7660 return 0;
7661}
7662_ACEOF
7663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664if { (ac_try="$ac_compile"
7665case "(($ac_try" in
7666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7667 *) ac_try_echo=$ac_try;;
7668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007672 grep -v '^ *+' conftest.er1 >conftest.err
7673 rm -f conftest.er1
7674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 (exit $ac_status); } && {
7677 test -z "$ac_c_werror_flag" ||
7678 test ! -s conftest.err
7679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 ac_lo=$ac_mid; break
7681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 ac_hi=`expr '(' $ac_mid ')' - 1`
7686 if test $ac_mid -le $ac_hi; then
7687 ac_lo= ac_hi=
7688 break
7689 fi
7690 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692
7693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 done
7695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007697sed 's/^/| /' conftest.$ac_ext >&5
7698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706# Binary search between lo and hi bounds.
7707while test "x$ac_lo" != "x$ac_hi"; do
7708 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007710/* confdefs.h. */
7711_ACEOF
7712cat confdefs.h >>conftest.$ac_ext
7713cat >>conftest.$ac_ext <<_ACEOF
7714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007716 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007717int
7718main ()
7719{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007721test_array [0] = 0
7722
7723 ;
7724 return 0;
7725}
7726_ACEOF
7727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728if { (ac_try="$ac_compile"
7729case "(($ac_try" in
7730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7731 *) ac_try_echo=$ac_try;;
7732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007736 grep -v '^ *+' conftest.er1 >conftest.err
7737 rm -f conftest.er1
7738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 (exit $ac_status); } && {
7741 test -z "$ac_c_werror_flag" ||
7742 test ! -s conftest.err
7743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_hi=$ac_mid
7745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007747sed 's/^/| /' conftest.$ac_ext >&5
7748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753done
7754case $ac_lo in
7755?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007757 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007758See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007759echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007760See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007761 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 else
7763 ac_cv_sizeof_int=0
7764 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007765esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007766else
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007768/* confdefs.h. */
7769_ACEOF
7770cat confdefs.h >>conftest.$ac_ext
7771cat >>conftest.$ac_ext <<_ACEOF
7772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007774 typedef int ac__type_sizeof_;
7775static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7776static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007777#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007781{
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
7783 FILE *f = fopen ("conftest.val", "w");
7784 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007789 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007791 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 }
7793 else
7794 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007796 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007798 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
7802 ;
7803 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007804}
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
7806rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807if { (ac_try="$ac_link"
7808case "(($ac_try" in
7809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7810 *) ac_try_echo=$ac_try;;
7811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 { (case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 (exit $ac_status); }; }; then
7826 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007828 echo "$as_me: program exited with status $ac_status" >&5
7829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007830sed 's/^/| /' conftest.$ac_ext >&5
7831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007836echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007837See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007838 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 else
7840 ac_cv_sizeof_int=0
7841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843rm -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 +00007844fi
7845rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007847{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7848echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849
7850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855
7856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857{ echo "$as_me:$LINENO: checking for long" >&5
7858echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7859if test "${ac_cv_type_long+set}" = set; then
7860 echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862 cat >conftest.$ac_ext <<_ACEOF
7863/* confdefs.h. */
7864_ACEOF
7865cat confdefs.h >>conftest.$ac_ext
7866cat >>conftest.$ac_ext <<_ACEOF
7867/* end confdefs.h. */
7868$ac_includes_default
7869typedef long ac__type_new_;
7870int
7871main ()
7872{
7873if ((ac__type_new_ *) 0)
7874 return 0;
7875if (sizeof (ac__type_new_))
7876 return 0;
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext
7882if { (ac_try="$ac_compile"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
7887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7888 (eval "$ac_compile") 2>conftest.er1
7889 ac_status=$?
7890 grep -v '^ *+' conftest.er1 >conftest.err
7891 rm -f conftest.er1
7892 cat conftest.err >&5
7893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894 (exit $ac_status); } && {
7895 test -z "$ac_c_werror_flag" ||
7896 test ! -s conftest.err
7897 } && test -s conftest.$ac_objext; then
7898 ac_cv_type_long=yes
7899else
7900 echo "$as_me: failed program was:" >&5
7901sed 's/^/| /' conftest.$ac_ext >&5
7902
7903 ac_cv_type_long=no
7904fi
7905
7906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7907fi
7908{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7909echo "${ECHO_T}$ac_cv_type_long" >&6; }
7910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911# The cast to long int works around a bug in the HP C Compiler
7912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7914# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915{ echo "$as_me:$LINENO: checking size of long" >&5
7916echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007917if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007919else
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 if test "$cross_compiling" = yes; then
7921 # Depending upon the size, compute the lo and hi bounds.
7922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007923/* confdefs.h. */
7924_ACEOF
7925cat confdefs.h >>conftest.$ac_ext
7926cat >>conftest.$ac_ext <<_ACEOF
7927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007928$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007929 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007934test_array [0] = 0
7935
7936 ;
7937 return 0;
7938}
7939_ACEOF
7940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941if { (ac_try="$ac_compile"
7942case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 (exit $ac_status); } && {
7954 test -z "$ac_c_werror_flag" ||
7955 test ! -s conftest.err
7956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_lo=0 ac_mid=0
7958 while :; do
7959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007960/* confdefs.h. */
7961_ACEOF
7962cat confdefs.h >>conftest.$ac_ext
7963cat >>conftest.$ac_ext <<_ACEOF
7964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007966 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007971test_array [0] = 0
7972
7973 ;
7974 return 0;
7975}
7976_ACEOF
7977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978if { (ac_try="$ac_compile"
7979case "(($ac_try" in
7980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7981 *) ac_try_echo=$ac_try;;
7982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007986 grep -v '^ *+' conftest.er1 >conftest.err
7987 rm -f conftest.er1
7988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 (exit $ac_status); } && {
7991 test -z "$ac_c_werror_flag" ||
7992 test ! -s conftest.err
7993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_hi=$ac_mid; break
7995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007997sed 's/^/| /' conftest.$ac_ext >&5
7998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 ac_lo=`expr $ac_mid + 1`
8000 if test $ac_lo -le $ac_mid; then
8001 ac_lo= ac_hi=
8002 break
8003 fi
8004 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006
8007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 done
8009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008011sed 's/^/| /' conftest.$ac_ext >&5
8012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008014/* confdefs.h. */
8015_ACEOF
8016cat confdefs.h >>conftest.$ac_ext
8017cat >>conftest.$ac_ext <<_ACEOF
8018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008019$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008020 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008021int
8022main ()
8023{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008025test_array [0] = 0
8026
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032if { (ac_try="$ac_compile"
8033case "(($ac_try" in
8034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8035 *) ac_try_echo=$ac_try;;
8036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008040 grep -v '^ *+' conftest.er1 >conftest.err
8041 rm -f conftest.er1
8042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 (exit $ac_status); } && {
8045 test -z "$ac_c_werror_flag" ||
8046 test ! -s conftest.err
8047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 ac_hi=-1 ac_mid=-1
8049 while :; do
8050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008051/* confdefs.h. */
8052_ACEOF
8053cat confdefs.h >>conftest.$ac_ext
8054cat >>conftest.$ac_ext <<_ACEOF
8055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008057 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069if { (ac_try="$ac_compile"
8070case "(($ac_try" in
8071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8072 *) ac_try_echo=$ac_try;;
8073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008077 grep -v '^ *+' conftest.er1 >conftest.err
8078 rm -f conftest.er1
8079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 (exit $ac_status); } && {
8082 test -z "$ac_c_werror_flag" ||
8083 test ! -s conftest.err
8084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 ac_lo=$ac_mid; break
8086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 ac_hi=`expr '(' $ac_mid ')' - 1`
8091 if test $ac_mid -le $ac_hi; then
8092 ac_lo= ac_hi=
8093 break
8094 fi
8095 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097
8098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 done
8100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008102sed 's/^/| /' conftest.$ac_ext >&5
8103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106
8107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111# Binary search between lo and hi bounds.
8112while test "x$ac_lo" != "x$ac_hi"; do
8113 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* confdefs.h. */
8116_ACEOF
8117cat confdefs.h >>conftest.$ac_ext
8118cat >>conftest.$ac_ext <<_ACEOF
8119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008121 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008122int
8123main ()
8124{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008126test_array [0] = 0
8127
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133if { (ac_try="$ac_compile"
8134case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 (exit $ac_status); } && {
8146 test -z "$ac_c_werror_flag" ||
8147 test ! -s conftest.err
8148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_hi=$ac_mid
8150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008152sed 's/^/| /' conftest.$ac_ext >&5
8153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158done
8159case $ac_lo in
8160?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008162 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008163See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008164echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008165See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008166 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 else
8168 ac_cv_sizeof_long=0
8169 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008170esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008171else
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008173/* confdefs.h. */
8174_ACEOF
8175cat confdefs.h >>conftest.$ac_ext
8176cat >>conftest.$ac_ext <<_ACEOF
8177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008178$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008179 typedef long ac__type_sizeof_;
8180static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8181static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008182#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184int
8185main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008186{
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
8188 FILE *f = fopen ("conftest.val", "w");
8189 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008194 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008196 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008197 }
8198 else
8199 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008201 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008203 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
8207 ;
8208 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008209}
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
8211rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212if { (ac_try="$ac_link"
8213case "(($ac_try" in
8214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8215 *) ac_try_echo=$ac_try;;
8216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 { (case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 (exit $ac_status); }; }; then
8231 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008233 echo "$as_me: program exited with status $ac_status" >&5
8234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008235sed 's/^/| /' conftest.$ac_ext >&5
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008239 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008241echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008242See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008243 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_long=0
8246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248rm -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 +00008249fi
8250rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008251fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008252{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8253echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254
8255
8256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008259_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260
8261
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262{ echo "$as_me:$LINENO: checking for void *" >&5
8263echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8264if test "${ac_cv_type_void_p+set}" = set; then
8265 echo $ECHO_N "(cached) $ECHO_C" >&6
8266else
8267 cat >conftest.$ac_ext <<_ACEOF
8268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
8273$ac_includes_default
8274typedef void * ac__type_new_;
8275int
8276main ()
8277{
8278if ((ac__type_new_ *) 0)
8279 return 0;
8280if (sizeof (ac__type_new_))
8281 return 0;
8282 ;
8283 return 0;
8284}
8285_ACEOF
8286rm -f conftest.$ac_objext
8287if { (ac_try="$ac_compile"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
8292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8293 (eval "$ac_compile") 2>conftest.er1
8294 ac_status=$?
8295 grep -v '^ *+' conftest.er1 >conftest.err
8296 rm -f conftest.er1
8297 cat conftest.err >&5
8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299 (exit $ac_status); } && {
8300 test -z "$ac_c_werror_flag" ||
8301 test ! -s conftest.err
8302 } && test -s conftest.$ac_objext; then
8303 ac_cv_type_void_p=yes
8304else
8305 echo "$as_me: failed program was:" >&5
8306sed 's/^/| /' conftest.$ac_ext >&5
8307
8308 ac_cv_type_void_p=no
8309fi
8310
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312fi
8313{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8314echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316# The cast to long int works around a bug in the HP C Compiler
8317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8319# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320{ echo "$as_me:$LINENO: checking size of void *" >&5
8321echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008322if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008323 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008324else
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 if test "$cross_compiling" = yes; then
8326 # Depending upon the size, compute the lo and hi bounds.
8327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* confdefs.h. */
8329_ACEOF
8330cat confdefs.h >>conftest.$ac_ext
8331cat >>conftest.$ac_ext <<_ACEOF
8332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008333$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008334 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008335int
8336main ()
8337{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008339test_array [0] = 0
8340
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346if { (ac_try="$ac_compile"
8347case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008354 grep -v '^ *+' conftest.er1 >conftest.err
8355 rm -f conftest.er1
8356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 (exit $ac_status); } && {
8359 test -z "$ac_c_werror_flag" ||
8360 test ! -s conftest.err
8361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_lo=0 ac_mid=0
8363 while :; do
8364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008365/* confdefs.h. */
8366_ACEOF
8367cat confdefs.h >>conftest.$ac_ext
8368cat >>conftest.$ac_ext <<_ACEOF
8369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008370$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008371 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008372int
8373main ()
8374{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383if { (ac_try="$ac_compile"
8384case "(($ac_try" in
8385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386 *) ac_try_echo=$ac_try;;
8387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008391 grep -v '^ *+' conftest.er1 >conftest.err
8392 rm -f conftest.er1
8393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 (exit $ac_status); } && {
8396 test -z "$ac_c_werror_flag" ||
8397 test ! -s conftest.err
8398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_hi=$ac_mid; break
8400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008402sed 's/^/| /' conftest.$ac_ext >&5
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404 ac_lo=`expr $ac_mid + 1`
8405 if test $ac_lo -le $ac_mid; then
8406 ac_lo= ac_hi=
8407 break
8408 fi
8409 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411
8412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 done
8414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008416sed 's/^/| /' conftest.$ac_ext >&5
8417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008419/* confdefs.h. */
8420_ACEOF
8421cat confdefs.h >>conftest.$ac_ext
8422cat >>conftest.$ac_ext <<_ACEOF
8423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008424$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008425 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008426int
8427main ()
8428{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008430test_array [0] = 0
8431
8432 ;
8433 return 0;
8434}
8435_ACEOF
8436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437if { (ac_try="$ac_compile"
8438case "(($ac_try" in
8439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8440 *) ac_try_echo=$ac_try;;
8441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008445 grep -v '^ *+' conftest.er1 >conftest.err
8446 rm -f conftest.er1
8447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449 (exit $ac_status); } && {
8450 test -z "$ac_c_werror_flag" ||
8451 test ! -s conftest.err
8452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_hi=-1 ac_mid=-1
8454 while :; do
8455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008462 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474if { (ac_try="$ac_compile"
8475case "(($ac_try" in
8476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477 *) ac_try_echo=$ac_try;;
8478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008482 grep -v '^ *+' conftest.er1 >conftest.err
8483 rm -f conftest.er1
8484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 (exit $ac_status); } && {
8487 test -z "$ac_c_werror_flag" ||
8488 test ! -s conftest.err
8489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_lo=$ac_mid; break
8491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008493sed 's/^/| /' conftest.$ac_ext >&5
8494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 ac_hi=`expr '(' $ac_mid ')' - 1`
8496 if test $ac_mid -le $ac_hi; then
8497 ac_lo= ac_hi=
8498 break
8499 fi
8500 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502
8503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 done
8505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008507sed 's/^/| /' conftest.$ac_ext >&5
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516# Binary search between lo and hi bounds.
8517while test "x$ac_lo" != "x$ac_hi"; do
8518 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008520/* confdefs.h. */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008525$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008526 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008527int
8528main ()
8529{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008531test_array [0] = 0
8532
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538if { (ac_try="$ac_compile"
8539case "(($ac_try" in
8540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8541 *) ac_try_echo=$ac_try;;
8542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008546 grep -v '^ *+' conftest.er1 >conftest.err
8547 rm -f conftest.er1
8548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 (exit $ac_status); } && {
8551 test -z "$ac_c_werror_flag" ||
8552 test ! -s conftest.err
8553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_hi=$ac_mid
8555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008557sed 's/^/| /' conftest.$ac_ext >&5
8558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563done
8564case $ac_lo in
8565?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008567 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008568See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008569echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008570See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008571 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 else
8573 ac_cv_sizeof_void_p=0
8574 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008575esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008578/* confdefs.h. */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008583$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008584 typedef void * ac__type_sizeof_;
8585static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8586static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008591{
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
8593 FILE *f = fopen ("conftest.val", "w");
8594 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008599 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008601 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 }
8603 else
8604 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008606 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008608 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
8612 ;
8613 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008614}
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
8616rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617if { (ac_try="$ac_link"
8618case "(($ac_try" in
8619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8620 *) ac_try_echo=$ac_try;;
8621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 { (case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 (exit $ac_status); }; }; then
8636 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008638 echo "$as_me: program exited with status $ac_status" >&5
8639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008640sed 's/^/| /' conftest.$ac_ext >&5
8641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008644 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008646echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008647See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008648 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653rm -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 +00008654fi
8655rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008656fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008657{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8658echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659
8660
8661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008663#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008664_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008665
8666
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667{ echo "$as_me:$LINENO: checking for short" >&5
8668echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8669if test "${ac_cv_type_short+set}" = set; then
8670 echo $ECHO_N "(cached) $ECHO_C" >&6
8671else
8672 cat >conftest.$ac_ext <<_ACEOF
8673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
8678$ac_includes_default
8679typedef short ac__type_new_;
8680int
8681main ()
8682{
8683if ((ac__type_new_ *) 0)
8684 return 0;
8685if (sizeof (ac__type_new_))
8686 return 0;
8687 ;
8688 return 0;
8689}
8690_ACEOF
8691rm -f conftest.$ac_objext
8692if { (ac_try="$ac_compile"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
8697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8698 (eval "$ac_compile") 2>conftest.er1
8699 ac_status=$?
8700 grep -v '^ *+' conftest.er1 >conftest.err
8701 rm -f conftest.er1
8702 cat conftest.err >&5
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } && {
8705 test -z "$ac_c_werror_flag" ||
8706 test ! -s conftest.err
8707 } && test -s conftest.$ac_objext; then
8708 ac_cv_type_short=yes
8709else
8710 echo "$as_me: failed program was:" >&5
8711sed 's/^/| /' conftest.$ac_ext >&5
8712
8713 ac_cv_type_short=no
8714fi
8715
8716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8717fi
8718{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8719echo "${ECHO_T}$ac_cv_type_short" >&6; }
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725{ echo "$as_me:$LINENO: checking size of short" >&5
8726echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008727if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 if test "$cross_compiling" = yes; then
8731 # Depending upon the size, compute the lo and hi bounds.
8732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* confdefs.h. */
8734_ACEOF
8735cat confdefs.h >>conftest.$ac_ext
8736cat >>conftest.$ac_ext <<_ACEOF
8737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008738$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008739 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008740int
8741main ()
8742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008744test_array [0] = 0
8745
8746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751if { (ac_try="$ac_compile"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008759 grep -v '^ *+' conftest.er1 >conftest.err
8760 rm -f conftest.er1
8761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763 (exit $ac_status); } && {
8764 test -z "$ac_c_werror_flag" ||
8765 test ! -s conftest.err
8766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_lo=0 ac_mid=0
8768 while :; do
8769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* confdefs.h. */
8771_ACEOF
8772cat confdefs.h >>conftest.$ac_ext
8773cat >>conftest.$ac_ext <<_ACEOF
8774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008776 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008781test_array [0] = 0
8782
8783 ;
8784 return 0;
8785}
8786_ACEOF
8787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788if { (ac_try="$ac_compile"
8789case "(($ac_try" in
8790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8791 *) ac_try_echo=$ac_try;;
8792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008796 grep -v '^ *+' conftest.er1 >conftest.err
8797 rm -f conftest.er1
8798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 (exit $ac_status); } && {
8801 test -z "$ac_c_werror_flag" ||
8802 test ! -s conftest.err
8803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_hi=$ac_mid; break
8805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008807sed 's/^/| /' conftest.$ac_ext >&5
8808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 ac_lo=`expr $ac_mid + 1`
8810 if test $ac_lo -le $ac_mid; then
8811 ac_lo= ac_hi=
8812 break
8813 fi
8814 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816
8817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 done
8819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008821sed 's/^/| /' conftest.$ac_ext >&5
8822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* confdefs.h. */
8825_ACEOF
8826cat confdefs.h >>conftest.$ac_ext
8827cat >>conftest.$ac_ext <<_ACEOF
8828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008830 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008835test_array [0] = 0
8836
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842if { (ac_try="$ac_compile"
8843case "(($ac_try" in
8844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8845 *) ac_try_echo=$ac_try;;
8846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008850 grep -v '^ *+' conftest.er1 >conftest.err
8851 rm -f conftest.er1
8852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854 (exit $ac_status); } && {
8855 test -z "$ac_c_werror_flag" ||
8856 test ! -s conftest.err
8857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_hi=-1 ac_mid=-1
8859 while :; do
8860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* confdefs.h. */
8862_ACEOF
8863cat confdefs.h >>conftest.$ac_ext
8864cat >>conftest.$ac_ext <<_ACEOF
8865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008867 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008872test_array [0] = 0
8873
8874 ;
8875 return 0;
8876}
8877_ACEOF
8878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879if { (ac_try="$ac_compile"
8880case "(($ac_try" in
8881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8882 *) ac_try_echo=$ac_try;;
8883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008887 grep -v '^ *+' conftest.er1 >conftest.err
8888 rm -f conftest.er1
8889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 (exit $ac_status); } && {
8892 test -z "$ac_c_werror_flag" ||
8893 test ! -s conftest.err
8894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_lo=$ac_mid; break
8896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 ac_hi=`expr '(' $ac_mid ')' - 1`
8901 if test $ac_mid -le $ac_hi; then
8902 ac_lo= ac_hi=
8903 break
8904 fi
8905 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 done
8910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008912sed 's/^/| /' conftest.$ac_ext >&5
8913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921# Binary search between lo and hi bounds.
8922while test "x$ac_lo" != "x$ac_hi"; do
8923 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* confdefs.h. */
8926_ACEOF
8927cat confdefs.h >>conftest.$ac_ext
8928cat >>conftest.$ac_ext <<_ACEOF
8929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008930$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008931 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008936test_array [0] = 0
8937
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943if { (ac_try="$ac_compile"
8944case "(($ac_try" in
8945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946 *) ac_try_echo=$ac_try;;
8947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008951 grep -v '^ *+' conftest.er1 >conftest.err
8952 rm -f conftest.er1
8953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 (exit $ac_status); } && {
8956 test -z "$ac_c_werror_flag" ||
8957 test ! -s conftest.err
8958 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_hi=$ac_mid
8960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008962sed 's/^/| /' conftest.$ac_ext >&5
8963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968done
8969case $ac_lo in
8970?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008972 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008973See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008974echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008975See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008976 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977 else
8978 ac_cv_sizeof_short=0
8979 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008980esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008981else
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* confdefs.h. */
8984_ACEOF
8985cat confdefs.h >>conftest.$ac_ext
8986cat >>conftest.$ac_ext <<_ACEOF
8987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008989 typedef short ac__type_sizeof_;
8990static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8991static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008992#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008996{
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998 FILE *f = fopen ("conftest.val", "w");
8999 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009004 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009006 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 }
9008 else
9009 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009013 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
9017 ;
9018 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009019}
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
9021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022if { (ac_try="$ac_link"
9023case "(($ac_try" in
9024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9025 *) ac_try_echo=$ac_try;;
9026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 { (case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 (exit $ac_status); }; }; then
9041 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009043 echo "$as_me: program exited with status $ac_status" >&5
9044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009045sed 's/^/| /' conftest.$ac_ext >&5
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009051echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009052See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009053 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 else
9055 ac_cv_sizeof_short=0
9056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058rm -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 +00009059fi
9060rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009061fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009062{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9063echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064
9065
9066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009069_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070
9071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072{ echo "$as_me:$LINENO: checking for float" >&5
9073echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9074if test "${ac_cv_type_float+set}" = set; then
9075 echo $ECHO_N "(cached) $ECHO_C" >&6
9076else
9077 cat >conftest.$ac_ext <<_ACEOF
9078/* confdefs.h. */
9079_ACEOF
9080cat confdefs.h >>conftest.$ac_ext
9081cat >>conftest.$ac_ext <<_ACEOF
9082/* end confdefs.h. */
9083$ac_includes_default
9084typedef float ac__type_new_;
9085int
9086main ()
9087{
9088if ((ac__type_new_ *) 0)
9089 return 0;
9090if (sizeof (ac__type_new_))
9091 return 0;
9092 ;
9093 return 0;
9094}
9095_ACEOF
9096rm -f conftest.$ac_objext
9097if { (ac_try="$ac_compile"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
9102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9103 (eval "$ac_compile") 2>conftest.er1
9104 ac_status=$?
9105 grep -v '^ *+' conftest.er1 >conftest.err
9106 rm -f conftest.er1
9107 cat conftest.err >&5
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } && {
9110 test -z "$ac_c_werror_flag" ||
9111 test ! -s conftest.err
9112 } && test -s conftest.$ac_objext; then
9113 ac_cv_type_float=yes
9114else
9115 echo "$as_me: failed program was:" >&5
9116sed 's/^/| /' conftest.$ac_ext >&5
9117
9118 ac_cv_type_float=no
9119fi
9120
9121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9122fi
9123{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9124echo "${ECHO_T}$ac_cv_type_float" >&6; }
9125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126# The cast to long int works around a bug in the HP C Compiler
9127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9129# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130{ echo "$as_me:$LINENO: checking size of float" >&5
9131echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009132if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009134else
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 if test "$cross_compiling" = yes; then
9136 # Depending upon the size, compute the lo and hi bounds.
9137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* confdefs.h. */
9139_ACEOF
9140cat confdefs.h >>conftest.$ac_ext
9141cat >>conftest.$ac_ext <<_ACEOF
9142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009143$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009144 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009149test_array [0] = 0
9150
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156if { (ac_try="$ac_compile"
9157case "(($ac_try" in
9158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159 *) ac_try_echo=$ac_try;;
9160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009164 grep -v '^ *+' conftest.er1 >conftest.err
9165 rm -f conftest.er1
9166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168 (exit $ac_status); } && {
9169 test -z "$ac_c_werror_flag" ||
9170 test ! -s conftest.err
9171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_lo=0 ac_mid=0
9173 while :; do
9174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009175/* confdefs.h. */
9176_ACEOF
9177cat confdefs.h >>conftest.$ac_ext
9178cat >>conftest.$ac_ext <<_ACEOF
9179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009180$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009181 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009182int
9183main ()
9184{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009186test_array [0] = 0
9187
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193if { (ac_try="$ac_compile"
9194case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009201 grep -v '^ *+' conftest.er1 >conftest.err
9202 rm -f conftest.er1
9203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 (exit $ac_status); } && {
9206 test -z "$ac_c_werror_flag" ||
9207 test ! -s conftest.err
9208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_hi=$ac_mid; break
9210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009212sed 's/^/| /' conftest.$ac_ext >&5
9213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 ac_lo=`expr $ac_mid + 1`
9215 if test $ac_lo -le $ac_mid; then
9216 ac_lo= ac_hi=
9217 break
9218 fi
9219 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221
9222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 done
9224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* confdefs.h. */
9230_ACEOF
9231cat confdefs.h >>conftest.$ac_ext
9232cat >>conftest.$ac_ext <<_ACEOF
9233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009235 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009236int
9237main ()
9238{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009240test_array [0] = 0
9241
9242 ;
9243 return 0;
9244}
9245_ACEOF
9246rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247if { (ac_try="$ac_compile"
9248case "(($ac_try" in
9249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9250 *) ac_try_echo=$ac_try;;
9251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009255 grep -v '^ *+' conftest.er1 >conftest.err
9256 rm -f conftest.er1
9257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 (exit $ac_status); } && {
9260 test -z "$ac_c_werror_flag" ||
9261 test ! -s conftest.err
9262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 ac_hi=-1 ac_mid=-1
9264 while :; do
9265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* confdefs.h. */
9267_ACEOF
9268cat confdefs.h >>conftest.$ac_ext
9269cat >>conftest.$ac_ext <<_ACEOF
9270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009271$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009272 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009273int
9274main ()
9275{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009276static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009277test_array [0] = 0
9278
9279 ;
9280 return 0;
9281}
9282_ACEOF
9283rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284if { (ac_try="$ac_compile"
9285case "(($ac_try" in
9286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9287 *) ac_try_echo=$ac_try;;
9288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009292 grep -v '^ *+' conftest.er1 >conftest.err
9293 rm -f conftest.er1
9294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 (exit $ac_status); } && {
9297 test -z "$ac_c_werror_flag" ||
9298 test ! -s conftest.err
9299 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ac_lo=$ac_mid; break
9301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009303sed 's/^/| /' conftest.$ac_ext >&5
9304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 ac_hi=`expr '(' $ac_mid ')' - 1`
9306 if test $ac_mid -le $ac_hi; then
9307 ac_lo= ac_hi=
9308 break
9309 fi
9310 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312
9313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 done
9315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009317sed 's/^/| /' conftest.$ac_ext >&5
9318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321
9322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326# Binary search between lo and hi bounds.
9327while test "x$ac_lo" != "x$ac_hi"; do
9328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009330/* confdefs.h. */
9331_ACEOF
9332cat confdefs.h >>conftest.$ac_ext
9333cat >>conftest.$ac_ext <<_ACEOF
9334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009335$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009336 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009337int
9338main ()
9339{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009341test_array [0] = 0
9342
9343 ;
9344 return 0;
9345}
9346_ACEOF
9347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348if { (ac_try="$ac_compile"
9349case "(($ac_try" in
9350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9351 *) ac_try_echo=$ac_try;;
9352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009356 grep -v '^ *+' conftest.er1 >conftest.err
9357 rm -f conftest.er1
9358 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 (exit $ac_status); } && {
9361 test -z "$ac_c_werror_flag" ||
9362 test ! -s conftest.err
9363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_hi=$ac_mid
9365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009367sed 's/^/| /' conftest.$ac_ext >&5
9368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371
9372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009373done
9374case $ac_lo in
9375?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009377 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009378See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009379echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009380See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009381 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 else
9383 ac_cv_sizeof_float=0
9384 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009386else
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* confdefs.h. */
9389_ACEOF
9390cat confdefs.h >>conftest.$ac_ext
9391cat >>conftest.$ac_ext <<_ACEOF
9392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009394 typedef float ac__type_sizeof_;
9395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009397#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399int
9400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009401{
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403 FILE *f = fopen ("conftest.val", "w");
9404 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009411 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 }
9413 else
9414 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009418 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
9422 ;
9423 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009424}
Martin v. Löwis11437992002-04-12 09:54:03 +00009425_ACEOF
9426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427if { (ac_try="$ac_link"
9428case "(($ac_try" in
9429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9430 *) ac_try_echo=$ac_try;;
9431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 { (case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 (exit $ac_status); }; }; then
9446 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009448 echo "$as_me: program exited with status $ac_status" >&5
9449echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009450sed 's/^/| /' conftest.$ac_ext >&5
9451
Martin v. Löwis11437992002-04-12 09:54:03 +00009452( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009456echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 else
9460 ac_cv_sizeof_float=0
9461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -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 +00009464fi
9465rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9468echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469
9470
9471
Martin v. Löwis11437992002-04-12 09:54:03 +00009472cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009474_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475
9476
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477{ echo "$as_me:$LINENO: checking for double" >&5
9478echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9479if test "${ac_cv_type_double+set}" = set; then
9480 echo $ECHO_N "(cached) $ECHO_C" >&6
9481else
9482 cat >conftest.$ac_ext <<_ACEOF
9483/* confdefs.h. */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h. */
9488$ac_includes_default
9489typedef double ac__type_new_;
9490int
9491main ()
9492{
9493if ((ac__type_new_ *) 0)
9494 return 0;
9495if (sizeof (ac__type_new_))
9496 return 0;
9497 ;
9498 return 0;
9499}
9500_ACEOF
9501rm -f conftest.$ac_objext
9502if { (ac_try="$ac_compile"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
9507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9508 (eval "$ac_compile") 2>conftest.er1
9509 ac_status=$?
9510 grep -v '^ *+' conftest.er1 >conftest.err
9511 rm -f conftest.er1
9512 cat conftest.err >&5
9513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514 (exit $ac_status); } && {
9515 test -z "$ac_c_werror_flag" ||
9516 test ! -s conftest.err
9517 } && test -s conftest.$ac_objext; then
9518 ac_cv_type_double=yes
9519else
9520 echo "$as_me: failed program was:" >&5
9521sed 's/^/| /' conftest.$ac_ext >&5
9522
9523 ac_cv_type_double=no
9524fi
9525
9526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527fi
9528{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9529echo "${ECHO_T}$ac_cv_type_double" >&6; }
9530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531# The cast to long int works around a bug in the HP C Compiler
9532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9534# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535{ echo "$as_me:$LINENO: checking size of double" >&5
9536echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009537if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 if test "$cross_compiling" = yes; then
9541 # Depending upon the size, compute the lo and hi bounds.
9542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* confdefs.h. */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009549 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009554test_array [0] = 0
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561if { (ac_try="$ac_compile"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009569 grep -v '^ *+' conftest.er1 >conftest.err
9570 rm -f conftest.er1
9571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 (exit $ac_status); } && {
9574 test -z "$ac_c_werror_flag" ||
9575 test ! -s conftest.err
9576 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ac_lo=0 ac_mid=0
9578 while :; do
9579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009585$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009586 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587int
9588main ()
9589{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009591test_array [0] = 0
9592
9593 ;
9594 return 0;
9595}
9596_ACEOF
9597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598if { (ac_try="$ac_compile"
9599case "(($ac_try" in
9600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9601 *) ac_try_echo=$ac_try;;
9602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009606 grep -v '^ *+' conftest.er1 >conftest.err
9607 rm -f conftest.er1
9608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 (exit $ac_status); } && {
9611 test -z "$ac_c_werror_flag" ||
9612 test ! -s conftest.err
9613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_hi=$ac_mid; break
9615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009617sed 's/^/| /' conftest.$ac_ext >&5
9618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619 ac_lo=`expr $ac_mid + 1`
9620 if test $ac_lo -le $ac_mid; then
9621 ac_lo= ac_hi=
9622 break
9623 fi
9624 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626
9627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 done
9629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009631sed 's/^/| /' conftest.$ac_ext >&5
9632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* confdefs.h. */
9635_ACEOF
9636cat confdefs.h >>conftest.$ac_ext
9637cat >>conftest.$ac_ext <<_ACEOF
9638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009640 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009645test_array [0] = 0
9646
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652if { (ac_try="$ac_compile"
9653case "(($ac_try" in
9654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9655 *) ac_try_echo=$ac_try;;
9656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009660 grep -v '^ *+' conftest.er1 >conftest.err
9661 rm -f conftest.er1
9662 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 (exit $ac_status); } && {
9665 test -z "$ac_c_werror_flag" ||
9666 test ! -s conftest.err
9667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_hi=-1 ac_mid=-1
9669 while :; do
9670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009677 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009681static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009682test_array [0] = 0
9683
9684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689if { (ac_try="$ac_compile"
9690case "(($ac_try" in
9691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9692 *) ac_try_echo=$ac_try;;
9693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009697 grep -v '^ *+' conftest.er1 >conftest.err
9698 rm -f conftest.er1
9699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 (exit $ac_status); } && {
9702 test -z "$ac_c_werror_flag" ||
9703 test ! -s conftest.err
9704 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_lo=$ac_mid; break
9706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009708sed 's/^/| /' conftest.$ac_ext >&5
9709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710 ac_hi=`expr '(' $ac_mid ')' - 1`
9711 if test $ac_mid -le $ac_hi; then
9712 ac_lo= ac_hi=
9713 break
9714 fi
9715 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717
9718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 done
9720else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009722sed 's/^/| /' conftest.$ac_ext >&5
9723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731# Binary search between lo and hi bounds.
9732while test "x$ac_lo" != "x$ac_hi"; do
9733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* confdefs.h. */
9736_ACEOF
9737cat confdefs.h >>conftest.$ac_ext
9738cat >>conftest.$ac_ext <<_ACEOF
9739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009741 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009742int
9743main ()
9744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009746test_array [0] = 0
9747
9748 ;
9749 return 0;
9750}
9751_ACEOF
9752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753if { (ac_try="$ac_compile"
9754case "(($ac_try" in
9755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756 *) ac_try_echo=$ac_try;;
9757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009761 grep -v '^ *+' conftest.er1 >conftest.err
9762 rm -f conftest.er1
9763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 (exit $ac_status); } && {
9766 test -z "$ac_c_werror_flag" ||
9767 test ! -s conftest.err
9768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_hi=$ac_mid
9770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009772sed 's/^/| /' conftest.$ac_ext >&5
9773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
9777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009778done
9779case $ac_lo in
9780?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009782 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009783See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009784echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009785See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009786 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 else
9788 ac_cv_sizeof_double=0
9789 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009790esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009791else
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* confdefs.h. */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009799 typedef double ac__type_sizeof_;
9800static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9801static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009802#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804int
9805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009806{
Martin v. Löwis11437992002-04-12 09:54:03 +00009807
9808 FILE *f = fopen ("conftest.val", "w");
9809 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009814 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009816 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 }
9818 else
9819 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009821 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009823 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
9827 ;
9828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009829}
Martin v. Löwis11437992002-04-12 09:54:03 +00009830_ACEOF
9831rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832if { (ac_try="$ac_link"
9833case "(($ac_try" in
9834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9835 *) ac_try_echo=$ac_try;;
9836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 { (case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 (exit $ac_status); }; }; then
9851 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009853 echo "$as_me: program exited with status $ac_status" >&5
9854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009855sed 's/^/| /' conftest.$ac_ext >&5
9856
Martin v. Löwis11437992002-04-12 09:54:03 +00009857( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009861echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009862See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009863 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 else
9865 ac_cv_sizeof_double=0
9866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868rm -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 +00009869fi
9870rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009872{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9873echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874
9875
9876
Martin v. Löwis11437992002-04-12 09:54:03 +00009877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880
9881
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9883echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9884if test "${ac_cv_type_fpos_t+set}" = set; then
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9886else
9887 cat >conftest.$ac_ext <<_ACEOF
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
9893$ac_includes_default
9894typedef fpos_t ac__type_new_;
9895int
9896main ()
9897{
9898if ((ac__type_new_ *) 0)
9899 return 0;
9900if (sizeof (ac__type_new_))
9901 return 0;
9902 ;
9903 return 0;
9904}
9905_ACEOF
9906rm -f conftest.$ac_objext
9907if { (ac_try="$ac_compile"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
9912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9913 (eval "$ac_compile") 2>conftest.er1
9914 ac_status=$?
9915 grep -v '^ *+' conftest.er1 >conftest.err
9916 rm -f conftest.er1
9917 cat conftest.err >&5
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } && {
9920 test -z "$ac_c_werror_flag" ||
9921 test ! -s conftest.err
9922 } && test -s conftest.$ac_objext; then
9923 ac_cv_type_fpos_t=yes
9924else
9925 echo "$as_me: failed program was:" >&5
9926sed 's/^/| /' conftest.$ac_ext >&5
9927
9928 ac_cv_type_fpos_t=no
9929fi
9930
9931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9932fi
9933{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9934echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936# The cast to long int works around a bug in the HP C Compiler
9937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9939# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9941echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009942if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 if test "$cross_compiling" = yes; then
9946 # Depending upon the size, compute the lo and hi bounds.
9947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* confdefs.h. */
9949_ACEOF
9950cat confdefs.h >>conftest.$ac_ext
9951cat >>conftest.$ac_ext <<_ACEOF
9952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009953$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009954 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009955int
9956main ()
9957{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009959test_array [0] = 0
9960
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966if { (ac_try="$ac_compile"
9967case "(($ac_try" in
9968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9969 *) ac_try_echo=$ac_try;;
9970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009974 grep -v '^ *+' conftest.er1 >conftest.err
9975 rm -f conftest.er1
9976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978 (exit $ac_status); } && {
9979 test -z "$ac_c_werror_flag" ||
9980 test ! -s conftest.err
9981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_lo=0 ac_mid=0
9983 while :; do
9984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009991 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009996test_array [0] = 0
9997
9998 ;
9999 return 0;
10000}
10001_ACEOF
10002rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003if { (ac_try="$ac_compile"
10004case "(($ac_try" in
10005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10006 *) ac_try_echo=$ac_try;;
10007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010011 grep -v '^ *+' conftest.er1 >conftest.err
10012 rm -f conftest.er1
10013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 (exit $ac_status); } && {
10016 test -z "$ac_c_werror_flag" ||
10017 test ! -s conftest.err
10018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_hi=$ac_mid; break
10020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 ac_lo=`expr $ac_mid + 1`
10025 if test $ac_lo -le $ac_mid; then
10026 ac_lo= ac_hi=
10027 break
10028 fi
10029 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031
10032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 done
10034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010036sed 's/^/| /' conftest.$ac_ext >&5
10037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010039/* confdefs.h. */
10040_ACEOF
10041cat confdefs.h >>conftest.$ac_ext
10042cat >>conftest.$ac_ext <<_ACEOF
10043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010044$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010045 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010046int
10047main ()
10048{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010049static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010050test_array [0] = 0
10051
10052 ;
10053 return 0;
10054}
10055_ACEOF
10056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057if { (ac_try="$ac_compile"
10058case "(($ac_try" in
10059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10060 *) ac_try_echo=$ac_try;;
10061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010065 grep -v '^ *+' conftest.er1 >conftest.err
10066 rm -f conftest.er1
10067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 (exit $ac_status); } && {
10070 test -z "$ac_c_werror_flag" ||
10071 test ! -s conftest.err
10072 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_hi=-1 ac_mid=-1
10074 while :; do
10075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* confdefs.h. */
10077_ACEOF
10078cat confdefs.h >>conftest.$ac_ext
10079cat >>conftest.$ac_ext <<_ACEOF
10080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010082 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010083int
10084main ()
10085{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010086static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010087test_array [0] = 0
10088
10089 ;
10090 return 0;
10091}
10092_ACEOF
10093rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094if { (ac_try="$ac_compile"
10095case "(($ac_try" in
10096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10097 *) ac_try_echo=$ac_try;;
10098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010102 grep -v '^ *+' conftest.er1 >conftest.err
10103 rm -f conftest.er1
10104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 (exit $ac_status); } && {
10107 test -z "$ac_c_werror_flag" ||
10108 test ! -s conftest.err
10109 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ac_lo=$ac_mid; break
10111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010113sed 's/^/| /' conftest.$ac_ext >&5
10114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 ac_hi=`expr '(' $ac_mid ')' - 1`
10116 if test $ac_mid -le $ac_hi; then
10117 ac_lo= ac_hi=
10118 break
10119 fi
10120 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122
10123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 done
10125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010127sed 's/^/| /' conftest.$ac_ext >&5
10128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
10132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136# Binary search between lo and hi bounds.
10137while test "x$ac_lo" != "x$ac_hi"; do
10138 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* confdefs.h. */
10141_ACEOF
10142cat confdefs.h >>conftest.$ac_ext
10143cat >>conftest.$ac_ext <<_ACEOF
10144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010146 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010151test_array [0] = 0
10152
10153 ;
10154 return 0;
10155}
10156_ACEOF
10157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158if { (ac_try="$ac_compile"
10159case "(($ac_try" in
10160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10161 *) ac_try_echo=$ac_try;;
10162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010166 grep -v '^ *+' conftest.er1 >conftest.err
10167 rm -f conftest.er1
10168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 (exit $ac_status); } && {
10171 test -z "$ac_c_werror_flag" ||
10172 test ! -s conftest.err
10173 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_hi=$ac_mid
10175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010177sed 's/^/| /' conftest.$ac_ext >&5
10178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183done
10184case $ac_lo in
10185?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010187 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010188See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010189echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010190See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010191 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192 else
10193 ac_cv_sizeof_fpos_t=0
10194 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010195esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* confdefs.h. */
10199_ACEOF
10200cat confdefs.h >>conftest.$ac_ext
10201cat >>conftest.$ac_ext <<_ACEOF
10202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010204 typedef fpos_t ac__type_sizeof_;
10205static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10206static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010207#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209int
10210main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010211{
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
10213 FILE *f = fopen ("conftest.val", "w");
10214 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010219 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010221 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 }
10223 else
10224 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010228 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
10232 ;
10233 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010234}
Martin v. Löwis11437992002-04-12 09:54:03 +000010235_ACEOF
10236rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237if { (ac_try="$ac_link"
10238case "(($ac_try" in
10239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240 *) ac_try_echo=$ac_try;;
10241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 { (case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 (exit $ac_status); }; }; then
10256 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010258 echo "$as_me: program exited with status $ac_status" >&5
10259echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010260sed 's/^/| /' conftest.$ac_ext >&5
10261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010266echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010268 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 else
10270 ac_cv_sizeof_fpos_t=0
10271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273rm -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 +000010274fi
10275rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010276fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010277{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10278echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279
10280
10281
Martin v. Löwis11437992002-04-12 09:54:03 +000010282cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285
Michael W. Hudson54241132001-12-07 15:38:26 +000010286
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287{ echo "$as_me:$LINENO: checking for size_t" >&5
10288echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10289if test "${ac_cv_type_size_t+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10291else
10292 cat >conftest.$ac_ext <<_ACEOF
10293/* confdefs.h. */
10294_ACEOF
10295cat confdefs.h >>conftest.$ac_ext
10296cat >>conftest.$ac_ext <<_ACEOF
10297/* end confdefs.h. */
10298$ac_includes_default
10299typedef size_t ac__type_new_;
10300int
10301main ()
10302{
10303if ((ac__type_new_ *) 0)
10304 return 0;
10305if (sizeof (ac__type_new_))
10306 return 0;
10307 ;
10308 return 0;
10309}
10310_ACEOF
10311rm -f conftest.$ac_objext
10312if { (ac_try="$ac_compile"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
10317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10318 (eval "$ac_compile") 2>conftest.er1
10319 ac_status=$?
10320 grep -v '^ *+' conftest.er1 >conftest.err
10321 rm -f conftest.er1
10322 cat conftest.err >&5
10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324 (exit $ac_status); } && {
10325 test -z "$ac_c_werror_flag" ||
10326 test ! -s conftest.err
10327 } && test -s conftest.$ac_objext; then
10328 ac_cv_type_size_t=yes
10329else
10330 echo "$as_me: failed program was:" >&5
10331sed 's/^/| /' conftest.$ac_ext >&5
10332
10333 ac_cv_type_size_t=no
10334fi
10335
10336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10337fi
10338{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10339echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341# The cast to long int works around a bug in the HP C Compiler
10342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10344# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345{ echo "$as_me:$LINENO: checking size of size_t" >&5
10346echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010347if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350 if test "$cross_compiling" = yes; then
10351 # Depending upon the size, compute the lo and hi bounds.
10352cat >conftest.$ac_ext <<_ACEOF
10353/* confdefs.h. */
10354_ACEOF
10355cat confdefs.h >>conftest.$ac_ext
10356cat >>conftest.$ac_ext <<_ACEOF
10357/* end confdefs.h. */
10358$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010359 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010360int
10361main ()
10362{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010364test_array [0] = 0
10365
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371if { (ac_try="$ac_compile"
10372case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010378 ac_status=$?
10379 grep -v '^ *+' conftest.er1 >conftest.err
10380 rm -f conftest.er1
10381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 (exit $ac_status); } && {
10384 test -z "$ac_c_werror_flag" ||
10385 test ! -s conftest.err
10386 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010387 ac_lo=0 ac_mid=0
10388 while :; do
10389 cat >conftest.$ac_ext <<_ACEOF
10390/* confdefs.h. */
10391_ACEOF
10392cat confdefs.h >>conftest.$ac_ext
10393cat >>conftest.$ac_ext <<_ACEOF
10394/* end confdefs.h. */
10395$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010396 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397int
10398main ()
10399{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010400static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010401test_array [0] = 0
10402
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408if { (ac_try="$ac_compile"
10409case "(($ac_try" in
10410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10411 *) ac_try_echo=$ac_try;;
10412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415 ac_status=$?
10416 grep -v '^ *+' conftest.er1 >conftest.err
10417 rm -f conftest.er1
10418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420 (exit $ac_status); } && {
10421 test -z "$ac_c_werror_flag" ||
10422 test ! -s conftest.err
10423 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 ac_hi=$ac_mid; break
10425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010426 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427sed 's/^/| /' conftest.$ac_ext >&5
10428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429 ac_lo=`expr $ac_mid + 1`
10430 if test $ac_lo -le $ac_mid; then
10431 ac_lo= ac_hi=
10432 break
10433 fi
10434 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436
10437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438 done
10439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010440 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441sed 's/^/| /' conftest.$ac_ext >&5
10442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444/* confdefs.h. */
10445_ACEOF
10446cat confdefs.h >>conftest.$ac_ext
10447cat >>conftest.$ac_ext <<_ACEOF
10448/* end confdefs.h. */
10449$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010450 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010451int
10452main ()
10453{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010454static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455test_array [0] = 0
10456
10457 ;
10458 return 0;
10459}
10460_ACEOF
10461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462if { (ac_try="$ac_compile"
10463case "(($ac_try" in
10464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10465 *) ac_try_echo=$ac_try;;
10466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469 ac_status=$?
10470 grep -v '^ *+' conftest.er1 >conftest.err
10471 rm -f conftest.er1
10472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474 (exit $ac_status); } && {
10475 test -z "$ac_c_werror_flag" ||
10476 test ! -s conftest.err
10477 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478 ac_hi=-1 ac_mid=-1
10479 while :; do
10480 cat >conftest.$ac_ext <<_ACEOF
10481/* confdefs.h. */
10482_ACEOF
10483cat confdefs.h >>conftest.$ac_ext
10484cat >>conftest.$ac_ext <<_ACEOF
10485/* end confdefs.h. */
10486$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010487 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488int
10489main ()
10490{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010491static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492test_array [0] = 0
10493
10494 ;
10495 return 0;
10496}
10497_ACEOF
10498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499if { (ac_try="$ac_compile"
10500case "(($ac_try" in
10501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10502 *) ac_try_echo=$ac_try;;
10503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506 ac_status=$?
10507 grep -v '^ *+' conftest.er1 >conftest.err
10508 rm -f conftest.er1
10509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511 (exit $ac_status); } && {
10512 test -z "$ac_c_werror_flag" ||
10513 test ! -s conftest.err
10514 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515 ac_lo=$ac_mid; break
10516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010517 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518sed 's/^/| /' conftest.$ac_ext >&5
10519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 ac_hi=`expr '(' $ac_mid ')' - 1`
10521 if test $ac_mid -le $ac_hi; then
10522 ac_lo= ac_hi=
10523 break
10524 fi
10525 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527
10528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529 done
10530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010531 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532sed 's/^/| /' conftest.$ac_ext >&5
10533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536
10537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541# Binary search between lo and hi bounds.
10542while test "x$ac_lo" != "x$ac_hi"; do
10543 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10544 cat >conftest.$ac_ext <<_ACEOF
10545/* confdefs.h. */
10546_ACEOF
10547cat confdefs.h >>conftest.$ac_ext
10548cat >>conftest.$ac_ext <<_ACEOF
10549/* end confdefs.h. */
10550$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010551 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552int
10553main ()
10554{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010555static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556test_array [0] = 0
10557
10558 ;
10559 return 0;
10560}
10561_ACEOF
10562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563if { (ac_try="$ac_compile"
10564case "(($ac_try" in
10565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10566 *) ac_try_echo=$ac_try;;
10567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570 ac_status=$?
10571 grep -v '^ *+' conftest.er1 >conftest.err
10572 rm -f conftest.er1
10573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575 (exit $ac_status); } && {
10576 test -z "$ac_c_werror_flag" ||
10577 test ! -s conftest.err
10578 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579 ac_hi=$ac_mid
10580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010581 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582sed 's/^/| /' conftest.$ac_ext >&5
10583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
10587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588done
10589case $ac_lo in
10590?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010592 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010594echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010596 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597 else
10598 ac_cv_sizeof_size_t=0
10599 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600esac
10601else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602 cat >conftest.$ac_ext <<_ACEOF
10603/* confdefs.h. */
10604_ACEOF
10605cat confdefs.h >>conftest.$ac_ext
10606cat >>conftest.$ac_ext <<_ACEOF
10607/* end confdefs.h. */
10608$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010609 typedef size_t ac__type_sizeof_;
10610static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10611static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612#include <stdio.h>
10613#include <stdlib.h>
10614int
10615main ()
10616{
10617
10618 FILE *f = fopen ("conftest.val", "w");
10619 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010624 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010626 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627 }
10628 else
10629 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010633 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636
10637 ;
10638 return 0;
10639}
10640_ACEOF
10641rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642if { (ac_try="$ac_link"
10643case "(($ac_try" in
10644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10645 *) ac_try_echo=$ac_try;;
10646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 { (case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 (exit $ac_status); }; }; then
10661 ac_cv_sizeof_size_t=`cat conftest.val`
10662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010663 echo "$as_me: program exited with status $ac_status" >&5
10664echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665sed 's/^/| /' conftest.$ac_ext >&5
10666
10667( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010669 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010671echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010673 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 else
10675 ac_cv_sizeof_size_t=0
10676 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678rm -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 +000010679fi
10680rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010682{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10683echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684
10685
10686
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687cat >>confdefs.h <<_ACEOF
10688#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10689_ACEOF
10690
10691
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692{ echo "$as_me:$LINENO: checking for pid_t" >&5
10693echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10694if test "${ac_cv_type_pid_t+set}" = set; then
10695 echo $ECHO_N "(cached) $ECHO_C" >&6
10696else
10697 cat >conftest.$ac_ext <<_ACEOF
10698/* confdefs.h. */
10699_ACEOF
10700cat confdefs.h >>conftest.$ac_ext
10701cat >>conftest.$ac_ext <<_ACEOF
10702/* end confdefs.h. */
10703$ac_includes_default
10704typedef pid_t ac__type_new_;
10705int
10706main ()
10707{
10708if ((ac__type_new_ *) 0)
10709 return 0;
10710if (sizeof (ac__type_new_))
10711 return 0;
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
10717if { (ac_try="$ac_compile"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
10722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10723 (eval "$ac_compile") 2>conftest.er1
10724 ac_status=$?
10725 grep -v '^ *+' conftest.er1 >conftest.err
10726 rm -f conftest.er1
10727 cat conftest.err >&5
10728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729 (exit $ac_status); } && {
10730 test -z "$ac_c_werror_flag" ||
10731 test ! -s conftest.err
10732 } && test -s conftest.$ac_objext; then
10733 ac_cv_type_pid_t=yes
10734else
10735 echo "$as_me: failed program was:" >&5
10736sed 's/^/| /' conftest.$ac_ext >&5
10737
10738 ac_cv_type_pid_t=no
10739fi
10740
10741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10742fi
10743{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10744echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10745
Christian Heimes400adb02008-02-01 08:12:03 +000010746# The cast to long int works around a bug in the HP C Compiler
10747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10749# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10751echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010752if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010753 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010754else
10755 if test "$cross_compiling" = yes; then
10756 # Depending upon the size, compute the lo and hi bounds.
10757cat >conftest.$ac_ext <<_ACEOF
10758/* confdefs.h. */
10759_ACEOF
10760cat confdefs.h >>conftest.$ac_ext
10761cat >>conftest.$ac_ext <<_ACEOF
10762/* end confdefs.h. */
10763$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010764 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010765int
10766main ()
10767{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010768static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010769test_array [0] = 0
10770
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (ac_try="$ac_compile"
10777case "(($ac_try" in
10778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779 *) ac_try_echo=$ac_try;;
10780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010782 (eval "$ac_compile") 2>conftest.er1
10783 ac_status=$?
10784 grep -v '^ *+' conftest.er1 >conftest.err
10785 rm -f conftest.er1
10786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010788 (exit $ac_status); } && {
10789 test -z "$ac_c_werror_flag" ||
10790 test ! -s conftest.err
10791 } && test -s conftest.$ac_objext; then
10792 ac_lo=0 ac_mid=0
10793 while :; do
10794 cat >conftest.$ac_ext <<_ACEOF
10795/* confdefs.h. */
10796_ACEOF
10797cat confdefs.h >>conftest.$ac_ext
10798cat >>conftest.$ac_ext <<_ACEOF
10799/* end confdefs.h. */
10800$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010801 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010802int
10803main ()
10804{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010806test_array [0] = 0
10807
10808 ;
10809 return 0;
10810}
10811_ACEOF
10812rm -f conftest.$ac_objext
10813if { (ac_try="$ac_compile"
10814case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010819 (eval "$ac_compile") 2>conftest.er1
10820 ac_status=$?
10821 grep -v '^ *+' conftest.er1 >conftest.err
10822 rm -f conftest.er1
10823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010825 (exit $ac_status); } && {
10826 test -z "$ac_c_werror_flag" ||
10827 test ! -s conftest.err
10828 } && test -s conftest.$ac_objext; then
10829 ac_hi=$ac_mid; break
10830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010831 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
10834 ac_lo=`expr $ac_mid + 1`
10835 if test $ac_lo -le $ac_mid; then
10836 ac_lo= ac_hi=
10837 break
10838 fi
10839 ac_mid=`expr 2 '*' $ac_mid + 1`
10840fi
10841
10842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10843 done
10844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010845 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
10848 cat >conftest.$ac_ext <<_ACEOF
10849/* confdefs.h. */
10850_ACEOF
10851cat confdefs.h >>conftest.$ac_ext
10852cat >>conftest.$ac_ext <<_ACEOF
10853/* end confdefs.h. */
10854$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010855 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010856int
10857main ()
10858{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010860test_array [0] = 0
10861
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
10867if { (ac_try="$ac_compile"
10868case "(($ac_try" in
10869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10870 *) ac_try_echo=$ac_try;;
10871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010873 (eval "$ac_compile") 2>conftest.er1
10874 ac_status=$?
10875 grep -v '^ *+' conftest.er1 >conftest.err
10876 rm -f conftest.er1
10877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010879 (exit $ac_status); } && {
10880 test -z "$ac_c_werror_flag" ||
10881 test ! -s conftest.err
10882 } && test -s conftest.$ac_objext; then
10883 ac_hi=-1 ac_mid=-1
10884 while :; do
10885 cat >conftest.$ac_ext <<_ACEOF
10886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
10891$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010892 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010893int
10894main ()
10895{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010897test_array [0] = 0
10898
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext
10904if { (ac_try="$ac_compile"
10905case "(($ac_try" in
10906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10907 *) ac_try_echo=$ac_try;;
10908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010910 (eval "$ac_compile") 2>conftest.er1
10911 ac_status=$?
10912 grep -v '^ *+' conftest.er1 >conftest.err
10913 rm -f conftest.er1
10914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916 (exit $ac_status); } && {
10917 test -z "$ac_c_werror_flag" ||
10918 test ! -s conftest.err
10919 } && test -s conftest.$ac_objext; then
10920 ac_lo=$ac_mid; break
10921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010922 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010923sed 's/^/| /' conftest.$ac_ext >&5
10924
10925 ac_hi=`expr '(' $ac_mid ')' - 1`
10926 if test $ac_mid -le $ac_hi; then
10927 ac_lo= ac_hi=
10928 break
10929 fi
10930 ac_mid=`expr 2 '*' $ac_mid`
10931fi
10932
10933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 done
10935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010936 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010937sed 's/^/| /' conftest.$ac_ext >&5
10938
10939 ac_lo= ac_hi=
10940fi
10941
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946# Binary search between lo and hi bounds.
10947while test "x$ac_lo" != "x$ac_hi"; do
10948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10949 cat >conftest.$ac_ext <<_ACEOF
10950/* confdefs.h. */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h. */
10955$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010956 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010957int
10958main ()
10959{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010960static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010961test_array [0] = 0
10962
10963 ;
10964 return 0;
10965}
10966_ACEOF
10967rm -f conftest.$ac_objext
10968if { (ac_try="$ac_compile"
10969case "(($ac_try" in
10970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10971 *) ac_try_echo=$ac_try;;
10972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010974 (eval "$ac_compile") 2>conftest.er1
10975 ac_status=$?
10976 grep -v '^ *+' conftest.er1 >conftest.err
10977 rm -f conftest.er1
10978 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980 (exit $ac_status); } && {
10981 test -z "$ac_c_werror_flag" ||
10982 test ! -s conftest.err
10983 } && test -s conftest.$ac_objext; then
10984 ac_hi=$ac_mid
10985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010986 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010987sed 's/^/| /' conftest.$ac_ext >&5
10988
10989 ac_lo=`expr '(' $ac_mid ')' + 1`
10990fi
10991
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993done
10994case $ac_lo in
10995?*) ac_cv_sizeof_pid_t=$ac_lo;;
10996'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010997 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010998See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010999echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011000See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011001 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011002 else
11003 ac_cv_sizeof_pid_t=0
11004 fi ;;
11005esac
11006else
11007 cat >conftest.$ac_ext <<_ACEOF
11008/* confdefs.h. */
11009_ACEOF
11010cat confdefs.h >>conftest.$ac_ext
11011cat >>conftest.$ac_ext <<_ACEOF
11012/* end confdefs.h. */
11013$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011014 typedef pid_t ac__type_sizeof_;
11015static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11016static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011017#include <stdio.h>
11018#include <stdlib.h>
11019int
11020main ()
11021{
11022
11023 FILE *f = fopen ("conftest.val", "w");
11024 if (! f)
11025 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011027 {
11028 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011030 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011031 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011032 }
11033 else
11034 {
11035 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011036 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011037 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011038 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011039 }
11040 return ferror (f) || fclose (f) != 0;
11041
11042 ;
11043 return 0;
11044}
11045_ACEOF
11046rm -f conftest$ac_exeext
11047if { (ac_try="$ac_link"
11048case "(($ac_try" in
11049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11050 *) ac_try_echo=$ac_try;;
11051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011053 (eval "$ac_link") 2>&5
11054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11057 { (case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011062 (eval "$ac_try") 2>&5
11063 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (exit $ac_status); }; }; then
11066 ac_cv_sizeof_pid_t=`cat conftest.val`
11067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011068 echo "$as_me: program exited with status $ac_status" >&5
11069echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
11072( exit $ac_status )
11073if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011074 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011075See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011076echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011077See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011078 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011079 else
11080 ac_cv_sizeof_pid_t=0
11081 fi
11082fi
11083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11084fi
11085rm -f conftest.val
11086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011087{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11088echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011089
11090
11091
11092cat >>confdefs.h <<_ACEOF
11093#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11094_ACEOF
11095
11096
Michael W. Hudson54241132001-12-07 15:38:26 +000011097
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011098{ echo "$as_me:$LINENO: checking for long long support" >&5
11099echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011100have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* confdefs.h. */
11103_ACEOF
11104cat confdefs.h >>conftest.$ac_ext
11105cat >>conftest.$ac_ext <<_ACEOF
11106/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011111long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117if { (ac_try="$ac_compile"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011125 grep -v '^ *+' conftest.er1 >conftest.err
11126 rm -f conftest.er1
11127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 (exit $ac_status); } && {
11130 test -z "$ac_c_werror_flag" ||
11131 test ! -s conftest.err
11132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011133
11134
11135cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011136#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
11138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011139 have_long_long=yes
11140
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011143sed 's/^/| /' conftest.$ac_ext >&5
11144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147
11148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011149{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11150echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011151if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011152{ echo "$as_me:$LINENO: checking for long long" >&5
11153echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11154if test "${ac_cv_type_long_long+set}" = set; then
11155 echo $ECHO_N "(cached) $ECHO_C" >&6
11156else
11157 cat >conftest.$ac_ext <<_ACEOF
11158/* confdefs.h. */
11159_ACEOF
11160cat confdefs.h >>conftest.$ac_ext
11161cat >>conftest.$ac_ext <<_ACEOF
11162/* end confdefs.h. */
11163$ac_includes_default
11164typedef long long ac__type_new_;
11165int
11166main ()
11167{
11168if ((ac__type_new_ *) 0)
11169 return 0;
11170if (sizeof (ac__type_new_))
11171 return 0;
11172 ;
11173 return 0;
11174}
11175_ACEOF
11176rm -f conftest.$ac_objext
11177if { (ac_try="$ac_compile"
11178case "(($ac_try" in
11179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11180 *) ac_try_echo=$ac_try;;
11181esac
11182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11183 (eval "$ac_compile") 2>conftest.er1
11184 ac_status=$?
11185 grep -v '^ *+' conftest.er1 >conftest.err
11186 rm -f conftest.er1
11187 cat conftest.err >&5
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); } && {
11190 test -z "$ac_c_werror_flag" ||
11191 test ! -s conftest.err
11192 } && test -s conftest.$ac_objext; then
11193 ac_cv_type_long_long=yes
11194else
11195 echo "$as_me: failed program was:" >&5
11196sed 's/^/| /' conftest.$ac_ext >&5
11197
11198 ac_cv_type_long_long=no
11199fi
11200
11201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202fi
11203{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11204echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206# The cast to long int works around a bug in the HP C Compiler
11207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11209# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011210{ echo "$as_me:$LINENO: checking size of long long" >&5
11211echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011212if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011213 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011214else
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 if test "$cross_compiling" = yes; then
11216 # Depending upon the size, compute the lo and hi bounds.
11217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* confdefs.h. */
11219_ACEOF
11220cat confdefs.h >>conftest.$ac_ext
11221cat >>conftest.$ac_ext <<_ACEOF
11222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011223$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011224 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011229test_array [0] = 0
11230
11231 ;
11232 return 0;
11233}
11234_ACEOF
11235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236if { (ac_try="$ac_compile"
11237case "(($ac_try" in
11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11239 *) ac_try_echo=$ac_try;;
11240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248 (exit $ac_status); } && {
11249 test -z "$ac_c_werror_flag" ||
11250 test ! -s conftest.err
11251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ac_lo=0 ac_mid=0
11253 while :; do
11254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* confdefs.h. */
11256_ACEOF
11257cat confdefs.h >>conftest.$ac_ext
11258cat >>conftest.$ac_ext <<_ACEOF
11259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011261 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262int
11263main ()
11264{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011266test_array [0] = 0
11267
11268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273if { (ac_try="$ac_compile"
11274case "(($ac_try" in
11275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11276 *) ac_try_echo=$ac_try;;
11277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011281 grep -v '^ *+' conftest.er1 >conftest.err
11282 rm -f conftest.er1
11283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285 (exit $ac_status); } && {
11286 test -z "$ac_c_werror_flag" ||
11287 test ! -s conftest.err
11288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ac_hi=$ac_mid; break
11290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011292sed 's/^/| /' conftest.$ac_ext >&5
11293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294 ac_lo=`expr $ac_mid + 1`
11295 if test $ac_lo -le $ac_mid; then
11296 ac_lo= ac_hi=
11297 break
11298 fi
11299 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301
11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 done
11304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011306sed 's/^/| /' conftest.$ac_ext >&5
11307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* confdefs.h. */
11310_ACEOF
11311cat confdefs.h >>conftest.$ac_ext
11312cat >>conftest.$ac_ext <<_ACEOF
11313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011315 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011320test_array [0] = 0
11321
11322 ;
11323 return 0;
11324}
11325_ACEOF
11326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327if { (ac_try="$ac_compile"
11328case "(($ac_try" in
11329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11330 *) ac_try_echo=$ac_try;;
11331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011335 grep -v '^ *+' conftest.er1 >conftest.err
11336 rm -f conftest.er1
11337 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 (exit $ac_status); } && {
11340 test -z "$ac_c_werror_flag" ||
11341 test ! -s conftest.err
11342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_hi=-1 ac_mid=-1
11344 while :; do
11345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* confdefs.h. */
11347_ACEOF
11348cat confdefs.h >>conftest.$ac_ext
11349cat >>conftest.$ac_ext <<_ACEOF
11350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011351$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011352 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353int
11354main ()
11355{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011357test_array [0] = 0
11358
11359 ;
11360 return 0;
11361}
11362_ACEOF
11363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364if { (ac_try="$ac_compile"
11365case "(($ac_try" in
11366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11367 *) ac_try_echo=$ac_try;;
11368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011372 grep -v '^ *+' conftest.er1 >conftest.err
11373 rm -f conftest.er1
11374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 (exit $ac_status); } && {
11377 test -z "$ac_c_werror_flag" ||
11378 test ! -s conftest.err
11379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_lo=$ac_mid; break
11381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011383sed 's/^/| /' conftest.$ac_ext >&5
11384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 ac_hi=`expr '(' $ac_mid ')' - 1`
11386 if test $ac_mid -le $ac_hi; then
11387 ac_lo= ac_hi=
11388 break
11389 fi
11390 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392
11393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 done
11395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011397sed 's/^/| /' conftest.$ac_ext >&5
11398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406# Binary search between lo and hi bounds.
11407while test "x$ac_lo" != "x$ac_hi"; do
11408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* confdefs.h. */
11411_ACEOF
11412cat confdefs.h >>conftest.$ac_ext
11413cat >>conftest.$ac_ext <<_ACEOF
11414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011416 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011421test_array [0] = 0
11422
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428if { (ac_try="$ac_compile"
11429case "(($ac_try" in
11430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11431 *) ac_try_echo=$ac_try;;
11432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011436 grep -v '^ *+' conftest.er1 >conftest.err
11437 rm -f conftest.er1
11438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440 (exit $ac_status); } && {
11441 test -z "$ac_c_werror_flag" ||
11442 test ! -s conftest.err
11443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_hi=$ac_mid
11445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011447sed 's/^/| /' conftest.$ac_ext >&5
11448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453done
11454case $ac_lo in
11455?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011459echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462 else
11463 ac_cv_sizeof_long_long=0
11464 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011465esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011466else
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* confdefs.h. */
11469_ACEOF
11470cat confdefs.h >>conftest.$ac_ext
11471cat >>conftest.$ac_ext <<_ACEOF
11472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011474 typedef long long ac__type_sizeof_;
11475static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11476static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011481{
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
11483 FILE *f = fopen ("conftest.val", "w");
11484 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011491 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 }
11493 else
11494 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011498 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
11502 ;
11503 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011504}
Martin v. Löwis11437992002-04-12 09:54:03 +000011505_ACEOF
11506rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507if { (ac_try="$ac_link"
11508case "(($ac_try" in
11509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11510 *) ac_try_echo=$ac_try;;
11511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 { (case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 (exit $ac_status); }; }; then
11526 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011528 echo "$as_me: program exited with status $ac_status" >&5
11529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011530sed 's/^/| /' conftest.$ac_ext >&5
11531
Martin v. Löwis11437992002-04-12 09:54:03 +000011532( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011536echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011537See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011538 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 else
11540 ac_cv_sizeof_long_long=0
11541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543rm -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 +000011544fi
11545rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011547{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11548echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549
11550
11551
Martin v. Löwis11437992002-04-12 09:54:03 +000011552cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011554_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555
Michael W. Hudson54241132001-12-07 15:38:26 +000011556
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557fi
11558
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559{ echo "$as_me:$LINENO: checking for long double support" >&5
11560echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011561have_long_double=no
11562cat >conftest.$ac_ext <<_ACEOF
11563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */
11568
11569int
11570main ()
11571{
11572long double x; x = (long double)0;
11573 ;
11574 return 0;
11575}
11576_ACEOF
11577rm -f conftest.$ac_objext
11578if { (ac_try="$ac_compile"
11579case "(($ac_try" in
11580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581 *) ac_try_echo=$ac_try;;
11582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011584 (eval "$ac_compile") 2>conftest.er1
11585 ac_status=$?
11586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011590 (exit $ac_status); } && {
11591 test -z "$ac_c_werror_flag" ||
11592 test ! -s conftest.err
11593 } && test -s conftest.$ac_objext; then
11594
11595
11596cat >>confdefs.h <<\_ACEOF
11597#define HAVE_LONG_DOUBLE 1
11598_ACEOF
11599
11600 have_long_double=yes
11601
11602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011603 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
11606
11607fi
11608
11609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011610{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11611echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011612if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613{ echo "$as_me:$LINENO: checking for long double" >&5
11614echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11615if test "${ac_cv_type_long_double+set}" = set; then
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617else
11618 cat >conftest.$ac_ext <<_ACEOF
11619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
11624$ac_includes_default
11625typedef long double ac__type_new_;
11626int
11627main ()
11628{
11629if ((ac__type_new_ *) 0)
11630 return 0;
11631if (sizeof (ac__type_new_))
11632 return 0;
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext
11638if { (ac_try="$ac_compile"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
11643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11644 (eval "$ac_compile") 2>conftest.er1
11645 ac_status=$?
11646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err
11653 } && test -s conftest.$ac_objext; then
11654 ac_cv_type_long_double=yes
11655else
11656 echo "$as_me: failed program was:" >&5
11657sed 's/^/| /' conftest.$ac_ext >&5
11658
11659 ac_cv_type_long_double=no
11660fi
11661
11662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11663fi
11664{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11665echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11666
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011667# The cast to long int works around a bug in the HP C Compiler
11668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11670# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011671{ echo "$as_me:$LINENO: checking size of long double" >&5
11672echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011673if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011674 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011675else
11676 if test "$cross_compiling" = yes; then
11677 # Depending upon the size, compute the lo and hi bounds.
11678cat >conftest.$ac_ext <<_ACEOF
11679/* confdefs.h. */
11680_ACEOF
11681cat confdefs.h >>conftest.$ac_ext
11682cat >>conftest.$ac_ext <<_ACEOF
11683/* end confdefs.h. */
11684$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011685 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011686int
11687main ()
11688{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011690test_array [0] = 0
11691
11692 ;
11693 return 0;
11694}
11695_ACEOF
11696rm -f conftest.$ac_objext
11697if { (ac_try="$ac_compile"
11698case "(($ac_try" in
11699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11700 *) ac_try_echo=$ac_try;;
11701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011703 (eval "$ac_compile") 2>conftest.er1
11704 ac_status=$?
11705 grep -v '^ *+' conftest.er1 >conftest.err
11706 rm -f conftest.er1
11707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011709 (exit $ac_status); } && {
11710 test -z "$ac_c_werror_flag" ||
11711 test ! -s conftest.err
11712 } && test -s conftest.$ac_objext; then
11713 ac_lo=0 ac_mid=0
11714 while :; do
11715 cat >conftest.$ac_ext <<_ACEOF
11716/* confdefs.h. */
11717_ACEOF
11718cat confdefs.h >>conftest.$ac_ext
11719cat >>conftest.$ac_ext <<_ACEOF
11720/* end confdefs.h. */
11721$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011722 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011723int
11724main ()
11725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011727test_array [0] = 0
11728
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
11734if { (ac_try="$ac_compile"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011740 (eval "$ac_compile") 2>conftest.er1
11741 ac_status=$?
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest.$ac_objext; then
11750 ac_hi=$ac_mid; break
11751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011752 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011753sed 's/^/| /' conftest.$ac_ext >&5
11754
11755 ac_lo=`expr $ac_mid + 1`
11756 if test $ac_lo -le $ac_mid; then
11757 ac_lo= ac_hi=
11758 break
11759 fi
11760 ac_mid=`expr 2 '*' $ac_mid + 1`
11761fi
11762
11763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11764 done
11765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011766 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011767sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770/* confdefs.h. */
11771_ACEOF
11772cat confdefs.h >>conftest.$ac_ext
11773cat >>conftest.$ac_ext <<_ACEOF
11774/* end confdefs.h. */
11775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011776 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777int
11778main ()
11779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011781test_array [0] = 0
11782
11783 ;
11784 return 0;
11785}
11786_ACEOF
11787rm -f conftest.$ac_objext
11788if { (ac_try="$ac_compile"
11789case "(($ac_try" in
11790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11791 *) ac_try_echo=$ac_try;;
11792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011794 (eval "$ac_compile") 2>conftest.er1
11795 ac_status=$?
11796 grep -v '^ *+' conftest.er1 >conftest.err
11797 rm -f conftest.er1
11798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800 (exit $ac_status); } && {
11801 test -z "$ac_c_werror_flag" ||
11802 test ! -s conftest.err
11803 } && test -s conftest.$ac_objext; then
11804 ac_hi=-1 ac_mid=-1
11805 while :; do
11806 cat >conftest.$ac_ext <<_ACEOF
11807/* confdefs.h. */
11808_ACEOF
11809cat confdefs.h >>conftest.$ac_ext
11810cat >>conftest.$ac_ext <<_ACEOF
11811/* end confdefs.h. */
11812$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011813 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814int
11815main ()
11816{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818test_array [0] = 0
11819
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (ac_try="$ac_compile"
11826case "(($ac_try" in
11827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11828 *) ac_try_echo=$ac_try;;
11829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011831 (eval "$ac_compile") 2>conftest.er1
11832 ac_status=$?
11833 grep -v '^ *+' conftest.er1 >conftest.err
11834 rm -f conftest.er1
11835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837 (exit $ac_status); } && {
11838 test -z "$ac_c_werror_flag" ||
11839 test ! -s conftest.err
11840 } && test -s conftest.$ac_objext; then
11841 ac_lo=$ac_mid; break
11842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011843 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011844sed 's/^/| /' conftest.$ac_ext >&5
11845
11846 ac_hi=`expr '(' $ac_mid ')' - 1`
11847 if test $ac_mid -le $ac_hi; then
11848 ac_lo= ac_hi=
11849 break
11850 fi
11851 ac_mid=`expr 2 '*' $ac_mid`
11852fi
11853
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855 done
11856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011857 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011858sed 's/^/| /' conftest.$ac_ext >&5
11859
11860 ac_lo= ac_hi=
11861fi
11862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867# Binary search between lo and hi bounds.
11868while test "x$ac_lo" != "x$ac_hi"; do
11869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11870 cat >conftest.$ac_ext <<_ACEOF
11871/* confdefs.h. */
11872_ACEOF
11873cat confdefs.h >>conftest.$ac_ext
11874cat >>conftest.$ac_ext <<_ACEOF
11875/* end confdefs.h. */
11876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011877 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011878int
11879main ()
11880{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011882test_array [0] = 0
11883
11884 ;
11885 return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext
11889if { (ac_try="$ac_compile"
11890case "(($ac_try" in
11891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11892 *) ac_try_echo=$ac_try;;
11893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011895 (eval "$ac_compile") 2>conftest.er1
11896 ac_status=$?
11897 grep -v '^ *+' conftest.er1 >conftest.err
11898 rm -f conftest.er1
11899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901 (exit $ac_status); } && {
11902 test -z "$ac_c_werror_flag" ||
11903 test ! -s conftest.err
11904 } && test -s conftest.$ac_objext; then
11905 ac_hi=$ac_mid
11906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011907 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011908sed 's/^/| /' conftest.$ac_ext >&5
11909
11910 ac_lo=`expr '(' $ac_mid ')' + 1`
11911fi
11912
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914done
11915case $ac_lo in
11916?*) ac_cv_sizeof_long_double=$ac_lo;;
11917'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011919See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011920echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011922 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923 else
11924 ac_cv_sizeof_long_double=0
11925 fi ;;
11926esac
11927else
11928 cat >conftest.$ac_ext <<_ACEOF
11929/* confdefs.h. */
11930_ACEOF
11931cat confdefs.h >>conftest.$ac_ext
11932cat >>conftest.$ac_ext <<_ACEOF
11933/* end confdefs.h. */
11934$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011935 typedef long double ac__type_sizeof_;
11936static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11937static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938#include <stdio.h>
11939#include <stdlib.h>
11940int
11941main ()
11942{
11943
11944 FILE *f = fopen ("conftest.val", "w");
11945 if (! f)
11946 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 {
11949 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011952 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011953 }
11954 else
11955 {
11956 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011957 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011959 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 }
11961 return ferror (f) || fclose (f) != 0;
11962
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967rm -f conftest$ac_exeext
11968if { (ac_try="$ac_link"
11969case "(($ac_try" in
11970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11971 *) ac_try_echo=$ac_try;;
11972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974 (eval "$ac_link") 2>&5
11975 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11978 { (case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 (eval "$ac_try") 2>&5
11984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (exit $ac_status); }; }; then
11987 ac_cv_sizeof_long_double=`cat conftest.val`
11988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011989 echo "$as_me: program exited with status $ac_status" >&5
11990echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991sed 's/^/| /' conftest.$ac_ext >&5
11992
11993( exit $ac_status )
11994if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011997echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011999 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 else
12001 ac_cv_sizeof_long_double=0
12002 fi
12003fi
12004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12005fi
12006rm -f conftest.val
12007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012008{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12009echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010
12011
12012
12013cat >>confdefs.h <<_ACEOF
12014#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12015_ACEOF
12016
12017
12018fi
12019
12020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012021{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12022echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012023have_c99_bool=no
12024cat >conftest.$ac_ext <<_ACEOF
12025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
12030
12031int
12032main ()
12033{
12034_Bool x; x = (_Bool)0;
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040if { (ac_try="$ac_compile"
12041case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012047 ac_status=$?
12048 grep -v '^ *+' conftest.er1 >conftest.err
12049 rm -f conftest.er1
12050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052 (exit $ac_status); } && {
12053 test -z "$ac_c_werror_flag" ||
12054 test ! -s conftest.err
12055 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012056
12057
12058cat >>confdefs.h <<\_ACEOF
12059#define HAVE_C99_BOOL 1
12060_ACEOF
12061
12062 have_c99_bool=yes
12063
12064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068
Thomas Woutersb2137042007-02-01 18:02:27 +000012069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070
12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012072{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12073echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012074if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012075{ echo "$as_me:$LINENO: checking for _Bool" >&5
12076echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12077if test "${ac_cv_type__Bool+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
12079else
12080 cat >conftest.$ac_ext <<_ACEOF
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
12086$ac_includes_default
12087typedef _Bool ac__type_new_;
12088int
12089main ()
12090{
12091if ((ac__type_new_ *) 0)
12092 return 0;
12093if (sizeof (ac__type_new_))
12094 return 0;
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext
12100if { (ac_try="$ac_compile"
12101case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
12105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12106 (eval "$ac_compile") 2>conftest.er1
12107 ac_status=$?
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest.$ac_objext; then
12116 ac_cv_type__Bool=yes
12117else
12118 echo "$as_me: failed program was:" >&5
12119sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 ac_cv_type__Bool=no
12122fi
12123
12124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12125fi
12126{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12127echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129# The cast to long int works around a bug in the HP C Compiler
12130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12132# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012133{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12134echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012135if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012136 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012137else
12138 if test "$cross_compiling" = yes; then
12139 # Depending upon the size, compute the lo and hi bounds.
12140cat >conftest.$ac_ext <<_ACEOF
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
12146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012147 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012148int
12149main ()
12150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012152test_array [0] = 0
12153
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159if { (ac_try="$ac_compile"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012166 ac_status=$?
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012175 ac_lo=0 ac_mid=0
12176 while :; do
12177 cat >conftest.$ac_ext <<_ACEOF
12178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
12183$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012184 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012185int
12186main ()
12187{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012189test_array [0] = 0
12190
12191 ;
12192 return 0;
12193}
12194_ACEOF
12195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196if { (ac_try="$ac_compile"
12197case "(($ac_try" in
12198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12199 *) ac_try_echo=$ac_try;;
12200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012203 ac_status=$?
12204 grep -v '^ *+' conftest.er1 >conftest.err
12205 rm -f conftest.er1
12206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 (exit $ac_status); } && {
12209 test -z "$ac_c_werror_flag" ||
12210 test ! -s conftest.err
12211 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012212 ac_hi=$ac_mid; break
12213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012214 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012215sed 's/^/| /' conftest.$ac_ext >&5
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 ac_lo=`expr $ac_mid + 1`
12218 if test $ac_lo -le $ac_mid; then
12219 ac_lo= ac_hi=
12220 break
12221 fi
12222 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224
12225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012226 done
12227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012228 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012232/* confdefs.h. */
12233_ACEOF
12234cat confdefs.h >>conftest.$ac_ext
12235cat >>conftest.$ac_ext <<_ACEOF
12236/* end confdefs.h. */
12237$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012238 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012239int
12240main ()
12241{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012243test_array [0] = 0
12244
12245 ;
12246 return 0;
12247}
12248_ACEOF
12249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250if { (ac_try="$ac_compile"
12251case "(($ac_try" in
12252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12253 *) ac_try_echo=$ac_try;;
12254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012257 ac_status=$?
12258 grep -v '^ *+' conftest.er1 >conftest.err
12259 rm -f conftest.er1
12260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 (exit $ac_status); } && {
12263 test -z "$ac_c_werror_flag" ||
12264 test ! -s conftest.err
12265 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012266 ac_hi=-1 ac_mid=-1
12267 while :; do
12268 cat >conftest.$ac_ext <<_ACEOF
12269/* confdefs.h. */
12270_ACEOF
12271cat confdefs.h >>conftest.$ac_ext
12272cat >>conftest.$ac_ext <<_ACEOF
12273/* end confdefs.h. */
12274$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012275 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012276int
12277main ()
12278{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012280test_array [0] = 0
12281
12282 ;
12283 return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287if { (ac_try="$ac_compile"
12288case "(($ac_try" in
12289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12290 *) ac_try_echo=$ac_try;;
12291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012294 ac_status=$?
12295 grep -v '^ *+' conftest.er1 >conftest.err
12296 rm -f conftest.er1
12297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 (exit $ac_status); } && {
12300 test -z "$ac_c_werror_flag" ||
12301 test ! -s conftest.err
12302 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012303 ac_lo=$ac_mid; break
12304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012305 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012306sed 's/^/| /' conftest.$ac_ext >&5
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 ac_hi=`expr '(' $ac_mid ')' - 1`
12309 if test $ac_mid -le $ac_hi; then
12310 ac_lo= ac_hi=
12311 break
12312 fi
12313 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012317 done
12318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012319 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012320sed 's/^/| /' conftest.$ac_ext >&5
12321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329# Binary search between lo and hi bounds.
12330while test "x$ac_lo" != "x$ac_hi"; do
12331 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12332 cat >conftest.$ac_ext <<_ACEOF
12333/* confdefs.h. */
12334_ACEOF
12335cat confdefs.h >>conftest.$ac_ext
12336cat >>conftest.$ac_ext <<_ACEOF
12337/* end confdefs.h. */
12338$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012339 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012340int
12341main ()
12342{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012344test_array [0] = 0
12345
12346 ;
12347 return 0;
12348}
12349_ACEOF
12350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351if { (ac_try="$ac_compile"
12352case "(($ac_try" in
12353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12354 *) ac_try_echo=$ac_try;;
12355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012358 ac_status=$?
12359 grep -v '^ *+' conftest.er1 >conftest.err
12360 rm -f conftest.er1
12361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 (exit $ac_status); } && {
12364 test -z "$ac_c_werror_flag" ||
12365 test ! -s conftest.err
12366 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012367 ac_hi=$ac_mid
12368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012369 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012370sed 's/^/| /' conftest.$ac_ext >&5
12371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012376done
12377case $ac_lo in
12378?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012380 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012381See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012382echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012383See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012384 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 else
12386 ac_cv_sizeof__Bool=0
12387 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012388esac
12389else
12390 cat >conftest.$ac_ext <<_ACEOF
12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
12396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012397 typedef _Bool ac__type_sizeof_;
12398static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12399static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012400#include <stdio.h>
12401#include <stdlib.h>
12402int
12403main ()
12404{
12405
12406 FILE *f = fopen ("conftest.val", "w");
12407 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012410 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012414 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012415 }
12416 else
12417 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012421 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012424
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430if { (ac_try="$ac_link"
12431case "(($ac_try" in
12432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12433 *) ac_try_echo=$ac_try;;
12434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 { (case "(($ac_try" in
12441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12442 *) ac_try_echo=$ac_try;;
12443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012446 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 (exit $ac_status); }; }; then
12449 ac_cv_sizeof__Bool=`cat conftest.val`
12450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012451 echo "$as_me: program exited with status $ac_status" >&5
12452echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
12455( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012459echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 else
12463 ac_cv_sizeof__Bool=0
12464 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -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 +000012467fi
12468rm -f conftest.val
12469fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012470{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12471echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472
12473
12474
Thomas Woutersb2137042007-02-01 18:02:27 +000012475cat >>confdefs.h <<_ACEOF
12476#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12477_ACEOF
12478
12479
12480fi
12481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12483echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012484if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012485 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012486else
12487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012493#ifdef HAVE_STDINT_H
12494 #include <stdint.h>
12495 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012497typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012501if ((ac__type_new_ *) 0)
12502 return 0;
12503if (sizeof (ac__type_new_))
12504 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
12509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510if { (ac_try="$ac_compile"
12511case "(($ac_try" in
12512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12513 *) ac_try_echo=$ac_try;;
12514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012518 grep -v '^ *+' conftest.er1 >conftest.err
12519 rm -f conftest.er1
12520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522 (exit $ac_status); } && {
12523 test -z "$ac_c_werror_flag" ||
12524 test ! -s conftest.err
12525 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012526 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012529sed 's/^/| /' conftest.$ac_ext >&5
12530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533
12534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12537echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12538if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012539
12540cat >>confdefs.h <<_ACEOF
12541#define HAVE_UINTPTR_T 1
12542_ACEOF
12543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012544{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12545echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12546if test "${ac_cv_type_uintptr_t+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12548else
12549 cat >conftest.$ac_ext <<_ACEOF
12550/* confdefs.h. */
12551_ACEOF
12552cat confdefs.h >>conftest.$ac_ext
12553cat >>conftest.$ac_ext <<_ACEOF
12554/* end confdefs.h. */
12555$ac_includes_default
12556typedef uintptr_t ac__type_new_;
12557int
12558main ()
12559{
12560if ((ac__type_new_ *) 0)
12561 return 0;
12562if (sizeof (ac__type_new_))
12563 return 0;
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
12569if { (ac_try="$ac_compile"
12570case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
12574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12575 (eval "$ac_compile") 2>conftest.er1
12576 ac_status=$?
12577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } && {
12582 test -z "$ac_c_werror_flag" ||
12583 test ! -s conftest.err
12584 } && test -s conftest.$ac_objext; then
12585 ac_cv_type_uintptr_t=yes
12586else
12587 echo "$as_me: failed program was:" >&5
12588sed 's/^/| /' conftest.$ac_ext >&5
12589
12590 ac_cv_type_uintptr_t=no
12591fi
12592
12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12594fi
12595{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12596echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598# The cast to long int works around a bug in the HP C Compiler
12599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12601# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12603echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012604if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 if test "$cross_compiling" = yes; then
12608 # Depending upon the size, compute the lo and hi bounds.
12609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012616 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012621test_array [0] = 0
12622
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628if { (ac_try="$ac_compile"
12629case "(($ac_try" in
12630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12631 *) ac_try_echo=$ac_try;;
12632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640 (exit $ac_status); } && {
12641 test -z "$ac_c_werror_flag" ||
12642 test ! -s conftest.err
12643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_lo=0 ac_mid=0
12645 while :; do
12646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* confdefs.h. */
12648_ACEOF
12649cat confdefs.h >>conftest.$ac_ext
12650cat >>conftest.$ac_ext <<_ACEOF
12651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012653 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012658test_array [0] = 0
12659
12660 ;
12661 return 0;
12662}
12663_ACEOF
12664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665if { (ac_try="$ac_compile"
12666case "(($ac_try" in
12667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12668 *) ac_try_echo=$ac_try;;
12669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012673 grep -v '^ *+' conftest.er1 >conftest.err
12674 rm -f conftest.er1
12675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677 (exit $ac_status); } && {
12678 test -z "$ac_c_werror_flag" ||
12679 test ! -s conftest.err
12680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_hi=$ac_mid; break
12682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012684sed 's/^/| /' conftest.$ac_ext >&5
12685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686 ac_lo=`expr $ac_mid + 1`
12687 if test $ac_lo -le $ac_mid; then
12688 ac_lo= ac_hi=
12689 break
12690 fi
12691 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 done
12696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012698sed 's/^/| /' conftest.$ac_ext >&5
12699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012706$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012707 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012712test_array [0] = 0
12713
12714 ;
12715 return 0;
12716}
12717_ACEOF
12718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719if { (ac_try="$ac_compile"
12720case "(($ac_try" in
12721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12722 *) ac_try_echo=$ac_try;;
12723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012727 grep -v '^ *+' conftest.er1 >conftest.err
12728 rm -f conftest.er1
12729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731 (exit $ac_status); } && {
12732 test -z "$ac_c_werror_flag" ||
12733 test ! -s conftest.err
12734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ac_hi=-1 ac_mid=-1
12736 while :; do
12737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* confdefs.h. */
12739_ACEOF
12740cat confdefs.h >>conftest.$ac_ext
12741cat >>conftest.$ac_ext <<_ACEOF
12742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012744 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012749test_array [0] = 0
12750
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756if { (ac_try="$ac_compile"
12757case "(($ac_try" in
12758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12759 *) ac_try_echo=$ac_try;;
12760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012764 grep -v '^ *+' conftest.er1 >conftest.err
12765 rm -f conftest.er1
12766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768 (exit $ac_status); } && {
12769 test -z "$ac_c_werror_flag" ||
12770 test ! -s conftest.err
12771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_lo=$ac_mid; break
12773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012775sed 's/^/| /' conftest.$ac_ext >&5
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 ac_hi=`expr '(' $ac_mid ')' - 1`
12778 if test $ac_mid -le $ac_hi; then
12779 ac_lo= ac_hi=
12780 break
12781 fi
12782 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
12785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 done
12787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012789sed 's/^/| /' conftest.$ac_ext >&5
12790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798# Binary search between lo and hi bounds.
12799while test "x$ac_lo" != "x$ac_hi"; do
12800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012808 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012813test_array [0] = 0
12814
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820if { (ac_try="$ac_compile"
12821case "(($ac_try" in
12822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12823 *) ac_try_echo=$ac_try;;
12824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828 grep -v '^ *+' conftest.er1 >conftest.err
12829 rm -f conftest.er1
12830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 (exit $ac_status); } && {
12833 test -z "$ac_c_werror_flag" ||
12834 test ! -s conftest.err
12835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_hi=$ac_mid
12837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012839sed 's/^/| /' conftest.$ac_ext >&5
12840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012845done
12846case $ac_lo in
12847?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012850See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012851echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012852See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012853 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854 else
12855 ac_cv_sizeof_uintptr_t=0
12856 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012857esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* confdefs.h. */
12861_ACEOF
12862cat confdefs.h >>conftest.$ac_ext
12863cat >>conftest.$ac_ext <<_ACEOF
12864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012866 typedef uintptr_t ac__type_sizeof_;
12867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012873{
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
12875 FILE *f = fopen ("conftest.val", "w");
12876 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012883 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 }
12885 else
12886 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012890 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
12894 ;
12895 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012896}
Martin v. Löwis11437992002-04-12 09:54:03 +000012897_ACEOF
12898rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899if { (ac_try="$ac_link"
12900case "(($ac_try" in
12901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12902 *) ac_try_echo=$ac_try;;
12903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 { (case "(($ac_try" in
12910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12911 *) ac_try_echo=$ac_try;;
12912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 (exit $ac_status); }; }; then
12918 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012920 echo "$as_me: program exited with status $ac_status" >&5
12921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012928echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012929See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012930 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 else
12932 ac_cv_sizeof_uintptr_t=0
12933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935rm -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 +000012936fi
12937rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12940echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941
12942
12943
Martin v. Löwis11437992002-04-12 09:54:03 +000012944cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012945#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012949fi
12950
Thomas Wouters89f507f2006-12-13 04:49:30 +000012951
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012952{ echo "$as_me:$LINENO: checking for off_t" >&5
12953echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12954if test "${ac_cv_type_off_t+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12956else
12957 cat >conftest.$ac_ext <<_ACEOF
12958/* confdefs.h. */
12959_ACEOF
12960cat confdefs.h >>conftest.$ac_ext
12961cat >>conftest.$ac_ext <<_ACEOF
12962/* end confdefs.h. */
12963
12964#ifdef HAVE_SYS_TYPES_H
12965#include <sys/types.h>
12966#endif
12967
12968
12969typedef off_t ac__type_new_;
12970int
12971main ()
12972{
12973if ((ac__type_new_ *) 0)
12974 return 0;
12975if (sizeof (ac__type_new_))
12976 return 0;
12977 ;
12978 return 0;
12979}
12980_ACEOF
12981rm -f conftest.$ac_objext
12982if { (ac_try="$ac_compile"
12983case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
12987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12988 (eval "$ac_compile") 2>conftest.er1
12989 ac_status=$?
12990 grep -v '^ *+' conftest.er1 >conftest.err
12991 rm -f conftest.er1
12992 cat conftest.err >&5
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); } && {
12995 test -z "$ac_c_werror_flag" ||
12996 test ! -s conftest.err
12997 } && test -s conftest.$ac_objext; then
12998 ac_cv_type_off_t=yes
12999else
13000 echo "$as_me: failed program was:" >&5
13001sed 's/^/| /' conftest.$ac_ext >&5
13002
13003 ac_cv_type_off_t=no
13004fi
13005
13006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007fi
13008{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13009echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013011# The cast to long int works around a bug in the HP C Compiler
13012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13014# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013015{ echo "$as_me:$LINENO: checking size of off_t" >&5
13016echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013017if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013018 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019else
13020 if test "$cross_compiling" = yes; then
13021 # Depending upon the size, compute the lo and hi bounds.
13022cat >conftest.$ac_ext <<_ACEOF
13023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
13028
13029#ifdef HAVE_SYS_TYPES_H
13030#include <sys/types.h>
13031#endif
13032
13033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013034 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013035int
13036main ()
13037{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013039test_array [0] = 0
13040
13041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (ac_try="$ac_compile"
13047case "(($ac_try" in
13048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13049 *) ac_try_echo=$ac_try;;
13050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013052 (eval "$ac_compile") 2>conftest.er1
13053 ac_status=$?
13054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013058 (exit $ac_status); } && {
13059 test -z "$ac_c_werror_flag" ||
13060 test ! -s conftest.err
13061 } && test -s conftest.$ac_objext; then
13062 ac_lo=0 ac_mid=0
13063 while :; do
13064 cat >conftest.$ac_ext <<_ACEOF
13065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
13070
13071#ifdef HAVE_SYS_TYPES_H
13072#include <sys/types.h>
13073#endif
13074
13075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013076 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077int
13078main ()
13079{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081test_array [0] = 0
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087rm -f conftest.$ac_objext
13088if { (ac_try="$ac_compile"
13089case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013094 (eval "$ac_compile") 2>conftest.er1
13095 ac_status=$?
13096 grep -v '^ *+' conftest.er1 >conftest.err
13097 rm -f conftest.er1
13098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100 (exit $ac_status); } && {
13101 test -z "$ac_c_werror_flag" ||
13102 test ! -s conftest.err
13103 } && test -s conftest.$ac_objext; then
13104 ac_hi=$ac_mid; break
13105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013106 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107sed 's/^/| /' conftest.$ac_ext >&5
13108
13109 ac_lo=`expr $ac_mid + 1`
13110 if test $ac_lo -le $ac_mid; then
13111 ac_lo= ac_hi=
13112 break
13113 fi
13114 ac_mid=`expr 2 '*' $ac_mid + 1`
13115fi
13116
13117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13118 done
13119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013120 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121sed 's/^/| /' conftest.$ac_ext >&5
13122
13123 cat >conftest.$ac_ext <<_ACEOF
13124/* confdefs.h. */
13125_ACEOF
13126cat confdefs.h >>conftest.$ac_ext
13127cat >>conftest.$ac_ext <<_ACEOF
13128/* end confdefs.h. */
13129
13130#ifdef HAVE_SYS_TYPES_H
13131#include <sys/types.h>
13132#endif
13133
13134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013135 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136int
13137main ()
13138{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140test_array [0] = 0
13141
13142 ;
13143 return 0;
13144}
13145_ACEOF
13146rm -f conftest.$ac_objext
13147if { (ac_try="$ac_compile"
13148case "(($ac_try" in
13149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13150 *) ac_try_echo=$ac_try;;
13151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153 (eval "$ac_compile") 2>conftest.er1
13154 ac_status=$?
13155 grep -v '^ *+' conftest.er1 >conftest.err
13156 rm -f conftest.er1
13157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159 (exit $ac_status); } && {
13160 test -z "$ac_c_werror_flag" ||
13161 test ! -s conftest.err
13162 } && test -s conftest.$ac_objext; then
13163 ac_hi=-1 ac_mid=-1
13164 while :; do
13165 cat >conftest.$ac_ext <<_ACEOF
13166/* confdefs.h. */
13167_ACEOF
13168cat confdefs.h >>conftest.$ac_ext
13169cat >>conftest.$ac_ext <<_ACEOF
13170/* end confdefs.h. */
13171
13172#ifdef HAVE_SYS_TYPES_H
13173#include <sys/types.h>
13174#endif
13175
13176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013177 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178int
13179main ()
13180{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013182test_array [0] = 0
13183
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
13189if { (ac_try="$ac_compile"
13190case "(($ac_try" in
13191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13192 *) ac_try_echo=$ac_try;;
13193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195 (eval "$ac_compile") 2>conftest.er1
13196 ac_status=$?
13197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013201 (exit $ac_status); } && {
13202 test -z "$ac_c_werror_flag" ||
13203 test ! -s conftest.err
13204 } && test -s conftest.$ac_objext; then
13205 ac_lo=$ac_mid; break
13206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013207 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208sed 's/^/| /' conftest.$ac_ext >&5
13209
13210 ac_hi=`expr '(' $ac_mid ')' - 1`
13211 if test $ac_mid -le $ac_hi; then
13212 ac_lo= ac_hi=
13213 break
13214 fi
13215 ac_mid=`expr 2 '*' $ac_mid`
13216fi
13217
13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219 done
13220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013221 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222sed 's/^/| /' conftest.$ac_ext >&5
13223
13224 ac_lo= ac_hi=
13225fi
13226
13227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228fi
13229
13230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231# Binary search between lo and hi bounds.
13232while test "x$ac_lo" != "x$ac_hi"; do
13233 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_SYS_TYPES_H
13242#include <sys/types.h>
13243#endif
13244
13245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013246 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247int
13248main ()
13249{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251test_array [0] = 0
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (ac_try="$ac_compile"
13259case "(($ac_try" in
13260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261 *) ac_try_echo=$ac_try;;
13262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264 (eval "$ac_compile") 2>conftest.er1
13265 ac_status=$?
13266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 (exit $ac_status); } && {
13271 test -z "$ac_c_werror_flag" ||
13272 test ! -s conftest.err
13273 } && test -s conftest.$ac_objext; then
13274 ac_hi=$ac_mid
13275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013276 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013277sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_lo=`expr '(' $ac_mid ')' + 1`
13280fi
13281
13282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283done
13284case $ac_lo in
13285?*) ac_cv_sizeof_off_t=$ac_lo;;
13286'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013287 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013289echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292 else
13293 ac_cv_sizeof_off_t=0
13294 fi ;;
13295esac
13296else
13297 cat >conftest.$ac_ext <<_ACEOF
13298/* confdefs.h. */
13299_ACEOF
13300cat confdefs.h >>conftest.$ac_ext
13301cat >>conftest.$ac_ext <<_ACEOF
13302/* end confdefs.h. */
13303
13304#ifdef HAVE_SYS_TYPES_H
13305#include <sys/types.h>
13306#endif
13307
13308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013309 typedef off_t ac__type_sizeof_;
13310static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13311static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013312#include <stdio.h>
13313#include <stdlib.h>
13314int
13315main ()
13316{
13317
13318 FILE *f = fopen ("conftest.val", "w");
13319 if (! f)
13320 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013321 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322 {
13323 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013324 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013326 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013327 }
13328 else
13329 {
13330 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 }
13335 return ferror (f) || fclose (f) != 0;
13336
13337 ;
13338 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013339}
Martin v. Löwis11437992002-04-12 09:54:03 +000013340_ACEOF
13341rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342if { (ac_try="$ac_link"
13343case "(($ac_try" in
13344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13345 *) ac_try_echo=$ac_try;;
13346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352 { (case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013361 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013363 echo "$as_me: program exited with status $ac_status" >&5
13364echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013365sed 's/^/| /' conftest.$ac_ext >&5
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013369 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013370See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013371echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013372See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013373 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013374 else
13375 ac_cv_sizeof_off_t=0
13376 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -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 +000013379fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013381fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013382{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13383echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385
13386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013388#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013389_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013390
Michael W. Hudson54241132001-12-07 15:38:26 +000013391
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13394echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013395if test "$have_long_long" = yes -a \
13396 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13397 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399cat >>confdefs.h <<\_ACEOF
13400#define HAVE_LARGEFILE_SUPPORT 1
13401_ACEOF
13402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 { echo "$as_me:$LINENO: result: yes" >&5
13404echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 { echo "$as_me:$LINENO: result: no" >&5
13407echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408fi
13409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013410{ echo "$as_me:$LINENO: checking for time_t" >&5
13411echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13412if test "${ac_cv_type_time_t+set}" = set; then
13413 echo $ECHO_N "(cached) $ECHO_C" >&6
13414else
13415 cat >conftest.$ac_ext <<_ACEOF
13416/* confdefs.h. */
13417_ACEOF
13418cat confdefs.h >>conftest.$ac_ext
13419cat >>conftest.$ac_ext <<_ACEOF
13420/* end confdefs.h. */
13421
13422#ifdef HAVE_SYS_TYPES_H
13423#include <sys/types.h>
13424#endif
13425#ifdef HAVE_TIME_H
13426#include <time.h>
13427#endif
13428
13429
13430typedef time_t ac__type_new_;
13431int
13432main ()
13433{
13434if ((ac__type_new_ *) 0)
13435 return 0;
13436if (sizeof (ac__type_new_))
13437 return 0;
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (ac_try="$ac_compile"
13444case "(($ac_try" in
13445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13446 *) ac_try_echo=$ac_try;;
13447esac
13448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13449 (eval "$ac_compile") 2>conftest.er1
13450 ac_status=$?
13451 grep -v '^ *+' conftest.er1 >conftest.err
13452 rm -f conftest.er1
13453 cat conftest.err >&5
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); } && {
13456 test -z "$ac_c_werror_flag" ||
13457 test ! -s conftest.err
13458 } && test -s conftest.$ac_objext; then
13459 ac_cv_type_time_t=yes
13460else
13461 echo "$as_me: failed program was:" >&5
13462sed 's/^/| /' conftest.$ac_ext >&5
13463
13464 ac_cv_type_time_t=no
13465fi
13466
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13470echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013472# The cast to long int works around a bug in the HP C Compiler
13473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13475# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476{ echo "$as_me:$LINENO: checking size of time_t" >&5
13477echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013479 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013480else
13481 if test "$cross_compiling" = yes; then
13482 # Depending upon the size, compute the lo and hi bounds.
13483cat >conftest.$ac_ext <<_ACEOF
13484/* confdefs.h. */
13485_ACEOF
13486cat confdefs.h >>conftest.$ac_ext
13487cat >>conftest.$ac_ext <<_ACEOF
13488/* end confdefs.h. */
13489
13490#ifdef HAVE_SYS_TYPES_H
13491#include <sys/types.h>
13492#endif
13493#ifdef HAVE_TIME_H
13494#include <time.h>
13495#endif
13496
13497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013498 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499int
13500main ()
13501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503test_array [0] = 0
13504
13505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext
13510if { (ac_try="$ac_compile"
13511case "(($ac_try" in
13512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13513 *) ac_try_echo=$ac_try;;
13514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516 (eval "$ac_compile") 2>conftest.er1
13517 ac_status=$?
13518 grep -v '^ *+' conftest.er1 >conftest.err
13519 rm -f conftest.er1
13520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 (exit $ac_status); } && {
13523 test -z "$ac_c_werror_flag" ||
13524 test ! -s conftest.err
13525 } && test -s conftest.$ac_objext; then
13526 ac_lo=0 ac_mid=0
13527 while :; do
13528 cat >conftest.$ac_ext <<_ACEOF
13529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
13534
13535#ifdef HAVE_SYS_TYPES_H
13536#include <sys/types.h>
13537#endif
13538#ifdef HAVE_TIME_H
13539#include <time.h>
13540#endif
13541
13542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013543 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544int
13545main ()
13546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013548test_array [0] = 0
13549
13550 ;
13551 return 0;
13552}
13553_ACEOF
13554rm -f conftest.$ac_objext
13555if { (ac_try="$ac_compile"
13556case "(($ac_try" in
13557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13558 *) ac_try_echo=$ac_try;;
13559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013561 (eval "$ac_compile") 2>conftest.er1
13562 ac_status=$?
13563 grep -v '^ *+' conftest.er1 >conftest.err
13564 rm -f conftest.er1
13565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 (exit $ac_status); } && {
13568 test -z "$ac_c_werror_flag" ||
13569 test ! -s conftest.err
13570 } && test -s conftest.$ac_objext; then
13571 ac_hi=$ac_mid; break
13572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574sed 's/^/| /' conftest.$ac_ext >&5
13575
13576 ac_lo=`expr $ac_mid + 1`
13577 if test $ac_lo -le $ac_mid; then
13578 ac_lo= ac_hi=
13579 break
13580 fi
13581 ac_mid=`expr 2 '*' $ac_mid + 1`
13582fi
13583
13584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585 done
13586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013587 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588sed 's/^/| /' conftest.$ac_ext >&5
13589
13590 cat >conftest.$ac_ext <<_ACEOF
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
13596
13597#ifdef HAVE_SYS_TYPES_H
13598#include <sys/types.h>
13599#endif
13600#ifdef HAVE_TIME_H
13601#include <time.h>
13602#endif
13603
13604
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013605 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013606int
13607main ()
13608{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013609static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610test_array [0] = 0
13611
13612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (ac_try="$ac_compile"
13618case "(($ac_try" in
13619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13620 *) ac_try_echo=$ac_try;;
13621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623 (eval "$ac_compile") 2>conftest.er1
13624 ac_status=$?
13625 grep -v '^ *+' conftest.er1 >conftest.err
13626 rm -f conftest.er1
13627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629 (exit $ac_status); } && {
13630 test -z "$ac_c_werror_flag" ||
13631 test ! -s conftest.err
13632 } && test -s conftest.$ac_objext; then
13633 ac_hi=-1 ac_mid=-1
13634 while :; do
13635 cat >conftest.$ac_ext <<_ACEOF
13636/* confdefs.h. */
13637_ACEOF
13638cat confdefs.h >>conftest.$ac_ext
13639cat >>conftest.$ac_ext <<_ACEOF
13640/* end confdefs.h. */
13641
13642#ifdef HAVE_SYS_TYPES_H
13643#include <sys/types.h>
13644#endif
13645#ifdef HAVE_TIME_H
13646#include <time.h>
13647#endif
13648
13649
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651int
13652main ()
13653{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655test_array [0] = 0
13656
13657 ;
13658 return 0;
13659}
13660_ACEOF
13661rm -f conftest.$ac_objext
13662if { (ac_try="$ac_compile"
13663case "(($ac_try" in
13664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665 *) ac_try_echo=$ac_try;;
13666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668 (eval "$ac_compile") 2>conftest.er1
13669 ac_status=$?
13670 grep -v '^ *+' conftest.er1 >conftest.err
13671 rm -f conftest.er1
13672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674 (exit $ac_status); } && {
13675 test -z "$ac_c_werror_flag" ||
13676 test ! -s conftest.err
13677 } && test -s conftest.$ac_objext; then
13678 ac_lo=$ac_mid; break
13679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681sed 's/^/| /' conftest.$ac_ext >&5
13682
13683 ac_hi=`expr '(' $ac_mid ')' - 1`
13684 if test $ac_mid -le $ac_hi; then
13685 ac_lo= ac_hi=
13686 break
13687 fi
13688 ac_mid=`expr 2 '*' $ac_mid`
13689fi
13690
13691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13692 done
13693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013694 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695sed 's/^/| /' conftest.$ac_ext >&5
13696
13697 ac_lo= ac_hi=
13698fi
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701fi
13702
13703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704# Binary search between lo and hi bounds.
13705while test "x$ac_lo" != "x$ac_hi"; do
13706 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13707 cat >conftest.$ac_ext <<_ACEOF
13708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
13713
13714#ifdef HAVE_SYS_TYPES_H
13715#include <sys/types.h>
13716#endif
13717#ifdef HAVE_TIME_H
13718#include <time.h>
13719#endif
13720
13721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013722 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013723int
13724main ()
13725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013727test_array [0] = 0
13728
13729 ;
13730 return 0;
13731}
13732_ACEOF
13733rm -f conftest.$ac_objext
13734if { (ac_try="$ac_compile"
13735case "(($ac_try" in
13736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13737 *) ac_try_echo=$ac_try;;
13738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740 (eval "$ac_compile") 2>conftest.er1
13741 ac_status=$?
13742 grep -v '^ *+' conftest.er1 >conftest.err
13743 rm -f conftest.er1
13744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746 (exit $ac_status); } && {
13747 test -z "$ac_c_werror_flag" ||
13748 test ! -s conftest.err
13749 } && test -s conftest.$ac_objext; then
13750 ac_hi=$ac_mid
13751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013752 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
13755 ac_lo=`expr '(' $ac_mid ')' + 1`
13756fi
13757
13758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759done
13760case $ac_lo in
13761?*) ac_cv_sizeof_time_t=$ac_lo;;
13762'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013765echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013766See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013767 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768 else
13769 ac_cv_sizeof_time_t=0
13770 fi ;;
13771esac
13772else
13773 cat >conftest.$ac_ext <<_ACEOF
13774/* confdefs.h. */
13775_ACEOF
13776cat confdefs.h >>conftest.$ac_ext
13777cat >>conftest.$ac_ext <<_ACEOF
13778/* end confdefs.h. */
13779
13780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
13783#ifdef HAVE_TIME_H
13784#include <time.h>
13785#endif
13786
13787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013788 typedef time_t ac__type_sizeof_;
13789static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13790static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013791#include <stdio.h>
13792#include <stdlib.h>
13793int
13794main ()
13795{
13796
13797 FILE *f = fopen ("conftest.val", "w");
13798 if (! f)
13799 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013800 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801 {
13802 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013803 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013805 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013806 }
13807 else
13808 {
13809 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013810 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813 }
13814 return ferror (f) || fclose (f) != 0;
13815
13816 ;
13817 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013818}
Martin v. Löwis11437992002-04-12 09:54:03 +000013819_ACEOF
13820rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821if { (ac_try="$ac_link"
13822case "(($ac_try" in
13823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13824 *) ac_try_echo=$ac_try;;
13825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 { (case "(($ac_try" in
13832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13833 *) ac_try_echo=$ac_try;;
13834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 echo "$as_me: program exited with status $ac_status" >&5
13843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013844sed 's/^/| /' conftest.$ac_ext >&5
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013847if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013850echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853 else
13854 ac_cv_sizeof_time_t=0
13855 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857rm -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 +000013858fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13862echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013864
13865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013867#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013868_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013869
Michael W. Hudson54241132001-12-07 15:38:26 +000013870
13871
Trent Mick635f6fb2000-08-23 21:33:05 +000013872# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013873ac_save_cc="$CC"
13874if test "$ac_cv_kpthread" = "yes"
13875then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013876elif test "$ac_cv_kthread" = "yes"
13877then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013878elif test "$ac_cv_pthread" = "yes"
13879then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013880fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013882{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13883echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013884have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013886/* confdefs.h. */
13887_ACEOF
13888cat confdefs.h >>conftest.$ac_ext
13889cat >>conftest.$ac_ext <<_ACEOF
13890/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013891#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013892int
13893main ()
13894{
Guido van Rossum12580492000-09-24 16:47:19 +000013895pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;
13897 return 0;
13898}
13899_ACEOF
13900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901if { (ac_try="$ac_compile"
13902case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013909 grep -v '^ *+' conftest.er1 >conftest.err
13910 rm -f conftest.er1
13911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (exit $ac_status); } && {
13914 test -z "$ac_c_werror_flag" ||
13915 test ! -s conftest.err
13916 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013917 have_pthread_t=yes
13918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013920sed 's/^/| /' conftest.$ac_ext >&5
13921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922
Trent Mick635f6fb2000-08-23 21:33:05 +000013923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924
13925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013926{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13927echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013928if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13930echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13931if test "${ac_cv_type_pthread_t+set}" = set; then
13932 echo $ECHO_N "(cached) $ECHO_C" >&6
13933else
13934 cat >conftest.$ac_ext <<_ACEOF
13935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
13940
13941#ifdef HAVE_PTHREAD_H
13942#include <pthread.h>
13943#endif
13944
13945
13946typedef pthread_t ac__type_new_;
13947int
13948main ()
13949{
13950if ((ac__type_new_ *) 0)
13951 return 0;
13952if (sizeof (ac__type_new_))
13953 return 0;
13954 ;
13955 return 0;
13956}
13957_ACEOF
13958rm -f conftest.$ac_objext
13959if { (ac_try="$ac_compile"
13960case "(($ac_try" in
13961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13962 *) ac_try_echo=$ac_try;;
13963esac
13964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13965 (eval "$ac_compile") 2>conftest.er1
13966 ac_status=$?
13967 grep -v '^ *+' conftest.er1 >conftest.err
13968 rm -f conftest.er1
13969 cat conftest.err >&5
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); } && {
13972 test -z "$ac_c_werror_flag" ||
13973 test ! -s conftest.err
13974 } && test -s conftest.$ac_objext; then
13975 ac_cv_type_pthread_t=yes
13976else
13977 echo "$as_me: failed program was:" >&5
13978sed 's/^/| /' conftest.$ac_ext >&5
13979
13980 ac_cv_type_pthread_t=no
13981fi
13982
13983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13984fi
13985{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13986echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13987
13988# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13991# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013992{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13993echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013995 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013996else
13997 if test "$cross_compiling" = yes; then
13998 # Depending upon the size, compute the lo and hi bounds.
13999cat >conftest.$ac_ext <<_ACEOF
14000/* confdefs.h. */
14001_ACEOF
14002cat confdefs.h >>conftest.$ac_ext
14003cat >>conftest.$ac_ext <<_ACEOF
14004/* end confdefs.h. */
14005
14006#ifdef HAVE_PTHREAD_H
14007#include <pthread.h>
14008#endif
14009
14010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014011 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014012int
14013main ()
14014{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016test_array [0] = 0
14017
14018 ;
14019 return 0;
14020}
14021_ACEOF
14022rm -f conftest.$ac_objext
14023if { (ac_try="$ac_compile"
14024case "(($ac_try" in
14025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14026 *) ac_try_echo=$ac_try;;
14027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029 (eval "$ac_compile") 2>conftest.er1
14030 ac_status=$?
14031 grep -v '^ *+' conftest.er1 >conftest.err
14032 rm -f conftest.er1
14033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 (exit $ac_status); } && {
14036 test -z "$ac_c_werror_flag" ||
14037 test ! -s conftest.err
14038 } && test -s conftest.$ac_objext; then
14039 ac_lo=0 ac_mid=0
14040 while :; do
14041 cat >conftest.$ac_ext <<_ACEOF
14042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
14047
14048#ifdef HAVE_PTHREAD_H
14049#include <pthread.h>
14050#endif
14051
14052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014053 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014054int
14055main ()
14056{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014058test_array [0] = 0
14059
14060 ;
14061 return 0;
14062}
14063_ACEOF
14064rm -f conftest.$ac_objext
14065if { (ac_try="$ac_compile"
14066case "(($ac_try" in
14067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14068 *) ac_try_echo=$ac_try;;
14069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071 (eval "$ac_compile") 2>conftest.er1
14072 ac_status=$?
14073 grep -v '^ *+' conftest.er1 >conftest.err
14074 rm -f conftest.er1
14075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 (exit $ac_status); } && {
14078 test -z "$ac_c_werror_flag" ||
14079 test ! -s conftest.err
14080 } && test -s conftest.$ac_objext; then
14081 ac_hi=$ac_mid; break
14082else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014083 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014084sed 's/^/| /' conftest.$ac_ext >&5
14085
14086 ac_lo=`expr $ac_mid + 1`
14087 if test $ac_lo -le $ac_mid; then
14088 ac_lo= ac_hi=
14089 break
14090 fi
14091 ac_mid=`expr 2 '*' $ac_mid + 1`
14092fi
14093
14094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14095 done
14096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014097 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014098sed 's/^/| /' conftest.$ac_ext >&5
14099
14100 cat >conftest.$ac_ext <<_ACEOF
14101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
14106
14107#ifdef HAVE_PTHREAD_H
14108#include <pthread.h>
14109#endif
14110
14111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014112 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014113int
14114main ()
14115{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117test_array [0] = 0
14118
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext
14124if { (ac_try="$ac_compile"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130 (eval "$ac_compile") 2>conftest.er1
14131 ac_status=$?
14132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 } && test -s conftest.$ac_objext; then
14140 ac_hi=-1 ac_mid=-1
14141 while :; do
14142 cat >conftest.$ac_ext <<_ACEOF
14143/* confdefs.h. */
14144_ACEOF
14145cat confdefs.h >>conftest.$ac_ext
14146cat >>conftest.$ac_ext <<_ACEOF
14147/* end confdefs.h. */
14148
14149#ifdef HAVE_PTHREAD_H
14150#include <pthread.h>
14151#endif
14152
14153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014154 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014155int
14156main ()
14157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159test_array [0] = 0
14160
14161 ;
14162 return 0;
14163}
14164_ACEOF
14165rm -f conftest.$ac_objext
14166if { (ac_try="$ac_compile"
14167case "(($ac_try" in
14168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14169 *) ac_try_echo=$ac_try;;
14170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172 (eval "$ac_compile") 2>conftest.er1
14173 ac_status=$?
14174 grep -v '^ *+' conftest.er1 >conftest.err
14175 rm -f conftest.er1
14176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 (exit $ac_status); } && {
14179 test -z "$ac_c_werror_flag" ||
14180 test ! -s conftest.err
14181 } && test -s conftest.$ac_objext; then
14182 ac_lo=$ac_mid; break
14183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014184 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014185sed 's/^/| /' conftest.$ac_ext >&5
14186
14187 ac_hi=`expr '(' $ac_mid ')' - 1`
14188 if test $ac_mid -le $ac_hi; then
14189 ac_lo= ac_hi=
14190 break
14191 fi
14192 ac_mid=`expr 2 '*' $ac_mid`
14193fi
14194
14195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14196 done
14197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014198 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199sed 's/^/| /' conftest.$ac_ext >&5
14200
14201 ac_lo= ac_hi=
14202fi
14203
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205fi
14206
14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208# Binary search between lo and hi bounds.
14209while test "x$ac_lo" != "x$ac_hi"; do
14210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14211 cat >conftest.$ac_ext <<_ACEOF
14212/* confdefs.h. */
14213_ACEOF
14214cat confdefs.h >>conftest.$ac_ext
14215cat >>conftest.$ac_ext <<_ACEOF
14216/* end confdefs.h. */
14217
14218#ifdef HAVE_PTHREAD_H
14219#include <pthread.h>
14220#endif
14221
14222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014223 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014224int
14225main ()
14226{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014228test_array [0] = 0
14229
14230 ;
14231 return 0;
14232}
14233_ACEOF
14234rm -f conftest.$ac_objext
14235if { (ac_try="$ac_compile"
14236case "(($ac_try" in
14237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14238 *) ac_try_echo=$ac_try;;
14239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241 (eval "$ac_compile") 2>conftest.er1
14242 ac_status=$?
14243 grep -v '^ *+' conftest.er1 >conftest.err
14244 rm -f conftest.er1
14245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (exit $ac_status); } && {
14248 test -z "$ac_c_werror_flag" ||
14249 test ! -s conftest.err
14250 } && test -s conftest.$ac_objext; then
14251 ac_hi=$ac_mid
14252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014253 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014254sed 's/^/| /' conftest.$ac_ext >&5
14255
14256 ac_lo=`expr '(' $ac_mid ')' + 1`
14257fi
14258
14259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260done
14261case $ac_lo in
14262?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14263'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014266echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014268 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269 else
14270 ac_cv_sizeof_pthread_t=0
14271 fi ;;
14272esac
14273else
14274 cat >conftest.$ac_ext <<_ACEOF
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
14280
14281#ifdef HAVE_PTHREAD_H
14282#include <pthread.h>
14283#endif
14284
14285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014286 typedef pthread_t ac__type_sizeof_;
14287static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14288static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289#include <stdio.h>
14290#include <stdlib.h>
14291int
14292main ()
14293{
14294
14295 FILE *f = fopen ("conftest.val", "w");
14296 if (! f)
14297 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299 {
14300 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014303 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304 }
14305 else
14306 {
14307 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014308 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014309 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014310 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311 }
14312 return ferror (f) || fclose (f) != 0;
14313
14314 ;
14315 return 0;
14316}
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
14318rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319if { (ac_try="$ac_link"
14320case "(($ac_try" in
14321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14322 *) ac_try_echo=$ac_try;;
14323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 { (case "(($ac_try" in
14330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14331 *) ac_try_echo=$ac_try;;
14332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014340 echo "$as_me: program exited with status $ac_status" >&5
14341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014342sed 's/^/| /' conftest.$ac_ext >&5
14343
Martin v. Löwis11437992002-04-12 09:54:03 +000014344( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014345if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014347See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014348echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351 else
14352 ac_cv_sizeof_pthread_t=0
14353 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355rm -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 +000014356fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14360echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368
Trent Mick635f6fb2000-08-23 21:33:05 +000014369fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014370CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014371
Michael W. Hudson54241132001-12-07 15:38:26 +000014372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014374 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014375 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14376 ;;
14377 Darwin/*)
14378 OTHER_LIBTOOL_OPT=""
14379 ;;
14380esac
14381
14382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014383ARCH_RUN_32BIT=""
14384
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014385case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014386 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014387 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14388 if test "${enable_universalsdk}"; then
14389 :
14390 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014391 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014392 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014395 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014396 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14397 if test ${gcc_version} '<' 4.0
14398 then
14399 LIBTOOL_CRUFT="-lcc_dynamic"
14400 else
14401 LIBTOOL_CRUFT=""
14402 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014403 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014404 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014405else
14406 cat >conftest.$ac_ext <<_ACEOF
14407/* confdefs.h. */
14408_ACEOF
14409cat confdefs.h >>conftest.$ac_ext
14410cat >>conftest.$ac_ext <<_ACEOF
14411/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014412
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014413 #include <unistd.h>
14414 int main(int argc, char*argv[])
14415 {
14416 if (sizeof(long) == 4) {
14417 return 0;
14418 } else {
14419 return 1;
14420 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014421 }
14422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014423_ACEOF
14424rm -f conftest$ac_exeext
14425if { (ac_try="$ac_link"
14426case "(($ac_try" in
14427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14428 *) ac_try_echo=$ac_try;;
14429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014431 (eval "$ac_link") 2>&5
14432 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14435 { (case "(($ac_try" in
14436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14437 *) ac_try_echo=$ac_try;;
14438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (eval "$ac_try") 2>&5
14441 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014443 (exit $ac_status); }; }; then
14444 ac_osx_32bit=yes
14445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014446 echo "$as_me: program exited with status $ac_status" >&5
14447echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014448sed 's/^/| /' conftest.$ac_ext >&5
14449
14450( exit $ac_status )
14451ac_osx_32bit=no
14452fi
14453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14454fi
14455
14456
14457
14458 if test "${ac_osx_32bit}" = "yes"; then
14459 case `arch` in
14460 i386)
14461 MACOSX_DEFAULT_ARCH="i386"
14462 ;;
14463 ppc)
14464 MACOSX_DEFAULT_ARCH="ppc"
14465 ;;
14466 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014467 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14468echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014469 { (exit 1); exit 1; }; }
14470 ;;
14471 esac
14472 else
14473 case `arch` in
14474 i386)
14475 MACOSX_DEFAULT_ARCH="x86_64"
14476 ;;
14477 ppc)
14478 MACOSX_DEFAULT_ARCH="ppc64"
14479 ;;
14480 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014481 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14482echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014483 { (exit 1); exit 1; }; }
14484 ;;
14485 esac
14486
14487 #ARCH_RUN_32BIT="true"
14488 fi
14489
14490 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014492 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014493esac
14494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014495{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14496echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014497if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014498then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014499 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014501 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503cat >>confdefs.h <<\_ACEOF
14504#define WITH_NEXT_FRAMEWORK 1
14505_ACEOF
14506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014507 { echo "$as_me:$LINENO: result: yes" >&5
14508echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014509 if test $enable_shared = "yes"
14510 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014511 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14512echo "$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 +000014513 { (exit 1); exit 1; }; }
14514 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014516 { echo "$as_me:$LINENO: result: no" >&5
14517echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014518fi
14519
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520{ echo "$as_me:$LINENO: checking for dyld" >&5
14521echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014522case $ac_sys_system/$ac_sys_release in
14523 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524
Martin v. Löwis11437992002-04-12 09:54:03 +000014525cat >>confdefs.h <<\_ACEOF
14526#define WITH_DYLD 1
14527_ACEOF
14528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014529 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14530echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014531 ;;
14532 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014533 { echo "$as_me:$LINENO: result: no" >&5
14534echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014535 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014536esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014537
Guido van Rossum0a516c91994-09-12 10:58:40 +000014538# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014539
Michael W. Hudson54241132001-12-07 15:38:26 +000014540
14541
14542
14543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014545# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014546{ echo "$as_me:$LINENO: checking SO" >&5
14547echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548if test -z "$SO"
14549then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014551 hp*|HP*)
14552 case `uname -m` in
14553 ia64) SO=.so;;
14554 *) SO=.sl;;
14555 esac
14556 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014557 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014558 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014559 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014560else
14561 # this might also be a termcap variable, see #610332
14562 echo
14563 echo '====================================================================='
14564 echo '+ +'
14565 echo '+ WARNING: You have set SO in your environment. +'
14566 echo '+ Do you really mean to change the extension for shared libraries? +'
14567 echo '+ Continuing in 10 seconds to let you to ponder. +'
14568 echo '+ +'
14569 echo '====================================================================='
14570 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014572{ echo "$as_me:$LINENO: result: $SO" >&5
14573echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014574
Georg Brandlb1441c72009-01-03 22:33:39 +000014575
Thomas Wouters477c8d52006-05-27 19:21:47 +000014576cat >>confdefs.h <<_ACEOF
14577#define SHLIB_EXT "$SO"
14578_ACEOF
14579
Guido van Rossum0a516c91994-09-12 10:58:40 +000014580# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014581# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014582# (Shared libraries in this instance are shared modules to be loaded into
14583# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014584{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14585echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586if test -z "$LDSHARED"
14587then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014588 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014589 AIX*)
14590 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014591 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014592 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014593 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014594 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014596 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014597 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014598 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014599 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014600 hp*|HP*)
14601 if test "$GCC" = "yes"
14602 then LDSHARED='$(CC) -shared'
14603 else LDSHARED='ld -b';
14604 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014605 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014606 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014607 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14608 if test "$enable_framework" ; then
14609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014612 else
14613 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014614 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014615 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014616 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014617 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14618 if test "$enable_framework" ; then
14619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014622 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014623 # No framework, use the Python app as bundle-loader
14624 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014625 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014627 Darwin/*)
14628 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14629 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014630
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014631 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014632 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014633 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014634 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014635 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14637 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014638 else
14639 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14640 if test "$enable_framework" ; then
14641 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014642 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14643 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 else
14645 # No framework, use the Python app as bundle-loader
14646 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14647 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14648 fi
14649 fi
14650 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014651 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014652 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014653 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014654 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014655 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014656 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014657 else
14658 LDSHARED="ld -Bshareable ${LDFLAGS}"
14659 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014660 OpenBSD*)
14661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14662 then
14663 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14664 else
14665 case `uname -r` in
14666 [01].* | 2.[0-7] | 2.[0-7].*)
14667 LDSHARED="ld -Bshareable ${LDFLAGS}"
14668 ;;
14669 *)
14670 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14671 ;;
14672 esac
14673 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014674 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014675 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014676 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014677 then LDSHARED='$(CC) -shared'
14678 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014679 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014680 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014681 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014682 *) LDSHARED="ld";;
14683 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014685{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14686echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014687BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014689# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014690{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14691echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692if test -z "$CCSHARED"
14693then
Guido van Rossum07397971997-04-29 21:49:50 +000014694 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014695 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014696 then CCSHARED="-fPIC";
14697 elif test `uname -p` = sparc;
14698 then CCSHARED="-xcode=pic32";
14699 else CCSHARED="-Kpic";
14700 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014701 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014702 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014703 else CCSHARED="+z";
14704 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014706 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014708 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014709 if test "$GCC" = "yes"
14710 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014711 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014712 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014713 SCO_SV*)
14714 if test "$GCC" = "yes"
14715 then CCSHARED="-fPIC"
14716 else CCSHARED="-Kpic -belf"
14717 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014718 IRIX*/6*) case $CC in
14719 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014720 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014721 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014724{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14725echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014726# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014727# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014728{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14729echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730if test -z "$LINKFORSHARED"
14731then
Guido van Rossum07397971997-04-29 21:49:50 +000014732 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014733 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014734 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014735 LINKFORSHARED="-Wl,-E -Wl,+s";;
14736# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014737 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014738 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014741 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014742 if test "$enable_framework"
14743 then
Jack Jansenda49e192005-01-07 13:08:22 +000014744 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014745 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014746 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014747 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014748 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014749 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014750 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014751 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14752 then
14753 LINKFORSHARED="-Wl,--export-dynamic"
14754 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014755 SunOS/5*) case $CC in
14756 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014757 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014758 then
14759 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014760 fi;;
14761 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014762 CYGWIN*)
14763 if test $enable_shared = "no"
14764 then
14765 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14766 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014767 QNX*)
14768 # -Wl,-E causes the symbols to be added to the dynamic
14769 # symbol table so that they can be found when a module
14770 # is loaded. -N 2048K causes the stack size to be set
14771 # to 2048 kilobytes so that the stack doesn't overflow
14772 # when running test_compile.py.
14773 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014776{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14777echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014778
Michael W. Hudson54241132001-12-07 15:38:26 +000014779
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014781{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14782echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014783if test ! "$LIBRARY" = "$LDLIBRARY"
14784then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014785 case $ac_sys_system in
14786 CYGWIN*)
14787 # Cygwin needs CCSHARED when building extension DLLs
14788 # but not when building the interpreter DLL.
14789 CFLAGSFORSHARED='';;
14790 *)
14791 CFLAGSFORSHARED='$(CCSHARED)'
14792 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014794{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14795echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014796
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014797# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14798# library (with --enable-shared).
14799# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014800# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14801# if it is not required, since it creates a dependency of the shared library
14802# to LIBS. This, in turn, means that applications linking the shared libpython
14803# don't need to link LIBS explicitly. The default should be only changed
14804# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014805
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014806{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14807echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014809 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014810 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14813echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814
14815
Guido van Rossum627b2d71993-12-24 10:39:16 +000014816# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14819echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014820if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014824LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* confdefs.h. */
14827_ACEOF
14828cat confdefs.h >>conftest.$ac_ext
14829cat >>conftest.$ac_ext <<_ACEOF
14830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832/* Override any GCC internal prototype to avoid an error.
14833 Use char because int might match the return type of a GCC
14834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014835#ifdef __cplusplus
14836extern "C"
14837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014838char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014839int
14840main ()
14841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848if { (ac_try="$ac_link"
14849case "(($ac_try" in
14850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14851 *) ac_try_echo=$ac_try;;
14852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 grep -v '^ *+' conftest.er1 >conftest.err
14857 rm -f conftest.er1
14858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 (exit $ac_status); } && {
14861 test -z "$ac_c_werror_flag" ||
14862 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014863 } && test -s conftest$ac_exeext &&
14864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014868sed 's/^/| /' conftest.$ac_ext >&5
14869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872
14873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014875LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014876fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014877{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14878echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14879if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 cat >>confdefs.h <<_ACEOF
14881#define HAVE_LIBDL 1
14882_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014883
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014884 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014886fi
14887 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14890echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014891if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893else
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014895LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* confdefs.h. */
14898_ACEOF
14899cat confdefs.h >>conftest.$ac_ext
14900cat >>conftest.$ac_ext <<_ACEOF
14901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903/* Override any GCC internal prototype to avoid an error.
14904 Use char because int might match the return type of a GCC
14905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#ifdef __cplusplus
14907extern "C"
14908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014909char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ;
14915 return 0;
14916}
14917_ACEOF
14918rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919if { (ac_try="$ac_link"
14920case "(($ac_try" in
14921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14922 *) ac_try_echo=$ac_try;;
14923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014927 grep -v '^ *+' conftest.er1 >conftest.err
14928 rm -f conftest.er1
14929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (exit $ac_status); } && {
14932 test -z "$ac_c_werror_flag" ||
14933 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 } && test -s conftest$ac_exeext &&
14935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014939sed 's/^/| /' conftest.$ac_ext >&5
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943
14944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014948{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14949echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14950if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 cat >>confdefs.h <<_ACEOF
14952#define HAVE_LIBDLD 1
14953_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014955 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957fi
14958 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014959
Georg Brandlb1441c72009-01-03 22:33:39 +000014960# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014961if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14963echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014964if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014966else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014967 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* confdefs.h. */
14970_ACEOF
14971cat confdefs.h >>conftest.$ac_ext
14972cat >>conftest.$ac_ext <<_ACEOF
14973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975/* Override any GCC internal prototype to avoid an error.
14976 Use char because int might match the return type of a GCC
14977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014978#ifdef __cplusplus
14979extern "C"
14980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014981char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014982int
14983main ()
14984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 ;
14987 return 0;
14988}
14989_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990for ac_lib in '' pthread rt posix4; do
14991 if test -z "$ac_lib"; then
14992 ac_res="none required"
14993 else
14994 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 fi
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998if { (ac_try="$ac_link"
14999case "(($ac_try" in
15000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15001 *) ac_try_echo=$ac_try;;
15002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015005 ac_status=$?
15006 grep -v '^ *+' conftest.er1 >conftest.err
15007 rm -f conftest.er1
15008 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 (exit $ac_status); } && {
15011 test -z "$ac_c_werror_flag" ||
15012 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 } && test -s conftest$ac_exeext &&
15014 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015017 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015018sed 's/^/| /' conftest.$ac_ext >&5
15019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020
Thomas Wouters477c8d52006-05-27 19:21:47 +000015021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
15023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15024 conftest$ac_exeext
15025 if test "${ac_cv_search_sem_init+set}" = set; then
15026 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028done
15029if test "${ac_cv_search_sem_init+set}" = set; then
15030 :
15031else
15032 ac_cv_search_sem_init=no
15033fi
15034rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015035LIBS=$ac_func_search_save_LIBS
15036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015037{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15038echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039ac_res=$ac_cv_search_sem_init
15040if test "$ac_res" != no; then
15041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015042
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015043fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015044 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015045 # posix4 on Solaris 2.6
15046 # pthread (first!) on Linux
15047fi
15048
Martin v. Löwis19d17342003-06-14 21:03:05 +000015049# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015050{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15051echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015052if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015054else
15055 ac_check_lib_save_LIBS=$LIBS
15056LIBS="-lintl $LIBS"
15057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015058/* confdefs.h. */
15059_ACEOF
15060cat confdefs.h >>conftest.$ac_ext
15061cat >>conftest.$ac_ext <<_ACEOF
15062/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064/* Override any GCC internal prototype to avoid an error.
15065 Use char because int might match the return type of a GCC
15066 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015067#ifdef __cplusplus
15068extern "C"
15069#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015070char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071int
15072main ()
15073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080if { (ac_try="$ac_link"
15081case "(($ac_try" in
15082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083 *) ac_try_echo=$ac_try;;
15084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 grep -v '^ *+' conftest.er1 >conftest.err
15089 rm -f conftest.er1
15090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 (exit $ac_status); } && {
15093 test -z "$ac_c_werror_flag" ||
15094 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095 } && test -s conftest$ac_exeext &&
15096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097 ac_cv_lib_intl_textdomain=yes
15098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015100sed 's/^/| /' conftest.$ac_ext >&5
15101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104
15105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015107LIBS=$ac_check_lib_save_LIBS
15108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015109{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15110echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15111if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015112
15113cat >>confdefs.h <<\_ACEOF
15114#define WITH_LIBINTL 1
15115_ACEOF
15116
Brett Cannonc6d936e2009-06-07 20:09:53 +000015117 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118fi
15119
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015120
15121# checks for system dependent C++ extensions support
15122case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015123 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15124echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* confdefs.h. */
15127_ACEOF
15128cat confdefs.h >>conftest.$ac_ext
15129cat >>conftest.$ac_ext <<_ACEOF
15130/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015131#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015132int
15133main ()
15134{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015135loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159cat >>confdefs.h <<\_ACEOF
15160#define AIX_GENUINE_CPLUSPLUS 1
15161_ACEOF
15162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015163 { echo "$as_me:$LINENO: result: yes" >&5
15164echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015167sed 's/^/| /' conftest.$ac_ext >&5
15168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015169 { echo "$as_me:$LINENO: result: no" >&5
15170echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172
15173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015175 *) ;;
15176esac
15177
Guido van Rossum70c7f481998-03-26 18:44:10 +000015178# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15180echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015181if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015185LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
15195 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015196#ifdef __cplusplus
15197extern "C"
15198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015200int
15201main ()
15202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
15208rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209if { (ac_try="$ac_link"
15210case "(($ac_try" in
15211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15212 *) ac_try_echo=$ac_try;;
15213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 grep -v '^ *+' conftest.er1 >conftest.err
15218 rm -f conftest.er1
15219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 (exit $ac_status); } && {
15222 test -z "$ac_c_werror_flag" ||
15223 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224 } && test -s conftest$ac_exeext &&
15225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015229sed 's/^/| /' conftest.$ac_ext >&5
15230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015236LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15239echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15240if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015242fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015243 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15245echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015246if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015248else
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015250LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* confdefs.h. */
15253_ACEOF
15254cat confdefs.h >>conftest.$ac_ext
15255cat >>conftest.$ac_ext <<_ACEOF
15256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258/* Override any GCC internal prototype to avoid an error.
15259 Use char because int might match the return type of a GCC
15260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261#ifdef __cplusplus
15262extern "C"
15263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015264char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ;
15270 return 0;
15271}
15272_ACEOF
15273rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274if { (ac_try="$ac_link"
15275case "(($ac_try" in
15276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15277 *) ac_try_echo=$ac_try;;
15278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015282 grep -v '^ *+' conftest.er1 >conftest.err
15283 rm -f conftest.er1
15284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (exit $ac_status); } && {
15287 test -z "$ac_c_werror_flag" ||
15288 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 } && test -s conftest$ac_exeext &&
15290 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015294sed 's/^/| /' conftest.$ac_ext >&5
15295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298
15299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015301LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015302fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15304echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15305if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015306 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015307fi
15308 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015310{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15311echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015314if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316{ echo "$as_me:$LINENO: result: $withval" >&5
15317echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015318LIBS="$withval $LIBS"
15319
15320else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015321 { echo "$as_me:$LINENO: result: no" >&5
15322echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323fi
15324
Guido van Rossum7f43da71994-08-01 12:15:30 +000015325
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015326# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015327{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15328echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015331if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 withval=$with_system_ffi;
15333fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015334
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015336{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15337echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338
Matthias Klose55708cc2009-04-30 08:06:49 +000015339# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015340{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15341echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015342
15343# Check whether --with-dbmliborder was given.
15344if test "${with_dbmliborder+set}" = set; then
15345 withval=$with_dbmliborder;
15346if test x$with_dbmliborder = xyes
15347then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015348{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15349echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015350 { (exit 1); exit 1; }; }
15351else
15352 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15353 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15354 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015355 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15356echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015357 { (exit 1); exit 1; }; }
15358 fi
15359 done
15360fi
15361fi
15362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015363{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15364echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015365
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015366# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015367
15368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015369{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15370echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015373if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374 withval=$with_signal_module;
15375fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015376
15377
15378if test -z "$with_signal_module"
15379then with_signal_module="yes"
15380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015381{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15382echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015383
15384if test "${with_signal_module}" = "yes"; then
15385 USE_SIGNAL_MODULE=""
15386 SIGNAL_OBJS=""
15387else
15388 USE_SIGNAL_MODULE="#"
15389 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15390fi
15391
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015392# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015393
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015394USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015396{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15397echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Guido van Rossumec2f0731997-01-22 20:54:01 +000015399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015401if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015403{ echo "$as_me:$LINENO: result: $withval" >&5
15404echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015405LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015406if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015407 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015408fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015410 { echo "$as_me:$LINENO: result: no" >&5
15411echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412fi
15413
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
15415# Templates for things AC_DEFINEd more than once.
15416# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015417
15418
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
15420
15421
15422
15423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015424{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15425echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 withval=$with_threads;
15430fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015431
15432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015433# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015436if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 withval=$with_thread; with_threads=$with_thread
15438fi
15439
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015440
15441if test -z "$with_threads"
15442then with_threads="yes"
15443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015444{ echo "$as_me:$LINENO: result: $with_threads" >&5
15445echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015446
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015447
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015448if test "$with_threads" = "no"
15449then
15450 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015451elif test "$ac_cv_pthread_is_default" = yes
15452then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015454#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015456
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015457 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015459#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015460_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015461
15462 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015464elif test "$ac_cv_kpthread" = "yes"
15465then
15466 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015467 if test "$ac_cv_cxx_thread" = "yes"; then
15468 CXX="$CXX -Kpthread"
15469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015471#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015474 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015475 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015476elif test "$ac_cv_kthread" = "yes"
15477then
15478 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015479 if test "$ac_cv_cxx_thread" = "yes"; then
15480 CXX="$CXX -Kthread"
15481 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015482 cat >>confdefs.h <<\_ACEOF
15483#define WITH_THREAD 1
15484_ACEOF
15485
15486 posix_threads=yes
15487 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015488elif test "$ac_cv_pthread" = "yes"
15489then
15490 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015491 if test "$ac_cv_cxx_thread" = "yes"; then
15492 CXX="$CXX -pthread"
15493 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015494 cat >>confdefs.h <<\_ACEOF
15495#define WITH_THREAD 1
15496_ACEOF
15497
15498 posix_threads=yes
15499 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015500else
15501 if test ! -z "$with_threads" -a -d "$with_threads"
15502 then LDFLAGS="$LDFLAGS -L$with_threads"
15503 fi
15504 if test ! -z "$withval" -a -d "$withval"
15505 then LDFLAGS="$LDFLAGS -L$withval"
15506 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015507
15508 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015509 # define _POSIX_THREADS in unistd.h. Some apparently don't
15510 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015511 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15512echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* confdefs.h. */
15515_ACEOF
15516cat confdefs.h >>conftest.$ac_ext
15517cat >>conftest.$ac_ext <<_ACEOF
15518/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015519
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015520#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015521#ifdef _POSIX_THREADS
15522yes
15523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
15525_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015527 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015528 unistd_defines_pthreads=yes
15529else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015530 unistd_defines_pthreads=no
15531fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000015532rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015533
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015534 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15535echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015538#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015539_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015542 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15543echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015544if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015549else
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15552echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015554/* confdefs.h. */
15555_ACEOF
15556cat confdefs.h >>conftest.$ac_ext
15557cat >>conftest.$ac_ext <<_ACEOF
15558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015559$ac_includes_default
15560#include <cthreads.h>
15561_ACEOF
15562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563if { (ac_try="$ac_compile"
15564case "(($ac_try" in
15565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15566 *) ac_try_echo=$ac_try;;
15567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015571 grep -v '^ *+' conftest.er1 >conftest.err
15572 rm -f conftest.er1
15573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 (exit $ac_status); } && {
15576 test -z "$ac_c_werror_flag" ||
15577 test ! -s conftest.err
15578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_header_compiler=yes
15580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015582sed 's/^/| /' conftest.$ac_ext >&5
15583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586
15587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015588{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15589echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
15591# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015592{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15593echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015595/* confdefs.h. */
15596_ACEOF
15597cat confdefs.h >>conftest.$ac_ext
15598cat >>conftest.$ac_ext <<_ACEOF
15599/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015600#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602if { (ac_try="$ac_cpp conftest.$ac_ext"
15603case "(($ac_try" in
15604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605 *) ac_try_echo=$ac_try;;
15606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 rm -f conftest.er1
15612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 (exit $ac_status); } >/dev/null && {
15615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15616 test ! -s conftest.err
15617 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_header_preproc=yes
15619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015621sed 's/^/| /' conftest.$ac_ext >&5
15622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625
Martin v. Löwis11437992002-04-12 09:54:03 +000015626rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15628echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015631case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15632 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015633 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15634echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15635 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15636echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015638 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015640 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15641echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15642 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15643echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15644 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15645echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15646 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15647echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15648 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15649echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15650 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15651echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015653## -------------------------------------- ##
15654## Report this to http://bugs.python.org/ ##
15655## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015656_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015658 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15661echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015664else
15665 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015667{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15668echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
15670fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015671if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015677#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015678_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015679
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015682#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015684
15685 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015686 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015687else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15691echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015692if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015693 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015694fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015697else
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015699{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15700echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015707$ac_includes_default
15708#include <mach/cthreads.h>
15709_ACEOF
15710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711if { (ac_try="$ac_compile"
15712case "(($ac_try" in
15713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15714 *) ac_try_echo=$ac_try;;
15715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015719 grep -v '^ *+' conftest.er1 >conftest.err
15720 rm -f conftest.er1
15721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723 (exit $ac_status); } && {
15724 test -z "$ac_c_werror_flag" ||
15725 test ! -s conftest.err
15726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 ac_header_compiler=yes
15728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015730sed 's/^/| /' conftest.$ac_ext >&5
15731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734
15735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015736{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15737echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
15739# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15741echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* confdefs.h. */
15744_ACEOF
15745cat confdefs.h >>conftest.$ac_ext
15746cat >>conftest.$ac_ext <<_ACEOF
15747/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015748#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750if { (ac_try="$ac_cpp conftest.$ac_ext"
15751case "(($ac_try" in
15752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15753 *) ac_try_echo=$ac_try;;
15754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 rm -f conftest.er1
15760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 (exit $ac_status); } >/dev/null && {
15763 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15764 test ! -s conftest.err
15765 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_header_preproc=yes
15767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015775{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15776echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015779case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15780 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015781 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15782echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15783 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15784echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015785 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015786 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015787 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15789echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15790 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15791echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15792 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15793echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15794 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15795echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15796 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15797echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15798 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15799echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015801## -------------------------------------- ##
15802## Report this to http://bugs.python.org/ ##
15803## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015804_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015806 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015808{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15809echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015810if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015812else
15813 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015814fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15816echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015819if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015825#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015826_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015830#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015832
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015833 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015834else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015835
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015836 # Just looking for pthread_create in libpthread is not enough:
15837 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15838 # So we really have to include pthread.h, and then link.
15839 _libs=$LIBS
15840 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015841 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15842echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015844/* confdefs.h. */
15845_ACEOF
15846cat confdefs.h >>conftest.$ac_ext
15847cat >>conftest.$ac_ext <<_ACEOF
15848/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015849#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015850
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015851void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852int
15853main ()
15854{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015855
15856pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ;
15858 return 0;
15859}
15860_ACEOF
15861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862if { (ac_try="$ac_link"
15863case "(($ac_try" in
15864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15865 *) ac_try_echo=$ac_try;;
15866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015870 grep -v '^ *+' conftest.er1 >conftest.err
15871 rm -f conftest.er1
15872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 (exit $ac_status); } && {
15875 test -z "$ac_c_werror_flag" ||
15876 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015877 } && test -s conftest$ac_exeext &&
15878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015880 { echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015885
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015887 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015890sed 's/^/| /' conftest.$ac_ext >&5
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015893 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15895echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015896if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015898else
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015900/* confdefs.h. */
15901_ACEOF
15902cat confdefs.h >>conftest.$ac_ext
15903cat >>conftest.$ac_ext <<_ACEOF
15904/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015905/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15907#define pthread_detach innocuous_pthread_detach
15908
Guido van Rossumad678af1998-10-02 14:42:15 +000015909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015910 which can conflict with char pthread_detach (); below.
15911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015912 <limits.h> exists even on freestanding compilers. */
15913
15914#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015915# include <limits.h>
15916#else
15917# include <assert.h>
15918#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015919
15920#undef pthread_detach
15921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922/* Override any GCC internal prototype to avoid an error.
15923 Use char because int might match the return type of a GCC
15924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015925#ifdef __cplusplus
15926extern "C"
15927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015928char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015929/* The GNU C library defines this for functions which it implements
15930 to always fail with ENOSYS. Some functions are actually named
15931 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015933choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015934#endif
15935
Skip Montanaro6dead952003-09-25 14:50:04 +000015936int
15937main ()
15938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ;
15941 return 0;
15942}
15943_ACEOF
15944rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945if { (ac_try="$ac_link"
15946case "(($ac_try" in
15947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15948 *) ac_try_echo=$ac_try;;
15949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015953 grep -v '^ *+' conftest.er1 >conftest.err
15954 rm -f conftest.er1
15955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 (exit $ac_status); } && {
15958 test -z "$ac_c_werror_flag" ||
15959 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015960 } && test -s conftest$ac_exeext &&
15961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015965sed 's/^/| /' conftest.$ac_ext >&5
15966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969
15970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15974echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15975if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015977#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015978_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015979
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015981 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015982else
Guido van Rossumad678af1998-10-02 14:42:15 +000015983
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015984 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15985echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015986if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988else
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015990LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998/* Override any GCC internal prototype to avoid an error.
15999 Use char because int might match the return type of a GCC
16000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016001#ifdef __cplusplus
16002extern "C"
16003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016004char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016005int
16006main ()
16007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ;
16010 return 0;
16011}
16012_ACEOF
16013rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014if { (ac_try="$ac_link"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016029 } && test -s conftest$ac_exeext &&
16030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016034sed 's/^/| /' conftest.$ac_ext >&5
16035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038
16039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016041LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016043{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16044echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16045if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016047#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016048_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016050 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016051 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016052 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016053else
Greg Steinadf63d62000-07-05 10:38:09 +000016054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016055 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16056echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016057if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016058 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016059else
Martin v. Löwis11437992002-04-12 09:54:03 +000016060 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016061LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069/* Override any GCC internal prototype to avoid an error.
16070 Use char because int might match the return type of a GCC
16071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016072#ifdef __cplusplus
16073extern "C"
16074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
16077main ()
16078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ;
16081 return 0;
16082}
16083_ACEOF
16084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085if { (ac_try="$ac_link"
16086case "(($ac_try" in
16087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16088 *) ac_try_echo=$ac_try;;
16089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016093 grep -v '^ *+' conftest.er1 >conftest.err
16094 rm -f conftest.er1
16095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097 (exit $ac_status); } && {
16098 test -z "$ac_c_werror_flag" ||
16099 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016100 } && test -s conftest$ac_exeext &&
16101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109
16110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016113fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016114{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16115echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16116if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016118#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016119_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016121 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016122 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016123 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016124else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16127echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016128if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016130else
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016132LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016134/* confdefs.h. */
16135_ACEOF
16136cat confdefs.h >>conftest.$ac_ext
16137cat >>conftest.$ac_ext <<_ACEOF
16138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140/* Override any GCC internal prototype to avoid an error.
16141 Use char because int might match the return type of a GCC
16142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016143#ifdef __cplusplus
16144extern "C"
16145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016146char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016147int
16148main ()
16149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 ;
16152 return 0;
16153}
16154_ACEOF
16155rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156if { (ac_try="$ac_link"
16157case "(($ac_try" in
16158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16159 *) ac_try_echo=$ac_try;;
16160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016164 grep -v '^ *+' conftest.er1 >conftest.err
16165 rm -f conftest.er1
16166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 (exit $ac_status); } && {
16169 test -z "$ac_c_werror_flag" ||
16170 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171 } && test -s conftest$ac_exeext &&
16172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016176sed 's/^/| /' conftest.$ac_ext >&5
16177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180
16181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016184fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016185{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16186echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16187if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016192 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016193 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016194 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016195else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016197 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16198echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016199if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016201else
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016203LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016205/* confdefs.h. */
16206_ACEOF
16207cat confdefs.h >>conftest.$ac_ext
16208cat >>conftest.$ac_ext <<_ACEOF
16209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211/* Override any GCC internal prototype to avoid an error.
16212 Use char because int might match the return type of a GCC
16213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214#ifdef __cplusplus
16215extern "C"
16216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016217char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016218int
16219main ()
16220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 ;
16223 return 0;
16224}
16225_ACEOF
16226rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227if { (ac_try="$ac_link"
16228case "(($ac_try" in
16229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16230 *) ac_try_echo=$ac_try;;
16231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 grep -v '^ *+' conftest.er1 >conftest.err
16236 rm -f conftest.er1
16237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 (exit $ac_status); } && {
16240 test -z "$ac_c_werror_flag" ||
16241 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242 } && test -s conftest$ac_exeext &&
16243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016247sed 's/^/| /' conftest.$ac_ext >&5
16248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251
16252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016254LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016256{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16257echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16258if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016260#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016261_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016263 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016264 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016265 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016266else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016267
Martin v. Löwis130fb172001-07-19 11:00:41 +000016268 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016269fi
16270
Guido van Rossum627b2d71993-12-24 10:39:16 +000016271
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016272fi
16273
Guido van Rossum0be3e491997-05-22 20:33:33 +000016274fi
16275
Guido van Rossum49545951997-12-02 19:28:29 +000016276fi
16277
Guido van Rossumb93a8621998-05-07 13:27:32 +000016278fi
16279
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284fi
16285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287fi
16288
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016291 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16292echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016293if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016295else
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016297LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016299/* confdefs.h. */
16300_ACEOF
16301cat confdefs.h >>conftest.$ac_ext
16302cat >>conftest.$ac_ext <<_ACEOF
16303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305/* Override any GCC internal prototype to avoid an error.
16306 Use char because int might match the return type of a GCC
16307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016308#ifdef __cplusplus
16309extern "C"
16310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016311char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016312int
16313main ()
16314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 ;
16317 return 0;
16318}
16319_ACEOF
16320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321if { (ac_try="$ac_link"
16322case "(($ac_try" in
16323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16324 *) ac_try_echo=$ac_try;;
16325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 grep -v '^ *+' conftest.er1 >conftest.err
16330 rm -f conftest.er1
16331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 (exit $ac_status); } && {
16334 test -z "$ac_c_werror_flag" ||
16335 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016336 } && test -s conftest$ac_exeext &&
16337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016341sed 's/^/| /' conftest.$ac_ext >&5
16342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345
16346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016348LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016350{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16351echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16352if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016354#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016355_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016356
Martin v. Löwis130fb172001-07-19 11:00:41 +000016357 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016358 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016359 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016360fi
16361
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016362
Neal Norwitza978ab02002-11-02 16:58:05 +000016363 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16365echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016368else
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378/* Override any GCC internal prototype to avoid an error.
16379 Use char because int might match the return type of a GCC
16380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016381#ifdef __cplusplus
16382extern "C"
16383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016384char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
16386main ()
16387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394if { (ac_try="$ac_link"
16395case "(($ac_try" in
16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16397 *) ac_try_echo=$ac_try;;
16398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 grep -v '^ *+' conftest.er1 >conftest.err
16403 rm -f conftest.er1
16404 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 (exit $ac_status); } && {
16407 test -z "$ac_c_werror_flag" ||
16408 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016409 } && test -s conftest$ac_exeext &&
16410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414sed 's/^/| /' conftest.$ac_ext >&5
16415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418
16419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016423{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16424echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16425if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016427#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016430 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016431 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016432 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016433fi
16434
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016435 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016436
Martin v. Löwis130fb172001-07-19 11:00:41 +000016437 if test "$USE_THREAD_MODULE" != "#"
16438 then
16439 # If the above checks didn't disable threads, (at least) OSF1
16440 # needs this '-threads' argument during linking.
16441 case $ac_sys_system in
16442 OSF1) LDLAST=-threads;;
16443 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016444 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016445fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016446
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016447if test "$posix_threads" = "yes"; then
16448 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016449
16450cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016451#define _POSIX_THREADS 1
16452_ACEOF
16453
16454 fi
16455
16456 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16457 case $ac_sys_system/$ac_sys_release in
16458 SunOS/5.6)
16459cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016460#define HAVE_PTHREAD_DESTRUCTOR 1
16461_ACEOF
16462
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016463 ;;
16464 SunOS/5.8)
16465cat >>confdefs.h <<\_ACEOF
16466#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16467_ACEOF
16468
16469 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016470 AIX/5)
16471cat >>confdefs.h <<\_ACEOF
16472#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16473_ACEOF
16474
16475 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016476 esac
16477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16479echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016480 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016482else
16483 if test "$cross_compiling" = yes; then
16484 ac_cv_pthread_system_supported=no
16485else
16486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016492#include <pthread.h>
16493 void *foo(void *parm) {
16494 return NULL;
16495 }
16496 main() {
16497 pthread_attr_t attr;
16498 pthread_t id;
16499 if (pthread_attr_init(&attr)) exit(-1);
16500 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16501 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16502 exit(0);
16503 }
16504_ACEOF
16505rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506if { (ac_try="$ac_link"
16507case "(($ac_try" in
16508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509 *) ac_try_echo=$ac_try;;
16510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516 { (case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016524 (exit $ac_status); }; }; then
16525 ac_cv_pthread_system_supported=yes
16526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527 echo "$as_me: program exited with status $ac_status" >&5
16528echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016529sed 's/^/| /' conftest.$ac_ext >&5
16530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016531( exit $ac_status )
16532ac_cv_pthread_system_supported=no
16533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534rm -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 +000016535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537
16538
Guido van Rossum627b2d71993-12-24 10:39:16 +000016539fi
16540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016541 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16542echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016543 if test "$ac_cv_pthread_system_supported" = "yes"; then
16544
16545cat >>confdefs.h <<\_ACEOF
16546#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16547_ACEOF
16548
16549 fi
16550
16551for ac_func in pthread_sigmask
16552do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016558else
16559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016560/* confdefs.h. */
16561_ACEOF
16562cat confdefs.h >>conftest.$ac_ext
16563cat >>conftest.$ac_ext <<_ACEOF
16564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16567#define $ac_func innocuous_$ac_func
16568
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016570 which can conflict with char $ac_func (); below.
16571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016572 <limits.h> exists even on freestanding compilers. */
16573
16574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016575# include <limits.h>
16576#else
16577# include <assert.h>
16578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016579
16580#undef $ac_func
16581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582/* Override any GCC internal prototype to avoid an error.
16583 Use char because int might match the return type of a GCC
16584 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016585#ifdef __cplusplus
16586extern "C"
16587#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016588char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016589/* The GNU C library defines this for functions which it implements
16590 to always fail with ENOSYS. Some functions are actually named
16591 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016593choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594#endif
16595
Skip Montanaro6dead952003-09-25 14:50:04 +000016596int
16597main ()
16598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605if { (ac_try="$ac_link"
16606case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 (exit $ac_status); } && {
16618 test -z "$ac_c_werror_flag" ||
16619 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016620 } && test -s conftest$ac_exeext &&
16621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016622 eval "$as_ac_var=yes"
16623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016625sed 's/^/| /' conftest.$ac_ext >&5
16626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629
16630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016633ac_res=`eval echo '${'$as_ac_var'}'`
16634 { echo "$as_me:$LINENO: result: $ac_res" >&5
16635echo "${ECHO_T}$ac_res" >&6; }
16636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016637 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016639_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016640 case $ac_sys_system in
16641 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642
Jason Tishlerfac083d2003-07-22 15:20:49 +000016643cat >>confdefs.h <<\_ACEOF
16644#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16645_ACEOF
16646
16647 ;;
16648 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649fi
16650done
16651
16652fi
16653
16654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016655# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016656
16657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016658{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16659echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016661if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016663 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016664 { echo "$as_me:$LINENO: result: no" >&5
16665echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016666 ipv6=no
16667 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016668 *) { echo "$as_me:$LINENO: result: yes" >&5
16669echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016671#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016672_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016673
16674 ipv6=yes
16675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016677else
Martin v. Löwis11437992002-04-12 09:54:03 +000016678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016679 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016680 { echo "$as_me:$LINENO: result: no" >&5
16681echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016682 ipv6=no
16683
16684else
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016686/* confdefs.h. */
16687_ACEOF
16688cat confdefs.h >>conftest.$ac_ext
16689cat >>conftest.$ac_ext <<_ACEOF
16690/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016691 /* AF_INET6 available check */
16692#include <sys/types.h>
16693#include <sys/socket.h>
16694main()
16695{
16696 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16697 exit(1);
16698 else
16699 exit(0);
16700}
16701
Martin v. Löwis11437992002-04-12 09:54:03 +000016702_ACEOF
16703rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704if { (ac_try="$ac_link"
16705case "(($ac_try" in
16706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16707 *) ac_try_echo=$ac_try;;
16708esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 { (case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016723 { echo "$as_me:$LINENO: result: yes" >&5
16724echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016725 ipv6=yes
16726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727 echo "$as_me: program exited with status $ac_status" >&5
16728echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016729sed 's/^/| /' conftest.$ac_ext >&5
16730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016732{ echo "$as_me:$LINENO: result: no" >&5
16733echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016734 ipv6=no
16735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736rm -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 +000016737fi
16738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739
16740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016741if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016742 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16743echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016750#include <sys/types.h>
16751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016752int
16753main ()
16754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016755struct sockaddr_in6 x;
16756x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ;
16758 return 0;
16759}
16760_ACEOF
16761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762if { (ac_try="$ac_compile"
16763case "(($ac_try" in
16764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16765 *) ac_try_echo=$ac_try;;
16766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016770 grep -v '^ *+' conftest.er1 >conftest.err
16771 rm -f conftest.er1
16772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774 (exit $ac_status); } && {
16775 test -z "$ac_c_werror_flag" ||
16776 test ! -s conftest.err
16777 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016778 { echo "$as_me:$LINENO: result: yes" >&5
16779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016780 ipv6=yes
16781else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016783sed 's/^/| /' conftest.$ac_ext >&5
16784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785 { echo "$as_me:$LINENO: result: no" >&5
16786echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016787 ipv6=no
16788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789
16790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016791fi
16792
16793if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016795#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016797
16798fi
16799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800fi
16801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016802
16803ipv6type=unknown
16804ipv6lib=none
16805ipv6trylibc=no
16806
16807if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16809echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016810 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16811 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016812 case $i in
16813 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016815/* confdefs.h. */
16816_ACEOF
16817cat confdefs.h >>conftest.$ac_ext
16818cat >>conftest.$ac_ext <<_ACEOF
16819/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016821#include <netinet/in.h>
16822#ifdef IPV6_INRIA_VERSION
16823yes
16824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016825_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016827 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016828 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016829fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016831
16832 ;;
16833 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016841#include <netinet/in.h>
16842#ifdef __KAME__
16843yes
16844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016847 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016848 ipv6type=$i;
16849 ipv6lib=inet6
16850 ipv6libdir=/usr/local/v6/lib
16851 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854
16855 ;;
16856 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864#include <features.h>
16865#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16866yes
16867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016870 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871 ipv6type=$i;
16872 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016874rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875
16876 ;;
16877 linux-inet6)
16878 if test -d /usr/inet6; then
16879 ipv6type=$i
16880 ipv6lib=inet6
16881 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016882 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016883 fi
16884 ;;
16885 solaris)
16886 if test -f /etc/netconfig; then
16887 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16888 ipv6type=$i
16889 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016890 fi
16891 fi
16892 ;;
16893 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016895/* confdefs.h. */
16896_ACEOF
16897cat confdefs.h >>conftest.$ac_ext
16898cat >>conftest.$ac_ext <<_ACEOF
16899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016901#include <sys/param.h>
16902#ifdef _TOSHIBA_INET6
16903yes
16904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908 ipv6type=$i;
16909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016911fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016913
16914 ;;
16915 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923#include </usr/local/v6/include/sys/v6config.h>
16924#ifdef __V6D__
16925yes
16926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930 ipv6type=$i;
16931 ipv6lib=v6;
16932 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016933 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016936
16937 ;;
16938 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016940/* confdefs.h. */
16941_ACEOF
16942cat confdefs.h >>conftest.$ac_ext
16943cat >>conftest.$ac_ext <<_ACEOF
16944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016946#include <sys/param.h>
16947#ifdef _ZETA_MINAMI_INET6
16948yes
16949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016952 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016953 ipv6type=$i;
16954 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016955 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016956fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016958
16959 ;;
16960 esac
16961 if test "$ipv6type" != "unknown"; then
16962 break
16963 fi
16964 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016965 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16966echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016967fi
16968
16969if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16970 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16971 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16972 echo "using lib$ipv6lib"
16973 else
16974 if test $ipv6trylibc = "yes"; then
16975 echo "using libc"
16976 else
16977 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16978 echo "You need to fetch lib$ipv6lib.a from appropriate"
16979 echo 'ipv6 kit and compile beforehand.'
16980 exit 1
16981 fi
16982 fi
16983fi
16984
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016985{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16986echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016987cat >conftest.$ac_ext <<_ACEOF
16988/* confdefs.h. */
16989_ACEOF
16990cat confdefs.h >>conftest.$ac_ext
16991cat >>conftest.$ac_ext <<_ACEOF
16992/* end confdefs.h. */
16993#include <Carbon/Carbon.h>
16994int
16995main ()
16996{
16997FSIORefNum fRef = 0
16998 ;
16999 return 0;
17000}
17001_ACEOF
17002rm -f conftest.$ac_objext
17003if { (ac_try="$ac_compile"
17004case "(($ac_try" in
17005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17006 *) ac_try_echo=$ac_try;;
17007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017009 (eval "$ac_compile") 2>conftest.er1
17010 ac_status=$?
17011 grep -v '^ *+' conftest.er1 >conftest.err
17012 rm -f conftest.er1
17013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017015 (exit $ac_status); } && {
17016 test -z "$ac_c_werror_flag" ||
17017 test ! -s conftest.err
17018 } && test -s conftest.$ac_objext; then
17019
17020cat >>confdefs.h <<\_ACEOF
17021#define HAVE_OSX105_SDK 1
17022_ACEOF
17023
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017024 { echo "$as_me:$LINENO: result: yes" >&5
17025echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017027 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017028sed 's/^/| /' conftest.$ac_ext >&5
17029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017030 { echo "$as_me:$LINENO: result: no" >&5
17031echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017032
17033fi
17034
17035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17036
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017037# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017038{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17039echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017042if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 withval=$with_doc_strings;
17044fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017046
17047if test -z "$with_doc_strings"
17048then with_doc_strings="yes"
17049fi
17050if test "$with_doc_strings" != "no"
17051then
17052
17053cat >>confdefs.h <<\_ACEOF
17054#define WITH_DOC_STRINGS 1
17055_ACEOF
17056
17057fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017058{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17059echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017060
Neil Schemenauera35c6882001-02-27 04:45:05 +000017061# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017062{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17063echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017066if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017068if test "$withval" != no
17069then
17070
17071cat >>confdefs.h <<\_ACEOF
17072#define WITH_TSC 1
17073_ACEOF
17074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017075 { echo "$as_me:$LINENO: result: yes" >&5
17076echo "${ECHO_T}yes" >&6; }
17077else { echo "$as_me:$LINENO: result: no" >&5
17078echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017079fi
17080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017081 { echo "$as_me:$LINENO: result: no" >&5
17082echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083fi
17084
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017085
17086# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017087{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17088echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017091if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 withval=$with_pymalloc;
17093fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017094
Neil Schemenauera35c6882001-02-27 04:45:05 +000017095
Neil Schemenauer16c22972002-03-22 15:34:49 +000017096if test -z "$with_pymalloc"
17097then with_pymalloc="yes"
17098fi
17099if test "$with_pymalloc" != "no"
17100then
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017103#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017104_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017105
17106fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017107{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17108echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017109
Barry Warsawef82cd72000-06-30 16:21:01 +000017110# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017111{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17112echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017115if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017117if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017118then
17119
17120cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017121#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017122_ACEOF
17123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017124 { echo "$as_me:$LINENO: result: yes" >&5
17125echo "${ECHO_T}yes" >&6; }
17126else { echo "$as_me:$LINENO: result: no" >&5
17127echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017128fi
17129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017130 { echo "$as_me:$LINENO: result: no" >&5
17131echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132fi
17133
Barry Warsawef82cd72000-06-30 16:21:01 +000017134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017135# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017136
Guido van Rossum98935bf2001-09-05 19:13:16 +000017137DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017138
Guido van Rossume97ee181999-12-20 21:27:22 +000017139# the dlopen() function means we might want to use dynload_shlib.o. some
17140# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
Thomas Wouters3a584202000-08-05 23:28:51 +000017142for ac_func in dlopen
17143do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017144as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17145{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17146echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017149else
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017151/* confdefs.h. */
17152_ACEOF
17153cat confdefs.h >>conftest.$ac_ext
17154cat >>conftest.$ac_ext <<_ACEOF
17155/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017156/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17158#define $ac_func innocuous_$ac_func
17159
Guido van Rossume97ee181999-12-20 21:27:22 +000017160/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017161 which can conflict with char $ac_func (); below.
17162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017163 <limits.h> exists even on freestanding compilers. */
17164
17165#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017166# include <limits.h>
17167#else
17168# include <assert.h>
17169#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017170
17171#undef $ac_func
17172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173/* Override any GCC internal prototype to avoid an error.
17174 Use char because int might match the return type of a GCC
17175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017176#ifdef __cplusplus
17177extern "C"
17178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017179char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017180/* The GNU C library defines this for functions which it implements
17181 to always fail with ENOSYS. Some functions are actually named
17182 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017184choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017185#endif
17186
Skip Montanaro6dead952003-09-25 14:50:04 +000017187int
17188main ()
17189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 ;
17192 return 0;
17193}
17194_ACEOF
17195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196if { (ac_try="$ac_link"
17197case "(($ac_try" in
17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17199 *) ac_try_echo=$ac_try;;
17200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 (exit $ac_status); } && {
17209 test -z "$ac_c_werror_flag" ||
17210 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211 } && test -s conftest$ac_exeext &&
17212 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017216sed 's/^/| /' conftest.$ac_ext >&5
17217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220
17221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017222 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017223fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224ac_res=`eval echo '${'$as_ac_var'}'`
17225 { echo "$as_me:$LINENO: result: $ac_res" >&5
17226echo "${ECHO_T}$ac_res" >&6; }
17227if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017229#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017230_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017231
Guido van Rossume97ee181999-12-20 21:27:22 +000017232fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017233done
Guido van Rossume97ee181999-12-20 21:27:22 +000017234
Michael W. Hudson54241132001-12-07 15:38:26 +000017235
Guido van Rossume97ee181999-12-20 21:27:22 +000017236# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17237# loading of modules.
17238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017239{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17240echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017241if test -z "$DYNLOADFILE"
17242then
17243 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017244 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17245 if test "$ac_cv_func_dlopen" = yes
17246 then DYNLOADFILE="dynload_shlib.o"
17247 else DYNLOADFILE="dynload_aix.o"
17248 fi
17249 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017250 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017251 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17252 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017253 *)
17254 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17255 # out any dynamic loading
17256 if test "$ac_cv_func_dlopen" = yes
17257 then DYNLOADFILE="dynload_shlib.o"
17258 else DYNLOADFILE="dynload_stub.o"
17259 fi
17260 ;;
17261 esac
17262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017263{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17264echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017265if test "$DYNLOADFILE" != "dynload_stub.o"
17266then
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
17268cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017269#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017270_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017271
17272fi
17273
Neil Schemenauer4e425612001-06-19 15:44:15 +000017274# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17275
Michael W. Hudson54241132001-12-07 15:38:26 +000017276
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017277{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17278echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017279if test -z "$MACHDEP_OBJS"
17280then
Jack Jansene578a632001-08-15 01:27:14 +000017281 MACHDEP_OBJS=$extra_machdep_objs
17282else
17283 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017284fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017285{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17286echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017287
Guido van Rossum627b2d71993-12-24 10:39:16 +000017288# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
Martin v. Löwisd6320502004-08-12 13:45:08 +000017360
Martin v. Löwisc3001752005-01-23 09:27:24 +000017361
17362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017363
17364
Thomas Wouterscf297e42007-02-23 15:07:44 +000017365
17366
Gregory P. Smith25523d22007-09-03 16:44:55 +000017367
Christian Heimes4e30a842007-11-30 22:12:06 +000017368
Martin v. Löwis92fab752008-03-08 10:40:41 +000017369
Martin v. Löwis823725e2008-03-24 13:39:54 +000017370
17371
Benjamin Peterson965ce872009-04-05 21:24:58 +000017372
17373
17374
17375
Martin v. Löwis011e8422009-05-05 04:43:17 +000017376
Martin v. Löwis113a0852009-05-29 17:25:39 +000017377
Martin v. Löwis823725e2008-03-24 13:39:54 +000017378for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17379 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017380 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017381 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017382 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017383 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017384 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017385 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17386 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017387 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017388 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017389 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017390 truncate uname unsetenv utimes waitpid wait3 wait4 \
17391 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017392do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017393as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17394{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17395echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017398else
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017400/* confdefs.h. */
17401_ACEOF
17402cat confdefs.h >>conftest.$ac_ext
17403cat >>conftest.$ac_ext <<_ACEOF
17404/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017405/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17406 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17407#define $ac_func innocuous_$ac_func
17408
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017409/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017410 which can conflict with char $ac_func (); below.
17411 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017412 <limits.h> exists even on freestanding compilers. */
17413
17414#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017415# include <limits.h>
17416#else
17417# include <assert.h>
17418#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017419
17420#undef $ac_func
17421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422/* Override any GCC internal prototype to avoid an error.
17423 Use char because int might match the return type of a GCC
17424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017425#ifdef __cplusplus
17426extern "C"
17427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017428char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017429/* The GNU C library defines this for functions which it implements
17430 to always fail with ENOSYS. Some functions are actually named
17431 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017433choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017434#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017435
Skip Montanaro6dead952003-09-25 14:50:04 +000017436int
17437main ()
17438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 ;
17441 return 0;
17442}
17443_ACEOF
17444rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445if { (ac_try="$ac_link"
17446case "(($ac_try" in
17447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17448 *) ac_try_echo=$ac_try;;
17449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017453 grep -v '^ *+' conftest.er1 >conftest.err
17454 rm -f conftest.er1
17455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 (exit $ac_status); } && {
17458 test -z "$ac_c_werror_flag" ||
17459 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017460 } && test -s conftest$ac_exeext &&
17461 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017465sed 's/^/| /' conftest.$ac_ext >&5
17466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469
17470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017471 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017472fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017473ac_res=`eval echo '${'$as_ac_var'}'`
17474 { echo "$as_me:$LINENO: result: $ac_res" >&5
17475echo "${ECHO_T}$ac_res" >&6; }
17476if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017478#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017481fi
17482done
17483
Michael W. Hudson54241132001-12-07 15:38:26 +000017484
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017485# For some functions, having a definition is not sufficient, since
17486# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017487{ echo "$as_me:$LINENO: checking for chroot" >&5
17488echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017490/* confdefs.h. */
17491_ACEOF
17492cat confdefs.h >>conftest.$ac_ext
17493cat >>conftest.$ac_ext <<_ACEOF
17494/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017495#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017496int
17497main ()
17498{
17499void *x=chroot
17500 ;
17501 return 0;
17502}
17503_ACEOF
17504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505if { (ac_try="$ac_compile"
17506case "(($ac_try" in
17507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17508 *) ac_try_echo=$ac_try;;
17509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017513 grep -v '^ *+' conftest.er1 >conftest.err
17514 rm -f conftest.er1
17515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 (exit $ac_status); } && {
17518 test -z "$ac_c_werror_flag" ||
17519 test ! -s conftest.err
17520 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017521
17522cat >>confdefs.h <<\_ACEOF
17523#define HAVE_CHROOT 1
17524_ACEOF
17525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017526 { echo "$as_me:$LINENO: result: yes" >&5
17527echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017530sed 's/^/| /' conftest.$ac_ext >&5
17531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017532 { echo "$as_me:$LINENO: result: no" >&5
17533echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017534
17535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536
17537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017538{ echo "$as_me:$LINENO: checking for link" >&5
17539echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017541/* confdefs.h. */
17542_ACEOF
17543cat confdefs.h >>conftest.$ac_ext
17544cat >>conftest.$ac_ext <<_ACEOF
17545/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017546#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017547int
17548main ()
17549{
17550void *x=link
17551 ;
17552 return 0;
17553}
17554_ACEOF
17555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556if { (ac_try="$ac_compile"
17557case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017564 grep -v '^ *+' conftest.er1 >conftest.err
17565 rm -f conftest.er1
17566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 (exit $ac_status); } && {
17569 test -z "$ac_c_werror_flag" ||
17570 test ! -s conftest.err
17571 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017572
17573cat >>confdefs.h <<\_ACEOF
17574#define HAVE_LINK 1
17575_ACEOF
17576
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017577 { echo "$as_me:$LINENO: result: yes" >&5
17578echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017581sed 's/^/| /' conftest.$ac_ext >&5
17582
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017583 { echo "$as_me:$LINENO: result: no" >&5
17584echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017585
17586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587
17588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017589{ echo "$as_me:$LINENO: checking for symlink" >&5
17590echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017592/* confdefs.h. */
17593_ACEOF
17594cat confdefs.h >>conftest.$ac_ext
17595cat >>conftest.$ac_ext <<_ACEOF
17596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017598int
17599main ()
17600{
17601void *x=symlink
17602 ;
17603 return 0;
17604}
17605_ACEOF
17606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607if { (ac_try="$ac_compile"
17608case "(($ac_try" in
17609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17610 *) ac_try_echo=$ac_try;;
17611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017615 grep -v '^ *+' conftest.er1 >conftest.err
17616 rm -f conftest.er1
17617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 (exit $ac_status); } && {
17620 test -z "$ac_c_werror_flag" ||
17621 test ! -s conftest.err
17622 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017623
17624cat >>confdefs.h <<\_ACEOF
17625#define HAVE_SYMLINK 1
17626_ACEOF
17627
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017628 { echo "$as_me:$LINENO: result: yes" >&5
17629echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017632sed 's/^/| /' conftest.$ac_ext >&5
17633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017634 { echo "$as_me:$LINENO: result: no" >&5
17635echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017636
17637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638
17639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017640{ echo "$as_me:$LINENO: checking for fchdir" >&5
17641echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017643/* confdefs.h. */
17644_ACEOF
17645cat confdefs.h >>conftest.$ac_ext
17646cat >>conftest.$ac_ext <<_ACEOF
17647/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017648#include <unistd.h>
17649int
17650main ()
17651{
17652void *x=fchdir
17653 ;
17654 return 0;
17655}
17656_ACEOF
17657rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658if { (ac_try="$ac_compile"
17659case "(($ac_try" in
17660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17661 *) ac_try_echo=$ac_try;;
17662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017666 grep -v '^ *+' conftest.er1 >conftest.err
17667 rm -f conftest.er1
17668 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 (exit $ac_status); } && {
17671 test -z "$ac_c_werror_flag" ||
17672 test ! -s conftest.err
17673 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017674
17675cat >>confdefs.h <<\_ACEOF
17676#define HAVE_FCHDIR 1
17677_ACEOF
17678
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017679 { echo "$as_me:$LINENO: result: yes" >&5
17680echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017683sed 's/^/| /' conftest.$ac_ext >&5
17684
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017685 { echo "$as_me:$LINENO: result: no" >&5
17686echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017687
17688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689
17690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017691{ echo "$as_me:$LINENO: checking for fsync" >&5
17692echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017694/* confdefs.h. */
17695_ACEOF
17696cat confdefs.h >>conftest.$ac_ext
17697cat >>conftest.$ac_ext <<_ACEOF
17698/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017699#include <unistd.h>
17700int
17701main ()
17702{
17703void *x=fsync
17704 ;
17705 return 0;
17706}
17707_ACEOF
17708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709if { (ac_try="$ac_compile"
17710case "(($ac_try" in
17711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17712 *) ac_try_echo=$ac_try;;
17713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017717 grep -v '^ *+' conftest.er1 >conftest.err
17718 rm -f conftest.er1
17719 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 (exit $ac_status); } && {
17722 test -z "$ac_c_werror_flag" ||
17723 test ! -s conftest.err
17724 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017725
17726cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017727#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017728_ACEOF
17729
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017730 { echo "$as_me:$LINENO: result: yes" >&5
17731echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017734sed 's/^/| /' conftest.$ac_ext >&5
17735
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017736 { echo "$as_me:$LINENO: result: no" >&5
17737echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017738
17739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740
17741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017742{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17743echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017745/* confdefs.h. */
17746_ACEOF
17747cat confdefs.h >>conftest.$ac_ext
17748cat >>conftest.$ac_ext <<_ACEOF
17749/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017750#include <unistd.h>
17751int
17752main ()
17753{
17754void *x=fdatasync
17755 ;
17756 return 0;
17757}
17758_ACEOF
17759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760if { (ac_try="$ac_compile"
17761case "(($ac_try" in
17762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17763 *) ac_try_echo=$ac_try;;
17764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017768 grep -v '^ *+' conftest.er1 >conftest.err
17769 rm -f conftest.er1
17770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 (exit $ac_status); } && {
17773 test -z "$ac_c_werror_flag" ||
17774 test ! -s conftest.err
17775 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017776
17777cat >>confdefs.h <<\_ACEOF
17778#define HAVE_FDATASYNC 1
17779_ACEOF
17780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017781 { echo "$as_me:$LINENO: result: yes" >&5
17782echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017785sed 's/^/| /' conftest.$ac_ext >&5
17786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017787 { echo "$as_me:$LINENO: result: no" >&5
17788echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017789
17790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791
17792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017793{ echo "$as_me:$LINENO: checking for epoll" >&5
17794echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017795cat >conftest.$ac_ext <<_ACEOF
17796/* confdefs.h. */
17797_ACEOF
17798cat confdefs.h >>conftest.$ac_ext
17799cat >>conftest.$ac_ext <<_ACEOF
17800/* end confdefs.h. */
17801#include <sys/epoll.h>
17802int
17803main ()
17804{
17805void *x=epoll_create
17806 ;
17807 return 0;
17808}
17809_ACEOF
17810rm -f conftest.$ac_objext
17811if { (ac_try="$ac_compile"
17812case "(($ac_try" in
17813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17814 *) ac_try_echo=$ac_try;;
17815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017817 (eval "$ac_compile") 2>conftest.er1
17818 ac_status=$?
17819 grep -v '^ *+' conftest.er1 >conftest.err
17820 rm -f conftest.er1
17821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017823 (exit $ac_status); } && {
17824 test -z "$ac_c_werror_flag" ||
17825 test ! -s conftest.err
17826 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017827
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017828cat >>confdefs.h <<\_ACEOF
17829#define HAVE_EPOLL 1
17830_ACEOF
17831
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017832 { echo "$as_me:$LINENO: result: yes" >&5
17833echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017834else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017835 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017836sed 's/^/| /' conftest.$ac_ext >&5
17837
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017838 { echo "$as_me:$LINENO: result: no" >&5
17839echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017840
17841fi
17842
17843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017844{ echo "$as_me:$LINENO: checking for kqueue" >&5
17845echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017846cat >conftest.$ac_ext <<_ACEOF
17847/* confdefs.h. */
17848_ACEOF
17849cat confdefs.h >>conftest.$ac_ext
17850cat >>conftest.$ac_ext <<_ACEOF
17851/* end confdefs.h. */
17852
17853#include <sys/types.h>
17854#include <sys/event.h>
17855
17856int
17857main ()
17858{
17859int x=kqueue()
17860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest.$ac_objext
17865if { (ac_try="$ac_compile"
17866case "(($ac_try" in
17867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17868 *) ac_try_echo=$ac_try;;
17869esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017871 (eval "$ac_compile") 2>conftest.er1
17872 ac_status=$?
17873 grep -v '^ *+' conftest.er1 >conftest.err
17874 rm -f conftest.er1
17875 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017877 (exit $ac_status); } && {
17878 test -z "$ac_c_werror_flag" ||
17879 test ! -s conftest.err
17880 } && test -s conftest.$ac_objext; then
17881
17882cat >>confdefs.h <<\_ACEOF
17883#define HAVE_KQUEUE 1
17884_ACEOF
17885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017886 { echo "$as_me:$LINENO: result: yes" >&5
17887echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017889 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017890sed 's/^/| /' conftest.$ac_ext >&5
17891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017892 { echo "$as_me:$LINENO: result: no" >&5
17893echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017894
17895fi
17896
17897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017898# On some systems (eg. FreeBSD 5), we would find a definition of the
17899# functions ctermid_r, setgroups in the library, but no prototype
17900# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17901# address to avoid compiler warnings and potential miscompilations
17902# because of the missing prototypes.
17903
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017904{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17905echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017907/* confdefs.h. */
17908_ACEOF
17909cat confdefs.h >>conftest.$ac_ext
17910cat >>conftest.$ac_ext <<_ACEOF
17911/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017912
17913#include "confdefs.h"
17914#include <stdio.h>
17915
Martin v. Löwisd5843682002-11-21 20:41:28 +000017916int
17917main ()
17918{
17919void* p = ctermid_r
17920 ;
17921 return 0;
17922}
17923_ACEOF
17924rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925if { (ac_try="$ac_compile"
17926case "(($ac_try" in
17927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17928 *) ac_try_echo=$ac_try;;
17929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017933 grep -v '^ *+' conftest.er1 >conftest.err
17934 rm -f conftest.er1
17935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937 (exit $ac_status); } && {
17938 test -z "$ac_c_werror_flag" ||
17939 test ! -s conftest.err
17940 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017941
17942cat >>confdefs.h <<\_ACEOF
17943#define HAVE_CTERMID_R 1
17944_ACEOF
17945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017946 { echo "$as_me:$LINENO: result: yes" >&5
17947echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017950sed 's/^/| /' conftest.$ac_ext >&5
17951
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017952 { echo "$as_me:$LINENO: result: no" >&5
17953echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017954
17955fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17958
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017959{ echo "$as_me:$LINENO: checking for flock" >&5
17960echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017962/* confdefs.h. */
17963_ACEOF
17964cat confdefs.h >>conftest.$ac_ext
17965cat >>conftest.$ac_ext <<_ACEOF
17966/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017967
17968#include "confdefs.h"
17969#include <sys/file.h>
17970
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017971int
17972main ()
17973{
17974void* p = flock
17975 ;
17976 return 0;
17977}
17978_ACEOF
17979rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980if { (ac_try="$ac_compile"
17981case "(($ac_try" in
17982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17983 *) ac_try_echo=$ac_try;;
17984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017988 grep -v '^ *+' conftest.er1 >conftest.err
17989 rm -f conftest.er1
17990 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992 (exit $ac_status); } && {
17993 test -z "$ac_c_werror_flag" ||
17994 test ! -s conftest.err
17995 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017996
17997cat >>confdefs.h <<\_ACEOF
17998#define HAVE_FLOCK 1
17999_ACEOF
18000
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018001 { echo "$as_me:$LINENO: result: yes" >&5
18002echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018003else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018005sed 's/^/| /' conftest.$ac_ext >&5
18006
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018007 { echo "$as_me:$LINENO: result: no" >&5
18008echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018009
18010fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18013
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018014{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18015echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018017/* confdefs.h. */
18018_ACEOF
18019cat confdefs.h >>conftest.$ac_ext
18020cat >>conftest.$ac_ext <<_ACEOF
18021/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018022
18023#include "confdefs.h"
18024#include <unistd.h>
18025
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018026int
18027main ()
18028{
18029void* p = getpagesize
18030 ;
18031 return 0;
18032}
18033_ACEOF
18034rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035if { (ac_try="$ac_compile"
18036case "(($ac_try" in
18037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18038 *) ac_try_echo=$ac_try;;
18039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018043 grep -v '^ *+' conftest.er1 >conftest.err
18044 rm -f conftest.er1
18045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047 (exit $ac_status); } && {
18048 test -z "$ac_c_werror_flag" ||
18049 test ! -s conftest.err
18050 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018051
18052cat >>confdefs.h <<\_ACEOF
18053#define HAVE_GETPAGESIZE 1
18054_ACEOF
18055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018056 { echo "$as_me:$LINENO: result: yes" >&5
18057echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018060sed 's/^/| /' conftest.$ac_ext >&5
18061
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018062 { echo "$as_me:$LINENO: result: no" >&5
18063echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018064
18065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066
18067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018068
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018069for ac_prog in true
18070do
18071 # Extract the first word of "$ac_prog", so it can be a program name with args.
18072set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018073{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18074echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018075if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018076 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018077else
18078 if test -n "$TRUE"; then
18079 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18080else
18081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082for as_dir in $PATH
18083do
18084 IFS=$as_save_IFS
18085 test -z "$as_dir" && as_dir=.
18086 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087 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 +000018088 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018089 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018090 break 2
18091 fi
18092done
18093done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018095
18096fi
18097fi
18098TRUE=$ac_cv_prog_TRUE
18099if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018100 { echo "$as_me:$LINENO: result: $TRUE" >&5
18101echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018103 { echo "$as_me:$LINENO: result: no" >&5
18104echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018105fi
18106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018108 test -n "$TRUE" && break
18109done
18110test -n "$TRUE" || TRUE="/bin/true"
18111
18112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018113{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18114echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018115if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018117else
18118 ac_check_lib_save_LIBS=$LIBS
18119LIBS="-lc $LIBS"
18120cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018121/* confdefs.h. */
18122_ACEOF
18123cat confdefs.h >>conftest.$ac_ext
18124cat >>conftest.$ac_ext <<_ACEOF
18125/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127/* Override any GCC internal prototype to avoid an error.
18128 Use char because int might match the return type of a GCC
18129 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018130#ifdef __cplusplus
18131extern "C"
18132#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018133char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018134int
18135main ()
18136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018138 ;
18139 return 0;
18140}
18141_ACEOF
18142rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143if { (ac_try="$ac_link"
18144case "(($ac_try" in
18145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18146 *) ac_try_echo=$ac_try;;
18147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018151 grep -v '^ *+' conftest.er1 >conftest.err
18152 rm -f conftest.er1
18153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155 (exit $ac_status); } && {
18156 test -z "$ac_c_werror_flag" ||
18157 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018158 } && test -s conftest$ac_exeext &&
18159 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018160 ac_cv_lib_c_inet_aton=yes
18161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018163sed 's/^/| /' conftest.$ac_ext >&5
18164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167
18168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018170LIBS=$ac_check_lib_save_LIBS
18171fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018172{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18173echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18174if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018175 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018176else
18177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018178{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18179echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018180if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018182else
18183 ac_check_lib_save_LIBS=$LIBS
18184LIBS="-lresolv $LIBS"
18185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018186/* confdefs.h. */
18187_ACEOF
18188cat confdefs.h >>conftest.$ac_ext
18189cat >>conftest.$ac_ext <<_ACEOF
18190/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192/* Override any GCC internal prototype to avoid an error.
18193 Use char because int might match the return type of a GCC
18194 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018195#ifdef __cplusplus
18196extern "C"
18197#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018198char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018199int
18200main ()
18201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018203 ;
18204 return 0;
18205}
18206_ACEOF
18207rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208if { (ac_try="$ac_link"
18209case "(($ac_try" in
18210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18211 *) ac_try_echo=$ac_try;;
18212esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018214 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018216 grep -v '^ *+' conftest.er1 >conftest.err
18217 rm -f conftest.er1
18218 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220 (exit $ac_status); } && {
18221 test -z "$ac_c_werror_flag" ||
18222 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018223 } && test -s conftest$ac_exeext &&
18224 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018225 ac_cv_lib_resolv_inet_aton=yes
18226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018228sed 's/^/| /' conftest.$ac_ext >&5
18229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232
18233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018235LIBS=$ac_check_lib_save_LIBS
18236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018237{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18238echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18239if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018240 cat >>confdefs.h <<_ACEOF
18241#define HAVE_LIBRESOLV 1
18242_ACEOF
18243
18244 LIBS="-lresolv $LIBS"
18245
18246fi
18247
18248
18249fi
18250
18251
Christian Heimesd0764e22007-12-04 15:00:33 +000018252# On Tru64, chflags seems to be present, but calling it will
18253# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018254{ echo "$as_me:$LINENO: checking for chflags" >&5
18255echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018256if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018257 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018258else
18259 if test "$cross_compiling" = yes; then
18260 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018261else
18262 cat >conftest.$ac_ext <<_ACEOF
18263/* confdefs.h. */
18264_ACEOF
18265cat confdefs.h >>conftest.$ac_ext
18266cat >>conftest.$ac_ext <<_ACEOF
18267/* end confdefs.h. */
18268
18269#include <sys/stat.h>
18270#include <unistd.h>
18271int main(int argc, char*argv[])
18272{
18273 if(chflags(argv[0], 0) != 0)
18274 return 1;
18275 return 0;
18276}
18277
18278_ACEOF
18279rm -f conftest$ac_exeext
18280if { (ac_try="$ac_link"
18281case "(($ac_try" in
18282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18283 *) ac_try_echo=$ac_try;;
18284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018286 (eval "$ac_link") 2>&5
18287 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18290 { (case "(($ac_try" in
18291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18292 *) ac_try_echo=$ac_try;;
18293esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018295 (eval "$ac_try") 2>&5
18296 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018298 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018299 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018301 echo "$as_me: program exited with status $ac_status" >&5
18302echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018303sed 's/^/| /' conftest.$ac_ext >&5
18304
18305( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018306ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018307fi
18308rm -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 +000018309fi
18310
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018311
18312
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018313fi
18314
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018315{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18316echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018317if test $ac_cv_have_chflags = yes
18318then
18319
18320cat >>confdefs.h <<\_ACEOF
18321#define HAVE_CHFLAGS 1
18322_ACEOF
18323
18324fi
18325
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018326{ echo "$as_me:$LINENO: checking for lchflags" >&5
18327echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018328if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018329 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018330else
18331 if test "$cross_compiling" = yes; then
18332 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018333else
18334 cat >conftest.$ac_ext <<_ACEOF
18335/* confdefs.h. */
18336_ACEOF
18337cat confdefs.h >>conftest.$ac_ext
18338cat >>conftest.$ac_ext <<_ACEOF
18339/* end confdefs.h. */
18340
18341#include <sys/stat.h>
18342#include <unistd.h>
18343int main(int argc, char*argv[])
18344{
18345 if(lchflags(argv[0], 0) != 0)
18346 return 1;
18347 return 0;
18348}
18349
18350_ACEOF
18351rm -f conftest$ac_exeext
18352if { (ac_try="$ac_link"
18353case "(($ac_try" in
18354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18355 *) ac_try_echo=$ac_try;;
18356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018358 (eval "$ac_link") 2>&5
18359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18362 { (case "(($ac_try" in
18363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18364 *) ac_try_echo=$ac_try;;
18365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018367 (eval "$ac_try") 2>&5
18368 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018370 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018371 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018373 echo "$as_me: program exited with status $ac_status" >&5
18374echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018375sed 's/^/| /' conftest.$ac_ext >&5
18376
18377( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018378ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018379fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18381fi
18382
18383
Christian Heimesd0764e22007-12-04 15:00:33 +000018384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018385fi
18386
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018387{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18388echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018389if test $ac_cv_have_lchflags = yes
18390then
18391
18392cat >>confdefs.h <<\_ACEOF
18393#define HAVE_LCHFLAGS 1
18394_ACEOF
18395
18396fi
18397
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018398case $ac_sys_system/$ac_sys_release in
18399Darwin/*)
18400 _CUR_CFLAGS="${CFLAGS}"
18401 _CUR_LDFLAGS="${LDFLAGS}"
18402 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18403 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18404 ;;
18405esac
18406
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018407{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18408echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018409if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018410 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018411else
18412 ac_check_lib_save_LIBS=$LIBS
18413LIBS="-lz $LIBS"
18414cat >conftest.$ac_ext <<_ACEOF
18415/* confdefs.h. */
18416_ACEOF
18417cat confdefs.h >>conftest.$ac_ext
18418cat >>conftest.$ac_ext <<_ACEOF
18419/* end confdefs.h. */
18420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421/* Override any GCC internal prototype to avoid an error.
18422 Use char because int might match the return type of a GCC
18423 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018424#ifdef __cplusplus
18425extern "C"
18426#endif
18427char inflateCopy ();
18428int
18429main ()
18430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018432 ;
18433 return 0;
18434}
18435_ACEOF
18436rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437if { (ac_try="$ac_link"
18438case "(($ac_try" in
18439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18440 *) ac_try_echo=$ac_try;;
18441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018444 ac_status=$?
18445 grep -v '^ *+' conftest.er1 >conftest.err
18446 rm -f conftest.er1
18447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 (exit $ac_status); } && {
18450 test -z "$ac_c_werror_flag" ||
18451 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018452 } && test -s conftest$ac_exeext &&
18453 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018454 ac_cv_lib_z_inflateCopy=yes
18455else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018456 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018457sed 's/^/| /' conftest.$ac_ext >&5
18458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461
18462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018463 conftest$ac_exeext conftest.$ac_ext
18464LIBS=$ac_check_lib_save_LIBS
18465fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018466{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18467echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18468if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018469
18470cat >>confdefs.h <<\_ACEOF
18471#define HAVE_ZLIB_COPY 1
18472_ACEOF
18473
18474fi
18475
18476
18477case $ac_sys_system/$ac_sys_release in
18478Darwin/*)
18479 CFLAGS="${_CUR_CFLAGS}"
18480 LDFLAGS="${_CUR_LDFLAGS}"
18481 ;;
18482esac
18483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018484{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18485echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018487/* confdefs.h. */
18488_ACEOF
18489cat confdefs.h >>conftest.$ac_ext
18490cat >>conftest.$ac_ext <<_ACEOF
18491/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018492
18493#include "confdefs.h"
18494#include <netdb.h>
18495
Martin v. Löwise9416172003-05-03 10:12:45 +000018496int
18497main ()
18498{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018499void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018500 ;
18501 return 0;
18502}
18503_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018504rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505if { (ac_try="$ac_link"
18506case "(($ac_try" in
18507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18508 *) ac_try_echo=$ac_try;;
18509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517 (exit $ac_status); } && {
18518 test -z "$ac_c_werror_flag" ||
18519 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 } && test -s conftest$ac_exeext &&
18521 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018522
18523cat >>confdefs.h <<\_ACEOF
18524#define HAVE_HSTRERROR 1
18525_ACEOF
18526
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018527 { echo "$as_me:$LINENO: result: yes" >&5
18528echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018531sed 's/^/| /' conftest.$ac_ext >&5
18532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018533 { echo "$as_me:$LINENO: result: no" >&5
18534echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018535
18536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537
18538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018541{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18542echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018549
18550#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018551#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018552#include <sys/socket.h>
18553#include <netinet/in.h>
18554#include <arpa/inet.h>
18555
Martin v. Löwise9416172003-05-03 10:12:45 +000018556int
18557main ()
18558{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018559void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018560 ;
18561 return 0;
18562}
18563_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018564rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565if { (ac_try="$ac_link"
18566case "(($ac_try" in
18567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18568 *) ac_try_echo=$ac_try;;
18569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018573 grep -v '^ *+' conftest.er1 >conftest.err
18574 rm -f conftest.er1
18575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577 (exit $ac_status); } && {
18578 test -z "$ac_c_werror_flag" ||
18579 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018580 } && test -s conftest$ac_exeext &&
18581 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018582
18583cat >>confdefs.h <<\_ACEOF
18584#define HAVE_INET_ATON 1
18585_ACEOF
18586
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587 { echo "$as_me:$LINENO: result: yes" >&5
18588echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018591sed 's/^/| /' conftest.$ac_ext >&5
18592
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018593 { echo "$as_me:$LINENO: result: no" >&5
18594echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018595
18596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597
18598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018600
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018601{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18602echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018604/* confdefs.h. */
18605_ACEOF
18606cat confdefs.h >>conftest.$ac_ext
18607cat >>conftest.$ac_ext <<_ACEOF
18608/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018609
18610#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018611#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018612#include <sys/socket.h>
18613#include <netinet/in.h>
18614#include <arpa/inet.h>
18615
Martin v. Löwise9416172003-05-03 10:12:45 +000018616int
18617main ()
18618{
18619void* p = inet_pton
18620 ;
18621 return 0;
18622}
18623_ACEOF
18624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625if { (ac_try="$ac_compile"
18626case "(($ac_try" in
18627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18628 *) ac_try_echo=$ac_try;;
18629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 grep -v '^ *+' conftest.er1 >conftest.err
18634 rm -f conftest.er1
18635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018637 (exit $ac_status); } && {
18638 test -z "$ac_c_werror_flag" ||
18639 test ! -s conftest.err
18640 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018641
18642cat >>confdefs.h <<\_ACEOF
18643#define HAVE_INET_PTON 1
18644_ACEOF
18645
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018646 { echo "$as_me:$LINENO: result: yes" >&5
18647echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018650sed 's/^/| /' conftest.$ac_ext >&5
18651
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018652 { echo "$as_me:$LINENO: result: no" >&5
18653echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018654
18655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018656
18657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018658
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018659# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018660{ echo "$as_me:$LINENO: checking for setgroups" >&5
18661echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018663/* confdefs.h. */
18664_ACEOF
18665cat confdefs.h >>conftest.$ac_ext
18666cat >>conftest.$ac_ext <<_ACEOF
18667/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018668
18669#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018670#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018671#ifdef HAVE_GRP_H
18672#include <grp.h>
18673#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018674
Martin v. Löwisd5843682002-11-21 20:41:28 +000018675int
18676main ()
18677{
18678void* p = setgroups
18679 ;
18680 return 0;
18681}
18682_ACEOF
18683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018684if { (ac_try="$ac_compile"
18685case "(($ac_try" in
18686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18687 *) ac_try_echo=$ac_try;;
18688esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018692 grep -v '^ *+' conftest.er1 >conftest.err
18693 rm -f conftest.er1
18694 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018696 (exit $ac_status); } && {
18697 test -z "$ac_c_werror_flag" ||
18698 test ! -s conftest.err
18699 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018700
18701cat >>confdefs.h <<\_ACEOF
18702#define HAVE_SETGROUPS 1
18703_ACEOF
18704
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018705 { echo "$as_me:$LINENO: result: yes" >&5
18706echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018709sed 's/^/| /' conftest.$ac_ext >&5
18710
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018711 { echo "$as_me:$LINENO: result: no" >&5
18712echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018713
18714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018715
18716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018717
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018718# check for openpty and forkpty
18719
Martin v. Löwis11437992002-04-12 09:54:03 +000018720
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018721for ac_func in openpty
18722do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18724{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018728else
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018730/* confdefs.h. */
18731_ACEOF
18732cat confdefs.h >>conftest.$ac_ext
18733cat >>conftest.$ac_ext <<_ACEOF
18734/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18737#define $ac_func innocuous_$ac_func
18738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018739/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018740 which can conflict with char $ac_func (); below.
18741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018742 <limits.h> exists even on freestanding compilers. */
18743
18744#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018745# include <limits.h>
18746#else
18747# include <assert.h>
18748#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018749
18750#undef $ac_func
18751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752/* Override any GCC internal prototype to avoid an error.
18753 Use char because int might match the return type of a GCC
18754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018755#ifdef __cplusplus
18756extern "C"
18757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018758char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018759/* The GNU C library defines this for functions which it implements
18760 to always fail with ENOSYS. Some functions are actually named
18761 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018762#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018763choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018764#endif
18765
Skip Montanaro6dead952003-09-25 14:50:04 +000018766int
18767main ()
18768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018769return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018770 ;
18771 return 0;
18772}
18773_ACEOF
18774rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775if { (ac_try="$ac_link"
18776case "(($ac_try" in
18777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18778 *) ac_try_echo=$ac_try;;
18779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018787 (exit $ac_status); } && {
18788 test -z "$ac_c_werror_flag" ||
18789 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018790 } && test -s conftest$ac_exeext &&
18791 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018795sed 's/^/| /' conftest.$ac_ext >&5
18796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018799
18800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018803ac_res=`eval echo '${'$as_ac_var'}'`
18804 { echo "$as_me:$LINENO: result: $ac_res" >&5
18805echo "${ECHO_T}$ac_res" >&6; }
18806if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018808#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018809_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018810
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018811else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18813echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018814if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018815 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018816else
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018818LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018820/* confdefs.h. */
18821_ACEOF
18822cat confdefs.h >>conftest.$ac_ext
18823cat >>conftest.$ac_ext <<_ACEOF
18824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018826/* Override any GCC internal prototype to avoid an error.
18827 Use char because int might match the return type of a GCC
18828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018829#ifdef __cplusplus
18830extern "C"
18831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018832char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018833int
18834main ()
18835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018836return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018837 ;
18838 return 0;
18839}
18840_ACEOF
18841rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018842if { (ac_try="$ac_link"
18843case "(($ac_try" in
18844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18845 *) ac_try_echo=$ac_try;;
18846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018854 (exit $ac_status); } && {
18855 test -z "$ac_c_werror_flag" ||
18856 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018857 } && test -s conftest$ac_exeext &&
18858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018859 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018860else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018862sed 's/^/| /' conftest.$ac_ext >&5
18863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018864 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018866
18867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018869LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018871{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18872echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18873if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018875#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018876_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018877 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018878else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018879 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18880echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018881if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018882 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018883else
18884 ac_check_lib_save_LIBS=$LIBS
18885LIBS="-lbsd $LIBS"
18886cat >conftest.$ac_ext <<_ACEOF
18887/* confdefs.h. */
18888_ACEOF
18889cat confdefs.h >>conftest.$ac_ext
18890cat >>conftest.$ac_ext <<_ACEOF
18891/* end confdefs.h. */
18892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018893/* Override any GCC internal prototype to avoid an error.
18894 Use char because int might match the return type of a GCC
18895 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018896#ifdef __cplusplus
18897extern "C"
18898#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018899char openpty ();
18900int
18901main ()
18902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018903return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018904 ;
18905 return 0;
18906}
18907_ACEOF
18908rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018909if { (ac_try="$ac_link"
18910case "(($ac_try" in
18911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18912 *) ac_try_echo=$ac_try;;
18913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018915 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018916 ac_status=$?
18917 grep -v '^ *+' conftest.er1 >conftest.err
18918 rm -f conftest.er1
18919 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921 (exit $ac_status); } && {
18922 test -z "$ac_c_werror_flag" ||
18923 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018924 } && test -s conftest$ac_exeext &&
18925 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018926 ac_cv_lib_bsd_openpty=yes
18927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018928 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018929sed 's/^/| /' conftest.$ac_ext >&5
18930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018933
18934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018935 conftest$ac_exeext conftest.$ac_ext
18936LIBS=$ac_check_lib_save_LIBS
18937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018938{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18939echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18940if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018941 cat >>confdefs.h <<\_ACEOF
18942#define HAVE_OPENPTY 1
18943_ACEOF
18944 LIBS="$LIBS -lbsd"
18945fi
18946
18947
18948fi
18949
Fred Drake8cef4cf2000-06-28 16:40:38 +000018950
18951fi
18952done
18953
Martin v. Löwis11437992002-04-12 09:54:03 +000018954
Fred Drake8cef4cf2000-06-28 16:40:38 +000018955for ac_func in forkpty
18956do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18958{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018961 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018962else
Martin v. Löwis11437992002-04-12 09:54:03 +000018963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018964/* confdefs.h. */
18965_ACEOF
18966cat confdefs.h >>conftest.$ac_ext
18967cat >>conftest.$ac_ext <<_ACEOF
18968/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018969/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18970 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18971#define $ac_func innocuous_$ac_func
18972
Fred Drake8cef4cf2000-06-28 16:40:38 +000018973/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018974 which can conflict with char $ac_func (); below.
18975 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018976 <limits.h> exists even on freestanding compilers. */
18977
18978#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018979# include <limits.h>
18980#else
18981# include <assert.h>
18982#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018983
18984#undef $ac_func
18985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986/* Override any GCC internal prototype to avoid an error.
18987 Use char because int might match the return type of a GCC
18988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018989#ifdef __cplusplus
18990extern "C"
18991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018992char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018993/* The GNU C library defines this for functions which it implements
18994 to always fail with ENOSYS. Some functions are actually named
18995 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018997choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018998#endif
18999
Skip Montanaro6dead952003-09-25 14:50:04 +000019000int
19001main ()
19002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019004 ;
19005 return 0;
19006}
19007_ACEOF
19008rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009if { (ac_try="$ac_link"
19010case "(($ac_try" in
19011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19012 *) ac_try_echo=$ac_try;;
19013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019017 grep -v '^ *+' conftest.er1 >conftest.err
19018 rm -f conftest.er1
19019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019021 (exit $ac_status); } && {
19022 test -z "$ac_c_werror_flag" ||
19023 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019024 } && test -s conftest$ac_exeext &&
19025 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019026 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019029sed 's/^/| /' conftest.$ac_ext >&5
19030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019031 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019033
19034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019035 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037ac_res=`eval echo '${'$as_ac_var'}'`
19038 { echo "$as_me:$LINENO: result: $ac_res" >&5
19039echo "${ECHO_T}$ac_res" >&6; }
19040if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019042#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019043_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019044
Fred Drake8cef4cf2000-06-28 16:40:38 +000019045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019046 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19047echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019048if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019049 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019050else
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019052LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019054/* confdefs.h. */
19055_ACEOF
19056cat confdefs.h >>conftest.$ac_ext
19057cat >>conftest.$ac_ext <<_ACEOF
19058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060/* Override any GCC internal prototype to avoid an error.
19061 Use char because int might match the return type of a GCC
19062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019063#ifdef __cplusplus
19064extern "C"
19065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019066char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019067int
19068main ()
19069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019070return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 ;
19072 return 0;
19073}
19074_ACEOF
19075rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019076if { (ac_try="$ac_link"
19077case "(($ac_try" in
19078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19079 *) ac_try_echo=$ac_try;;
19080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019082 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019084 grep -v '^ *+' conftest.er1 >conftest.err
19085 rm -f conftest.er1
19086 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019088 (exit $ac_status); } && {
19089 test -z "$ac_c_werror_flag" ||
19090 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019091 } && test -s conftest$ac_exeext &&
19092 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019096sed 's/^/| /' conftest.$ac_ext >&5
19097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019100
19101rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019103LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019104fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019105{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19106echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19107if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019108 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019109#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019110_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019111 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019113 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19114echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019115if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019117else
19118 ac_check_lib_save_LIBS=$LIBS
19119LIBS="-lbsd $LIBS"
19120cat >conftest.$ac_ext <<_ACEOF
19121/* confdefs.h. */
19122_ACEOF
19123cat confdefs.h >>conftest.$ac_ext
19124cat >>conftest.$ac_ext <<_ACEOF
19125/* end confdefs.h. */
19126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019127/* Override any GCC internal prototype to avoid an error.
19128 Use char because int might match the return type of a GCC
19129 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019130#ifdef __cplusplus
19131extern "C"
19132#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019133char forkpty ();
19134int
19135main ()
19136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019137return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019138 ;
19139 return 0;
19140}
19141_ACEOF
19142rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019143if { (ac_try="$ac_link"
19144case "(($ac_try" in
19145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19146 *) ac_try_echo=$ac_try;;
19147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019149 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019150 ac_status=$?
19151 grep -v '^ *+' conftest.er1 >conftest.err
19152 rm -f conftest.er1
19153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019155 (exit $ac_status); } && {
19156 test -z "$ac_c_werror_flag" ||
19157 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019158 } && test -s conftest$ac_exeext &&
19159 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019160 ac_cv_lib_bsd_forkpty=yes
19161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019162 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019163sed 's/^/| /' conftest.$ac_ext >&5
19164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019167
19168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019169 conftest$ac_exeext conftest.$ac_ext
19170LIBS=$ac_check_lib_save_LIBS
19171fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019172{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19173echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19174if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019175 cat >>confdefs.h <<\_ACEOF
19176#define HAVE_FORKPTY 1
19177_ACEOF
19178 LIBS="$LIBS -lbsd"
19179fi
19180
19181
19182fi
19183
Fred Drake8cef4cf2000-06-28 16:40:38 +000019184
19185fi
19186done
19187
Jack Jansendd19cf82001-12-06 22:36:17 +000019188
Christian Heimesb186d002008-03-18 15:15:01 +000019189# Stuff for expat.
19190
19191for ac_func in memmove
19192do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19194{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019196if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019197 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019198else
19199 cat >conftest.$ac_ext <<_ACEOF
19200/* confdefs.h. */
19201_ACEOF
19202cat confdefs.h >>conftest.$ac_ext
19203cat >>conftest.$ac_ext <<_ACEOF
19204/* end confdefs.h. */
19205/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19207#define $ac_func innocuous_$ac_func
19208
19209/* System header to define __stub macros and hopefully few prototypes,
19210 which can conflict with char $ac_func (); below.
19211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19212 <limits.h> exists even on freestanding compilers. */
19213
19214#ifdef __STDC__
19215# include <limits.h>
19216#else
19217# include <assert.h>
19218#endif
19219
19220#undef $ac_func
19221
19222/* Override any GCC internal prototype to avoid an error.
19223 Use char because int might match the return type of a GCC
19224 builtin and then its argument prototype would still apply. */
19225#ifdef __cplusplus
19226extern "C"
19227#endif
19228char $ac_func ();
19229/* The GNU C library defines this for functions which it implements
19230 to always fail with ENOSYS. Some functions are actually named
19231 something starting with __ and the normal name is an alias. */
19232#if defined __stub_$ac_func || defined __stub___$ac_func
19233choke me
19234#endif
19235
19236int
19237main ()
19238{
19239return $ac_func ();
19240 ;
19241 return 0;
19242}
19243_ACEOF
19244rm -f conftest.$ac_objext conftest$ac_exeext
19245if { (ac_try="$ac_link"
19246case "(($ac_try" in
19247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248 *) ac_try_echo=$ac_try;;
19249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019251 (eval "$ac_link") 2>conftest.er1
19252 ac_status=$?
19253 grep -v '^ *+' conftest.er1 >conftest.err
19254 rm -f conftest.er1
19255 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019257 (exit $ac_status); } && {
19258 test -z "$ac_c_werror_flag" ||
19259 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019260 } && test -s conftest$ac_exeext &&
19261 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019262 eval "$as_ac_var=yes"
19263else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019264 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019265sed 's/^/| /' conftest.$ac_ext >&5
19266
19267 eval "$as_ac_var=no"
19268fi
19269
19270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19271 conftest$ac_exeext conftest.$ac_ext
19272fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019273ac_res=`eval echo '${'$as_ac_var'}'`
19274 { echo "$as_me:$LINENO: result: $ac_res" >&5
19275echo "${ECHO_T}$ac_res" >&6; }
19276if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019277 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019278#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019279_ACEOF
19280
19281fi
19282done
19283
19284
Michael W. Hudson54241132001-12-07 15:38:26 +000019285# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019286
19287
19288
19289
19290
19291
Fred Drake8cef4cf2000-06-28 16:40:38 +000019292for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19293do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19295{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019297if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019299else
Martin v. Löwis11437992002-04-12 09:54:03 +000019300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019301/* confdefs.h. */
19302_ACEOF
19303cat confdefs.h >>conftest.$ac_ext
19304cat >>conftest.$ac_ext <<_ACEOF
19305/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019306/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19307 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19308#define $ac_func innocuous_$ac_func
19309
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019310/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019311 which can conflict with char $ac_func (); below.
19312 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019313 <limits.h> exists even on freestanding compilers. */
19314
19315#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019316# include <limits.h>
19317#else
19318# include <assert.h>
19319#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019320
19321#undef $ac_func
19322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019323/* Override any GCC internal prototype to avoid an error.
19324 Use char because int might match the return type of a GCC
19325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019326#ifdef __cplusplus
19327extern "C"
19328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019329char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019330/* The GNU C library defines this for functions which it implements
19331 to always fail with ENOSYS. Some functions are actually named
19332 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019333#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019334choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019335#endif
19336
Skip Montanaro6dead952003-09-25 14:50:04 +000019337int
19338main ()
19339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019340return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 ;
19342 return 0;
19343}
19344_ACEOF
19345rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019346if { (ac_try="$ac_link"
19347case "(($ac_try" in
19348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19349 *) ac_try_echo=$ac_try;;
19350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019352 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019354 grep -v '^ *+' conftest.er1 >conftest.err
19355 rm -f conftest.er1
19356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019358 (exit $ac_status); } && {
19359 test -z "$ac_c_werror_flag" ||
19360 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019361 } && test -s conftest$ac_exeext &&
19362 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019363 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019366sed 's/^/| /' conftest.$ac_ext >&5
19367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019368 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019370
19371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019372 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019373fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019374ac_res=`eval echo '${'$as_ac_var'}'`
19375 { echo "$as_me:$LINENO: result: $ac_res" >&5
19376echo "${ECHO_T}$ac_res" >&6; }
19377if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019378 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019380_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019382fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019383done
19384
Michael W. Hudson54241132001-12-07 15:38:26 +000019385
Martin v. Löwis11437992002-04-12 09:54:03 +000019386
19387
19388
Christian Heimesb186d002008-03-18 15:15:01 +000019389for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019390do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19392{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019394if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019396else
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019398/* confdefs.h. */
19399_ACEOF
19400cat confdefs.h >>conftest.$ac_ext
19401cat >>conftest.$ac_ext <<_ACEOF
19402/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19405#define $ac_func innocuous_$ac_func
19406
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019407/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019408 which can conflict with char $ac_func (); below.
19409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019410 <limits.h> exists even on freestanding compilers. */
19411
19412#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019413# include <limits.h>
19414#else
19415# include <assert.h>
19416#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019417
19418#undef $ac_func
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öwis11437992002-04-12 09:54:03 +000019423#ifdef __cplusplus
19424extern "C"
19425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019426char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019427/* The GNU C library defines this for functions which it implements
19428 to always fail with ENOSYS. Some functions are actually named
19429 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019430#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019431choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019432#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019433
Skip Montanaro6dead952003-09-25 14:50:04 +000019434int
19435main ()
19436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019437return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019438 ;
19439 return 0;
19440}
19441_ACEOF
19442rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019443if { (ac_try="$ac_link"
19444case "(($ac_try" in
19445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19446 *) ac_try_echo=$ac_try;;
19447esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019449 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019451 grep -v '^ *+' conftest.er1 >conftest.err
19452 rm -f conftest.er1
19453 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019455 (exit $ac_status); } && {
19456 test -z "$ac_c_werror_flag" ||
19457 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019458 } && test -s conftest$ac_exeext &&
19459 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019460 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019463sed 's/^/| /' conftest.$ac_ext >&5
19464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019465 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019467
19468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019471ac_res=`eval echo '${'$as_ac_var'}'`
19472 { echo "$as_me:$LINENO: result: $ac_res" >&5
19473echo "${ECHO_T}$ac_res" >&6; }
19474if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019475 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019476#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019477_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019478
Martin v. Löwis1142de32002-03-29 16:28:31 +000019479else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019480 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019481 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019482 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19483 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019484esac
19485
Martin v. Löwis1142de32002-03-29 16:28:31 +000019486fi
19487done
19488
19489
Martin v. Löwis11437992002-04-12 09:54:03 +000019490
Martin v. Löwis1142de32002-03-29 16:28:31 +000019491for ac_func in getpgrp
19492do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19494{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019496if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019497 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019498else
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019505/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19506 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19507#define $ac_func innocuous_$ac_func
19508
Martin v. Löwis1142de32002-03-29 16:28:31 +000019509/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019510 which can conflict with char $ac_func (); below.
19511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019512 <limits.h> exists even on freestanding compilers. */
19513
19514#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019515# include <limits.h>
19516#else
19517# include <assert.h>
19518#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019519
19520#undef $ac_func
19521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019522/* Override any GCC internal prototype to avoid an error.
19523 Use char because int might match the return type of a GCC
19524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019525#ifdef __cplusplus
19526extern "C"
19527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019528char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019529/* The GNU C library defines this for functions which it implements
19530 to always fail with ENOSYS. Some functions are actually named
19531 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019533choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019534#endif
19535
Skip Montanaro6dead952003-09-25 14:50:04 +000019536int
19537main ()
19538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019539return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 ;
19541 return 0;
19542}
19543_ACEOF
19544rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545if { (ac_try="$ac_link"
19546case "(($ac_try" in
19547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19548 *) ac_try_echo=$ac_try;;
19549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019551 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019553 grep -v '^ *+' conftest.er1 >conftest.err
19554 rm -f conftest.er1
19555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019557 (exit $ac_status); } && {
19558 test -z "$ac_c_werror_flag" ||
19559 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019560 } && test -s conftest$ac_exeext &&
19561 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019565sed 's/^/| /' conftest.$ac_ext >&5
19566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019567 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019569
19570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019571 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019573ac_res=`eval echo '${'$as_ac_var'}'`
19574 { echo "$as_me:$LINENO: result: $ac_res" >&5
19575echo "${ECHO_T}$ac_res" >&6; }
19576if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019577 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019579_ACEOF
19580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019581/* confdefs.h. */
19582_ACEOF
19583cat confdefs.h >>conftest.$ac_ext
19584cat >>conftest.$ac_ext <<_ACEOF
19585/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019586#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019587int
19588main ()
19589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019591 ;
19592 return 0;
19593}
19594_ACEOF
19595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019596if { (ac_try="$ac_compile"
19597case "(($ac_try" in
19598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19599 *) ac_try_echo=$ac_try;;
19600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019604 grep -v '^ *+' conftest.er1 >conftest.err
19605 rm -f conftest.er1
19606 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019608 (exit $ac_status); } && {
19609 test -z "$ac_c_werror_flag" ||
19610 test ! -s conftest.err
19611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019612
19613cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019614#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019615_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019616
Martin v. Löwis11437992002-04-12 09:54:03 +000019617
Guido van Rossumf78abae1997-01-21 22:02:36 +000019618else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019620sed 's/^/| /' conftest.$ac_ext >&5
19621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019622
Guido van Rossum627b2d71993-12-24 10:39:16 +000019623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019624
19625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019626
Guido van Rossum627b2d71993-12-24 10:39:16 +000019627fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019628done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019629
Jack Jansen150753c2003-03-29 22:07:47 +000019630
19631for ac_func in setpgrp
19632do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19634{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019636if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019638else
Martin v. Löwis11437992002-04-12 09:54:03 +000019639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019645/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19646 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19647#define $ac_func innocuous_$ac_func
19648
Jack Jansen150753c2003-03-29 22:07:47 +000019649/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019650 which can conflict with char $ac_func (); below.
19651 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019652 <limits.h> exists even on freestanding compilers. */
19653
19654#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019655# include <limits.h>
19656#else
19657# include <assert.h>
19658#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019659
19660#undef $ac_func
19661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019662/* Override any GCC internal prototype to avoid an error.
19663 Use char because int might match the return type of a GCC
19664 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019665#ifdef __cplusplus
19666extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019667#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019668char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019669/* The GNU C library defines this for functions which it implements
19670 to always fail with ENOSYS. Some functions are actually named
19671 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019673choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019674#endif
19675
Skip Montanaro6dead952003-09-25 14:50:04 +000019676int
19677main ()
19678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019679return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 ;
19681 return 0;
19682}
19683_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019684rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685if { (ac_try="$ac_link"
19686case "(($ac_try" in
19687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19688 *) ac_try_echo=$ac_try;;
19689esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019691 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019693 grep -v '^ *+' conftest.er1 >conftest.err
19694 rm -f conftest.er1
19695 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019697 (exit $ac_status); } && {
19698 test -z "$ac_c_werror_flag" ||
19699 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019700 } && test -s conftest$ac_exeext &&
19701 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019702 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019705sed 's/^/| /' conftest.$ac_ext >&5
19706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019707 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019709
19710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019711 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019713ac_res=`eval echo '${'$as_ac_var'}'`
19714 { echo "$as_me:$LINENO: result: $ac_res" >&5
19715echo "${ECHO_T}$ac_res" >&6; }
19716if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019717 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019719_ACEOF
19720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019721/* confdefs.h. */
19722_ACEOF
19723cat confdefs.h >>conftest.$ac_ext
19724cat >>conftest.$ac_ext <<_ACEOF
19725/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019726#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019727int
19728main ()
19729{
19730setpgrp(0,0);
19731 ;
19732 return 0;
19733}
19734_ACEOF
19735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019736if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +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
19751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019752
19753cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019754#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019755_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019756
Jack Jansen150753c2003-03-29 22:07:47 +000019757
19758else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019760sed 's/^/| /' conftest.$ac_ext >&5
19761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019762
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019764
19765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019766
19767fi
19768done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019769
Martin v. Löwis11437992002-04-12 09:54:03 +000019770
Thomas Wouters3a584202000-08-05 23:28:51 +000019771for ac_func in gettimeofday
19772do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019773as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19774{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19775echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019776if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019778else
Martin v. Löwis11437992002-04-12 09:54:03 +000019779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019780/* confdefs.h. */
19781_ACEOF
19782cat confdefs.h >>conftest.$ac_ext
19783cat >>conftest.$ac_ext <<_ACEOF
19784/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019785/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19786 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19787#define $ac_func innocuous_$ac_func
19788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019789/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019790 which can conflict with char $ac_func (); below.
19791 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019792 <limits.h> exists even on freestanding compilers. */
19793
19794#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019795# include <limits.h>
19796#else
19797# include <assert.h>
19798#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019799
19800#undef $ac_func
19801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019802/* Override any GCC internal prototype to avoid an error.
19803 Use char because int might match the return type of a GCC
19804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019805#ifdef __cplusplus
19806extern "C"
19807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019808char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019809/* The GNU C library defines this for functions which it implements
19810 to always fail with ENOSYS. Some functions are actually named
19811 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019812#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019813choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019814#endif
19815
Skip Montanaro6dead952003-09-25 14:50:04 +000019816int
19817main ()
19818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019819return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019820 ;
19821 return 0;
19822}
19823_ACEOF
19824rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825if { (ac_try="$ac_link"
19826case "(($ac_try" in
19827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19828 *) ac_try_echo=$ac_try;;
19829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019831 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019833 grep -v '^ *+' conftest.er1 >conftest.err
19834 rm -f conftest.er1
19835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019837 (exit $ac_status); } && {
19838 test -z "$ac_c_werror_flag" ||
19839 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019840 } && test -s conftest$ac_exeext &&
19841 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019845sed 's/^/| /' conftest.$ac_ext >&5
19846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019847 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019849
19850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019851 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019853ac_res=`eval echo '${'$as_ac_var'}'`
19854 { echo "$as_me:$LINENO: result: $ac_res" >&5
19855echo "${ECHO_T}$ac_res" >&6; }
19856if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019858#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019859_ACEOF
19860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019861/* confdefs.h. */
19862_ACEOF
19863cat confdefs.h >>conftest.$ac_ext
19864cat >>conftest.$ac_ext <<_ACEOF
19865/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019866#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019867int
19868main ()
19869{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019870gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 ;
19872 return 0;
19873}
19874_ACEOF
19875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019876if { (ac_try="$ac_compile"
19877case "(($ac_try" in
19878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19879 *) ac_try_echo=$ac_try;;
19880esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019884 grep -v '^ *+' conftest.er1 >conftest.err
19885 rm -f conftest.er1
19886 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019888 (exit $ac_status); } && {
19889 test -z "$ac_c_werror_flag" ||
19890 test ! -s conftest.err
19891 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019892 :
19893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019895sed 's/^/| /' conftest.$ac_ext >&5
19896
Martin v. Löwis11437992002-04-12 09:54:03 +000019897
19898cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019899#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019901
Martin v. Löwis11437992002-04-12 09:54:03 +000019902
Guido van Rossum627b2d71993-12-24 10:39:16 +000019903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904
19905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019907fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019908done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019909
Michael W. Hudson54241132001-12-07 15:38:26 +000019910
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019911{ echo "$as_me:$LINENO: checking for major" >&5
19912echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019914/* confdefs.h. */
19915_ACEOF
19916cat confdefs.h >>conftest.$ac_ext
19917cat >>conftest.$ac_ext <<_ACEOF
19918/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019919
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019920#if defined(MAJOR_IN_MKDEV)
19921#include <sys/mkdev.h>
19922#elif defined(MAJOR_IN_SYSMACROS)
19923#include <sys/sysmacros.h>
19924#else
19925#include <sys/types.h>
19926#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019927
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019928int
19929main ()
19930{
19931
19932 makedev(major(0),minor(0));
19933
19934 ;
19935 return 0;
19936}
19937_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019938rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019939if { (ac_try="$ac_link"
19940case "(($ac_try" in
19941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19942 *) ac_try_echo=$ac_try;;
19943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019945 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019947 grep -v '^ *+' conftest.er1 >conftest.err
19948 rm -f conftest.er1
19949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019951 (exit $ac_status); } && {
19952 test -z "$ac_c_werror_flag" ||
19953 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019954 } && test -s conftest$ac_exeext &&
19955 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019956
19957
19958cat >>confdefs.h <<\_ACEOF
19959#define HAVE_DEVICE_MACROS 1
19960_ACEOF
19961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019962 { echo "$as_me:$LINENO: result: yes" >&5
19963echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019964
19965else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019967sed 's/^/| /' conftest.$ac_ext >&5
19968
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019969
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019970 { echo "$as_me:$LINENO: result: no" >&5
19971echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019972
19973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019974
19975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019976 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019977
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019978# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019979# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019980{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19981echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019988
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019989#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019990#include <sys/socket.h>
19991#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019992#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019993
Martin v. Löwis11437992002-04-12 09:54:03 +000019994int
19995main ()
19996{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019997getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 ;
19999 return 0;
20000}
20001_ACEOF
20002rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020003if { (ac_try="$ac_link"
20004case "(($ac_try" in
20005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20006 *) ac_try_echo=$ac_try;;
20007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020011 grep -v '^ *+' conftest.er1 >conftest.err
20012 rm -f conftest.er1
20013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020015 (exit $ac_status); } && {
20016 test -z "$ac_c_werror_flag" ||
20017 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020018 } && test -s conftest$ac_exeext &&
20019 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020020 have_getaddrinfo=yes
20021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020022 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020023sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020025 have_getaddrinfo=no
20026fi
20027
20028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20029 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020030{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20031echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020032if test $have_getaddrinfo = yes
20033then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020034 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20035echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020036 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020037 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020038else
20039 if test "$cross_compiling" = yes; then
20040 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020041else
Martin v. Löwis11437992002-04-12 09:54:03 +000020042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020043/* confdefs.h. */
20044_ACEOF
20045cat confdefs.h >>conftest.$ac_ext
20046cat >>conftest.$ac_ext <<_ACEOF
20047/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020048
20049#include <sys/types.h>
20050#include <netdb.h>
20051#include <string.h>
20052#include <sys/socket.h>
20053#include <netinet/in.h>
20054
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020055int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020056{
20057 int passive, gaierr, inet4 = 0, inet6 = 0;
20058 struct addrinfo hints, *ai, *aitop;
20059 char straddr[INET6_ADDRSTRLEN], strport[16];
20060
20061 for (passive = 0; passive <= 1; passive++) {
20062 memset(&hints, 0, sizeof(hints));
20063 hints.ai_family = AF_UNSPEC;
20064 hints.ai_flags = passive ? AI_PASSIVE : 0;
20065 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020066 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020067 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20068 (void)gai_strerror(gaierr);
20069 goto bad;
20070 }
20071 for (ai = aitop; ai; ai = ai->ai_next) {
20072 if (ai->ai_addr == NULL ||
20073 ai->ai_addrlen == 0 ||
20074 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20075 straddr, sizeof(straddr), strport, sizeof(strport),
20076 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20077 goto bad;
20078 }
20079 switch (ai->ai_family) {
20080 case AF_INET:
20081 if (strcmp(strport, "54321") != 0) {
20082 goto bad;
20083 }
20084 if (passive) {
20085 if (strcmp(straddr, "0.0.0.0") != 0) {
20086 goto bad;
20087 }
20088 } else {
20089 if (strcmp(straddr, "127.0.0.1") != 0) {
20090 goto bad;
20091 }
20092 }
20093 inet4++;
20094 break;
20095 case AF_INET6:
20096 if (strcmp(strport, "54321") != 0) {
20097 goto bad;
20098 }
20099 if (passive) {
20100 if (strcmp(straddr, "::") != 0) {
20101 goto bad;
20102 }
20103 } else {
20104 if (strcmp(straddr, "::1") != 0) {
20105 goto bad;
20106 }
20107 }
20108 inet6++;
20109 break;
20110 case AF_UNSPEC:
20111 goto bad;
20112 break;
20113 default:
20114 /* another family support? */
20115 break;
20116 }
20117 }
20118 }
20119
20120 if (!(inet4 == 0 || inet4 == 2))
20121 goto bad;
20122 if (!(inet6 == 0 || inet6 == 2))
20123 goto bad;
20124
20125 if (aitop)
20126 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020127 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020128
20129 bad:
20130 if (aitop)
20131 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020132 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020133}
20134
Martin v. Löwis11437992002-04-12 09:54:03 +000020135_ACEOF
20136rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020137if { (ac_try="$ac_link"
20138case "(($ac_try" in
20139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20140 *) ac_try_echo=$ac_try;;
20141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020143 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020147 { (case "(($ac_try" in
20148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149 *) ac_try_echo=$ac_try;;
20150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020156 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020157else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020158 echo "$as_me: program exited with status $ac_status" >&5
20159echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020160sed 's/^/| /' conftest.$ac_ext >&5
20161
Martin v. Löwis11437992002-04-12 09:54:03 +000020162( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020163ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020165rm -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 +000020166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020167
20168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020169fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020170
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020173if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20174then
20175 if test $ipv6 = yes
20176 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020177 echo 'Fatal: You must get working getaddrinfo() function.'
20178 echo ' or you can specify "--disable-ipv6"'.
20179 exit 1
20180 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020181else
Martin v. Löwis11437992002-04-12 09:54:03 +000020182
20183cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020184#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020185_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020186
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020188
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020189for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020190do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20192{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020194if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020196else
Martin v. Löwis11437992002-04-12 09:54:03 +000020197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020198/* confdefs.h. */
20199_ACEOF
20200cat confdefs.h >>conftest.$ac_ext
20201cat >>conftest.$ac_ext <<_ACEOF
20202/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020203/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20204 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20205#define $ac_func innocuous_$ac_func
20206
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020207/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020208 which can conflict with char $ac_func (); below.
20209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020210 <limits.h> exists even on freestanding compilers. */
20211
20212#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020213# include <limits.h>
20214#else
20215# include <assert.h>
20216#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020217
20218#undef $ac_func
20219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020220/* Override any GCC internal prototype to avoid an error.
20221 Use char because int might match the return type of a GCC
20222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020223#ifdef __cplusplus
20224extern "C"
20225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020226char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020227/* The GNU C library defines this for functions which it implements
20228 to always fail with ENOSYS. Some functions are actually named
20229 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020230#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020231choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020232#endif
20233
Skip Montanaro6dead952003-09-25 14:50:04 +000020234int
20235main ()
20236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020237return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020238 ;
20239 return 0;
20240}
20241_ACEOF
20242rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243if { (ac_try="$ac_link"
20244case "(($ac_try" in
20245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20246 *) ac_try_echo=$ac_try;;
20247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020249 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020251 grep -v '^ *+' conftest.er1 >conftest.err
20252 rm -f conftest.er1
20253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020255 (exit $ac_status); } && {
20256 test -z "$ac_c_werror_flag" ||
20257 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020258 } && test -s conftest$ac_exeext &&
20259 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020260 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020263sed 's/^/| /' conftest.$ac_ext >&5
20264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020265 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020266fi
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 +000020270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020271ac_res=`eval echo '${'$as_ac_var'}'`
20272 { echo "$as_me:$LINENO: result: $ac_res" >&5
20273echo "${ECHO_T}$ac_res" >&6; }
20274if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020275 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020276#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020277_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020279fi
20280done
20281
Michael W. Hudson54241132001-12-07 15:38:26 +000020282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020283# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020284{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20285echo $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 +000020286if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020288else
Martin v. Löwis11437992002-04-12 09:54:03 +000020289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020290/* confdefs.h. */
20291_ACEOF
20292cat confdefs.h >>conftest.$ac_ext
20293cat >>conftest.$ac_ext <<_ACEOF
20294/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020295#include <sys/types.h>
20296#include <sys/time.h>
20297#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020298
Martin v. Löwis11437992002-04-12 09:54:03 +000020299int
20300main ()
20301{
20302if ((struct tm *) 0)
20303return 0;
20304 ;
20305 return 0;
20306}
20307_ACEOF
20308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020309if { (ac_try="$ac_compile"
20310case "(($ac_try" in
20311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20312 *) ac_try_echo=$ac_try;;
20313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020317 grep -v '^ *+' conftest.er1 >conftest.err
20318 rm -f conftest.er1
20319 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020321 (exit $ac_status); } && {
20322 test -z "$ac_c_werror_flag" ||
20323 test ! -s conftest.err
20324 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020325 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020328sed 's/^/| /' conftest.$ac_ext >&5
20329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020330 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020332
20333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020334fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020335{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20336echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020337if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020338
20339cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020340#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020341_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020342
20343fi
20344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020345{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20346echo $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 +000020347if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020349else
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020351/* confdefs.h. */
20352_ACEOF
20353cat confdefs.h >>conftest.$ac_ext
20354cat >>conftest.$ac_ext <<_ACEOF
20355/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020356#include <sys/types.h>
20357#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020358
Martin v. Löwis11437992002-04-12 09:54:03 +000020359int
20360main ()
20361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362struct tm tm;
20363 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020364 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 ;
20366 return 0;
20367}
20368_ACEOF
20369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370if { (ac_try="$ac_compile"
20371case "(($ac_try" in
20372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20373 *) ac_try_echo=$ac_try;;
20374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020378 grep -v '^ *+' conftest.er1 >conftest.err
20379 rm -f conftest.er1
20380 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382 (exit $ac_status); } && {
20383 test -z "$ac_c_werror_flag" ||
20384 test ! -s conftest.err
20385 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020386 ac_cv_struct_tm=time.h
20387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020389sed 's/^/| /' conftest.$ac_ext >&5
20390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020391 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020393
20394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020395fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020396{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20397echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020398if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020399
20400cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020401#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020402_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020403
20404fi
20405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020406{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20407echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020408if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020410else
Martin v. Löwis11437992002-04-12 09:54:03 +000020411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020412/* confdefs.h. */
20413_ACEOF
20414cat confdefs.h >>conftest.$ac_ext
20415cat >>conftest.$ac_ext <<_ACEOF
20416/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020417#include <sys/types.h>
20418#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020419
20420
Martin v. Löwis11437992002-04-12 09:54:03 +000020421int
20422main ()
20423{
20424static struct tm ac_aggr;
20425if (ac_aggr.tm_zone)
20426return 0;
20427 ;
20428 return 0;
20429}
20430_ACEOF
20431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020432if { (ac_try="$ac_compile"
20433case "(($ac_try" in
20434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20435 *) ac_try_echo=$ac_try;;
20436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020440 grep -v '^ *+' conftest.er1 >conftest.err
20441 rm -f conftest.er1
20442 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444 (exit $ac_status); } && {
20445 test -z "$ac_c_werror_flag" ||
20446 test ! -s conftest.err
20447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020451sed 's/^/| /' conftest.$ac_ext >&5
20452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020454/* confdefs.h. */
20455_ACEOF
20456cat confdefs.h >>conftest.$ac_ext
20457cat >>conftest.$ac_ext <<_ACEOF
20458/* end confdefs.h. */
20459#include <sys/types.h>
20460#include <$ac_cv_struct_tm>
20461
20462
20463int
20464main ()
20465{
20466static struct tm ac_aggr;
20467if (sizeof ac_aggr.tm_zone)
20468return 0;
20469 ;
20470 return 0;
20471}
20472_ACEOF
20473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020474if { (ac_try="$ac_compile"
20475case "(($ac_try" in
20476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20477 *) ac_try_echo=$ac_try;;
20478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020480 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020482 grep -v '^ *+' conftest.er1 >conftest.err
20483 rm -f conftest.er1
20484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020486 (exit $ac_status); } && {
20487 test -z "$ac_c_werror_flag" ||
20488 test ! -s conftest.err
20489 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020490 ac_cv_member_struct_tm_tm_zone=yes
20491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020493sed 's/^/| /' conftest.$ac_ext >&5
20494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020495 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497
20498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020500
20501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020502fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020503{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20504echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20505if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020506
20507cat >>confdefs.h <<_ACEOF
20508#define HAVE_STRUCT_TM_TM_ZONE 1
20509_ACEOF
20510
20511
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020512fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020513
Martin v. Löwis11437992002-04-12 09:54:03 +000020514if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20515
20516cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020518_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020519
20520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020521 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20522echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020523if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020524 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020525else
20526 cat >conftest.$ac_ext <<_ACEOF
20527/* confdefs.h. */
20528_ACEOF
20529cat confdefs.h >>conftest.$ac_ext
20530cat >>conftest.$ac_ext <<_ACEOF
20531/* end confdefs.h. */
20532#include <time.h>
20533
20534int
20535main ()
20536{
20537#ifndef tzname
20538 (void) tzname;
20539#endif
20540
20541 ;
20542 return 0;
20543}
20544_ACEOF
20545rm -f conftest.$ac_objext
20546if { (ac_try="$ac_compile"
20547case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020552 (eval "$ac_compile") 2>conftest.er1
20553 ac_status=$?
20554 grep -v '^ *+' conftest.er1 >conftest.err
20555 rm -f conftest.er1
20556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020558 (exit $ac_status); } && {
20559 test -z "$ac_c_werror_flag" ||
20560 test ! -s conftest.err
20561 } && test -s conftest.$ac_objext; then
20562 ac_cv_have_decl_tzname=yes
20563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020564 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020565sed 's/^/| /' conftest.$ac_ext >&5
20566
20567 ac_cv_have_decl_tzname=no
20568fi
20569
20570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020572{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20573echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20574if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020575
20576cat >>confdefs.h <<_ACEOF
20577#define HAVE_DECL_TZNAME 1
20578_ACEOF
20579
20580
20581else
20582 cat >>confdefs.h <<_ACEOF
20583#define HAVE_DECL_TZNAME 0
20584_ACEOF
20585
20586
20587fi
20588
20589
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020590 { echo "$as_me:$LINENO: checking for tzname" >&5
20591echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020592if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020594else
Martin v. Löwis11437992002-04-12 09:54:03 +000020595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020596/* confdefs.h. */
20597_ACEOF
20598cat confdefs.h >>conftest.$ac_ext
20599cat >>conftest.$ac_ext <<_ACEOF
20600/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020601#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020602#if !HAVE_DECL_TZNAME
20603extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020605
Martin v. Löwis11437992002-04-12 09:54:03 +000020606int
20607main ()
20608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020609return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020610 ;
20611 return 0;
20612}
20613_ACEOF
20614rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020615if { (ac_try="$ac_link"
20616case "(($ac_try" in
20617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20618 *) ac_try_echo=$ac_try;;
20619esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020621 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 grep -v '^ *+' conftest.er1 >conftest.err
20624 rm -f conftest.er1
20625 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020627 (exit $ac_status); } && {
20628 test -z "$ac_c_werror_flag" ||
20629 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020630 } && test -s conftest$ac_exeext &&
20631 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020632 ac_cv_var_tzname=yes
20633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020635sed 's/^/| /' conftest.$ac_ext >&5
20636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020637 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639
20640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020641 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020642fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020643{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20644echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020645 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020646
20647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020648#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020649_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020651 fi
20652fi
20653
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020654{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20655echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020656if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020657 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020658else
20659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020660/* confdefs.h. */
20661_ACEOF
20662cat confdefs.h >>conftest.$ac_ext
20663cat >>conftest.$ac_ext <<_ACEOF
20664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020665$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020666int
20667main ()
20668{
20669static struct stat ac_aggr;
20670if (ac_aggr.st_rdev)
20671return 0;
20672 ;
20673 return 0;
20674}
20675_ACEOF
20676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677if { (ac_try="$ac_compile"
20678case "(($ac_try" in
20679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20680 *) ac_try_echo=$ac_try;;
20681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020685 grep -v '^ *+' conftest.er1 >conftest.err
20686 rm -f conftest.er1
20687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689 (exit $ac_status); } && {
20690 test -z "$ac_c_werror_flag" ||
20691 test ! -s conftest.err
20692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 ac_cv_member_struct_stat_st_rdev=yes
20694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020696sed 's/^/| /' conftest.$ac_ext >&5
20697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
20704$ac_includes_default
20705int
20706main ()
20707{
20708static struct stat ac_aggr;
20709if (sizeof ac_aggr.st_rdev)
20710return 0;
20711 ;
20712 return 0;
20713}
20714_ACEOF
20715rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020716if { (ac_try="$ac_compile"
20717case "(($ac_try" in
20718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20719 *) ac_try_echo=$ac_try;;
20720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020722 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020724 grep -v '^ *+' conftest.er1 >conftest.err
20725 rm -f conftest.er1
20726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020728 (exit $ac_status); } && {
20729 test -z "$ac_c_werror_flag" ||
20730 test ! -s conftest.err
20731 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020732 ac_cv_member_struct_stat_st_rdev=yes
20733else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020735sed 's/^/| /' conftest.$ac_ext >&5
20736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020739
20740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742
20743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020744fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020745{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20746echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20747if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020748
20749cat >>confdefs.h <<_ACEOF
20750#define HAVE_STRUCT_STAT_ST_RDEV 1
20751_ACEOF
20752
20753
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020754fi
20755
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020756{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20757echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020758if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020760else
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020762/* confdefs.h. */
20763_ACEOF
20764cat confdefs.h >>conftest.$ac_ext
20765cat >>conftest.$ac_ext <<_ACEOF
20766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020768int
20769main ()
20770{
20771static struct stat ac_aggr;
20772if (ac_aggr.st_blksize)
20773return 0;
20774 ;
20775 return 0;
20776}
20777_ACEOF
20778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779if { (ac_try="$ac_compile"
20780case "(($ac_try" in
20781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20782 *) ac_try_echo=$ac_try;;
20783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020787 grep -v '^ *+' conftest.er1 >conftest.err
20788 rm -f conftest.er1
20789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 (exit $ac_status); } && {
20792 test -z "$ac_c_werror_flag" ||
20793 test ! -s conftest.err
20794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020796else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020798sed 's/^/| /' conftest.$ac_ext >&5
20799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020801/* confdefs.h. */
20802_ACEOF
20803cat confdefs.h >>conftest.$ac_ext
20804cat >>conftest.$ac_ext <<_ACEOF
20805/* end confdefs.h. */
20806$ac_includes_default
20807int
20808main ()
20809{
20810static struct stat ac_aggr;
20811if (sizeof ac_aggr.st_blksize)
20812return 0;
20813 ;
20814 return 0;
20815}
20816_ACEOF
20817rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020818if { (ac_try="$ac_compile"
20819case "(($ac_try" in
20820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20821 *) ac_try_echo=$ac_try;;
20822esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020826 grep -v '^ *+' conftest.er1 >conftest.err
20827 rm -f conftest.er1
20828 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020830 (exit $ac_status); } && {
20831 test -z "$ac_c_werror_flag" ||
20832 test ! -s conftest.err
20833 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020834 ac_cv_member_struct_stat_st_blksize=yes
20835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020837sed 's/^/| /' conftest.$ac_ext >&5
20838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020839 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020841
20842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020844
20845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020847{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20848echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20849if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020850
Martin v. Löwis11437992002-04-12 09:54:03 +000020851cat >>confdefs.h <<_ACEOF
20852#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20853_ACEOF
20854
20855
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020856fi
20857
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020858{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20859echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020860if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020861 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020862else
20863 cat >conftest.$ac_ext <<_ACEOF
20864/* confdefs.h. */
20865_ACEOF
20866cat confdefs.h >>conftest.$ac_ext
20867cat >>conftest.$ac_ext <<_ACEOF
20868/* end confdefs.h. */
20869$ac_includes_default
20870int
20871main ()
20872{
20873static struct stat ac_aggr;
20874if (ac_aggr.st_flags)
20875return 0;
20876 ;
20877 return 0;
20878}
20879_ACEOF
20880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881if { (ac_try="$ac_compile"
20882case "(($ac_try" in
20883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20884 *) ac_try_echo=$ac_try;;
20885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020887 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020888 ac_status=$?
20889 grep -v '^ *+' conftest.er1 >conftest.err
20890 rm -f conftest.er1
20891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893 (exit $ac_status); } && {
20894 test -z "$ac_c_werror_flag" ||
20895 test ! -s conftest.err
20896 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020897 ac_cv_member_struct_stat_st_flags=yes
20898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020899 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020900sed 's/^/| /' conftest.$ac_ext >&5
20901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020903/* confdefs.h. */
20904_ACEOF
20905cat confdefs.h >>conftest.$ac_ext
20906cat >>conftest.$ac_ext <<_ACEOF
20907/* end confdefs.h. */
20908$ac_includes_default
20909int
20910main ()
20911{
20912static struct stat ac_aggr;
20913if (sizeof ac_aggr.st_flags)
20914return 0;
20915 ;
20916 return 0;
20917}
20918_ACEOF
20919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920if { (ac_try="$ac_compile"
20921case "(($ac_try" in
20922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20923 *) ac_try_echo=$ac_try;;
20924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020926 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020927 ac_status=$?
20928 grep -v '^ *+' conftest.er1 >conftest.err
20929 rm -f conftest.er1
20930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932 (exit $ac_status); } && {
20933 test -z "$ac_c_werror_flag" ||
20934 test ! -s conftest.err
20935 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020936 ac_cv_member_struct_stat_st_flags=yes
20937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020938 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020939sed 's/^/| /' conftest.$ac_ext >&5
20940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020943
20944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020946
20947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020948fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020949{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20950echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20951if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020952
20953cat >>confdefs.h <<_ACEOF
20954#define HAVE_STRUCT_STAT_ST_FLAGS 1
20955_ACEOF
20956
20957
20958fi
20959
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020960{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20961echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020962if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020964else
20965 cat >conftest.$ac_ext <<_ACEOF
20966/* confdefs.h. */
20967_ACEOF
20968cat confdefs.h >>conftest.$ac_ext
20969cat >>conftest.$ac_ext <<_ACEOF
20970/* end confdefs.h. */
20971$ac_includes_default
20972int
20973main ()
20974{
20975static struct stat ac_aggr;
20976if (ac_aggr.st_gen)
20977return 0;
20978 ;
20979 return 0;
20980}
20981_ACEOF
20982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983if { (ac_try="$ac_compile"
20984case "(($ac_try" in
20985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20986 *) ac_try_echo=$ac_try;;
20987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020990 ac_status=$?
20991 grep -v '^ *+' conftest.er1 >conftest.err
20992 rm -f conftest.er1
20993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020995 (exit $ac_status); } && {
20996 test -z "$ac_c_werror_flag" ||
20997 test ! -s conftest.err
20998 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020999 ac_cv_member_struct_stat_st_gen=yes
21000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021001 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021002sed 's/^/| /' conftest.$ac_ext >&5
21003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021004 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021005/* confdefs.h. */
21006_ACEOF
21007cat confdefs.h >>conftest.$ac_ext
21008cat >>conftest.$ac_ext <<_ACEOF
21009/* end confdefs.h. */
21010$ac_includes_default
21011int
21012main ()
21013{
21014static struct stat ac_aggr;
21015if (sizeof ac_aggr.st_gen)
21016return 0;
21017 ;
21018 return 0;
21019}
21020_ACEOF
21021rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022if { (ac_try="$ac_compile"
21023case "(($ac_try" in
21024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21025 *) ac_try_echo=$ac_try;;
21026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021029 ac_status=$?
21030 grep -v '^ *+' conftest.er1 >conftest.err
21031 rm -f conftest.er1
21032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034 (exit $ac_status); } && {
21035 test -z "$ac_c_werror_flag" ||
21036 test ! -s conftest.err
21037 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021038 ac_cv_member_struct_stat_st_gen=yes
21039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021040 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021041sed 's/^/| /' conftest.$ac_ext >&5
21042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021043 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021045
21046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021048
21049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021050fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021051{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21052echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21053if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021054
21055cat >>confdefs.h <<_ACEOF
21056#define HAVE_STRUCT_STAT_ST_GEN 1
21057_ACEOF
21058
21059
21060fi
21061
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021062{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21063echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021064if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021065 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021066else
21067 cat >conftest.$ac_ext <<_ACEOF
21068/* confdefs.h. */
21069_ACEOF
21070cat confdefs.h >>conftest.$ac_ext
21071cat >>conftest.$ac_ext <<_ACEOF
21072/* end confdefs.h. */
21073$ac_includes_default
21074int
21075main ()
21076{
21077static struct stat ac_aggr;
21078if (ac_aggr.st_birthtime)
21079return 0;
21080 ;
21081 return 0;
21082}
21083_ACEOF
21084rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085if { (ac_try="$ac_compile"
21086case "(($ac_try" in
21087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21088 *) ac_try_echo=$ac_try;;
21089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021092 ac_status=$?
21093 grep -v '^ *+' conftest.er1 >conftest.err
21094 rm -f conftest.er1
21095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097 (exit $ac_status); } && {
21098 test -z "$ac_c_werror_flag" ||
21099 test ! -s conftest.err
21100 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021101 ac_cv_member_struct_stat_st_birthtime=yes
21102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021103 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021104sed 's/^/| /' conftest.$ac_ext >&5
21105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021106 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021107/* confdefs.h. */
21108_ACEOF
21109cat confdefs.h >>conftest.$ac_ext
21110cat >>conftest.$ac_ext <<_ACEOF
21111/* end confdefs.h. */
21112$ac_includes_default
21113int
21114main ()
21115{
21116static struct stat ac_aggr;
21117if (sizeof ac_aggr.st_birthtime)
21118return 0;
21119 ;
21120 return 0;
21121}
21122_ACEOF
21123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021124if { (ac_try="$ac_compile"
21125case "(($ac_try" in
21126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21127 *) ac_try_echo=$ac_try;;
21128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021131 ac_status=$?
21132 grep -v '^ *+' conftest.er1 >conftest.err
21133 rm -f conftest.er1
21134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136 (exit $ac_status); } && {
21137 test -z "$ac_c_werror_flag" ||
21138 test ! -s conftest.err
21139 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021140 ac_cv_member_struct_stat_st_birthtime=yes
21141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021142 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021143sed 's/^/| /' conftest.$ac_ext >&5
21144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021145 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021147
21148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150
21151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021152fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021153{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21154echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21155if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021156
21157cat >>confdefs.h <<_ACEOF
21158#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21159_ACEOF
21160
21161
21162fi
21163
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021164{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21165echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021166if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021168else
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021170/* confdefs.h. */
21171_ACEOF
21172cat confdefs.h >>conftest.$ac_ext
21173cat >>conftest.$ac_ext <<_ACEOF
21174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021175$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021176int
21177main ()
21178{
21179static struct stat ac_aggr;
21180if (ac_aggr.st_blocks)
21181return 0;
21182 ;
21183 return 0;
21184}
21185_ACEOF
21186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021187if { (ac_try="$ac_compile"
21188case "(($ac_try" in
21189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21190 *) ac_try_echo=$ac_try;;
21191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021195 grep -v '^ *+' conftest.er1 >conftest.err
21196 rm -f conftest.er1
21197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199 (exit $ac_status); } && {
21200 test -z "$ac_c_werror_flag" ||
21201 test ! -s conftest.err
21202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021203 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021206sed 's/^/| /' conftest.$ac_ext >&5
21207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021209/* confdefs.h. */
21210_ACEOF
21211cat confdefs.h >>conftest.$ac_ext
21212cat >>conftest.$ac_ext <<_ACEOF
21213/* end confdefs.h. */
21214$ac_includes_default
21215int
21216main ()
21217{
21218static struct stat ac_aggr;
21219if (sizeof ac_aggr.st_blocks)
21220return 0;
21221 ;
21222 return 0;
21223}
21224_ACEOF
21225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021226if { (ac_try="$ac_compile"
21227case "(($ac_try" in
21228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21229 *) ac_try_echo=$ac_try;;
21230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021232 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021234 grep -v '^ *+' conftest.er1 >conftest.err
21235 rm -f conftest.er1
21236 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021238 (exit $ac_status); } && {
21239 test -z "$ac_c_werror_flag" ||
21240 test ! -s conftest.err
21241 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021242 ac_cv_member_struct_stat_st_blocks=yes
21243else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021245sed 's/^/| /' conftest.$ac_ext >&5
21246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021247 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021249
21250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252
21253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021254fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021255{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21256echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21257if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021258
Martin v. Löwis11437992002-04-12 09:54:03 +000021259cat >>confdefs.h <<_ACEOF
21260#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21261_ACEOF
21262
21263
21264cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021265#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021266_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021267
21268else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021269 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021271 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21272 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021273esac
21274
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021275fi
21276
Michael W. Hudson54241132001-12-07 15:38:26 +000021277
Martin v. Löwis11437992002-04-12 09:54:03 +000021278
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021279{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21280echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021281if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021283else
Martin v. Löwis11437992002-04-12 09:54:03 +000021284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021285/* confdefs.h. */
21286_ACEOF
21287cat confdefs.h >>conftest.$ac_ext
21288cat >>conftest.$ac_ext <<_ACEOF
21289/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021290#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021291int
21292main ()
21293{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021294return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021295 ;
21296 return 0;
21297}
21298_ACEOF
21299rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021300if { (ac_try="$ac_compile"
21301case "(($ac_try" in
21302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21303 *) ac_try_echo=$ac_try;;
21304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 grep -v '^ *+' conftest.er1 >conftest.err
21309 rm -f conftest.er1
21310 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312 (exit $ac_status); } && {
21313 test -z "$ac_c_werror_flag" ||
21314 test ! -s conftest.err
21315 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021316 ac_cv_header_time_altzone=yes
21317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021319sed 's/^/| /' conftest.$ac_ext >&5
21320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021322fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21325fi
21326
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021327{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21328echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021329if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021330
21331cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021332#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021333_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021334
21335fi
21336
Guido van Rossumda88dad1995-01-26 00:46:29 +000021337was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021338{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21339echo $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 +000021340cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021341/* confdefs.h. */
21342_ACEOF
21343cat confdefs.h >>conftest.$ac_ext
21344cat >>conftest.$ac_ext <<_ACEOF
21345/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021346
21347#include <sys/types.h>
21348#include <sys/select.h>
21349#include <sys/time.h>
21350
Martin v. Löwis11437992002-04-12 09:54:03 +000021351int
21352main ()
21353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021354;
Martin v. Löwis11437992002-04-12 09:54:03 +000021355 ;
21356 return 0;
21357}
21358_ACEOF
21359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360if { (ac_try="$ac_compile"
21361case "(($ac_try" in
21362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363 *) ac_try_echo=$ac_try;;
21364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368 grep -v '^ *+' conftest.er1 >conftest.err
21369 rm -f conftest.er1
21370 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021372 (exit $ac_status); } && {
21373 test -z "$ac_c_werror_flag" ||
21374 test ! -s conftest.err
21375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021376
21377
21378cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021379#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021380_ACEOF
21381
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021382 was_it_defined=yes
21383
Guido van Rossumf78abae1997-01-21 22:02:36 +000021384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021386sed 's/^/| /' conftest.$ac_ext >&5
21387
Thomas Wouters477c8d52006-05-27 19:21:47 +000021388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021389fi
21390
21391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021392{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21393echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021395{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21396echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021397if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021399else
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021401/* confdefs.h. */
21402_ACEOF
21403cat confdefs.h >>conftest.$ac_ext
21404cat >>conftest.$ac_ext <<_ACEOF
21405/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021406
21407# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021408int
21409main ()
21410{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021411struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 ;
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öwis11437992002-04-12 09:54:03 +000021424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021425 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öwis01dfdb32001-06-23 16:30:13 +000021433 ac_cv_struct_addrinfo=yes
21434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021436sed 's/^/| /' conftest.$ac_ext >&5
21437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021439fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21442fi
21443
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021444{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21445echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021446if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021447
21448cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021449#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021450_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021451
21452fi
21453
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021454{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21455echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021456if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021458else
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021460/* confdefs.h. */
21461_ACEOF
21462cat confdefs.h >>conftest.$ac_ext
21463cat >>conftest.$ac_ext <<_ACEOF
21464/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021465
21466# include <sys/types.h>
21467# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021468int
21469main ()
21470{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021471struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021472 ;
21473 return 0;
21474}
21475_ACEOF
21476rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477if { (ac_try="$ac_compile"
21478case "(($ac_try" in
21479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21480 *) ac_try_echo=$ac_try;;
21481esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021485 grep -v '^ *+' conftest.er1 >conftest.err
21486 rm -f conftest.er1
21487 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021489 (exit $ac_status); } && {
21490 test -z "$ac_c_werror_flag" ||
21491 test ! -s conftest.err
21492 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021493 ac_cv_struct_sockaddr_storage=yes
21494else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021496sed 's/^/| /' conftest.$ac_ext >&5
21497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021498 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21502fi
21503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021504{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21505echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021506if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021507
21508cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021509#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021510_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021511
21512fi
21513
Guido van Rossum627b2d71993-12-24 10:39:16 +000021514# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021515
Michael W. Hudson54241132001-12-07 15:38:26 +000021516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021517{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21518echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021519if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021520 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021521else
Martin v. Löwis11437992002-04-12 09:54:03 +000021522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021523/* confdefs.h. */
21524_ACEOF
21525cat confdefs.h >>conftest.$ac_ext
21526cat >>conftest.$ac_ext <<_ACEOF
21527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021528$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021529int
21530main ()
21531{
21532static int test_array [1 - 2 * !(((char) -1) < 0)];
21533test_array [0] = 0
21534
21535 ;
21536 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021537}
Martin v. Löwis11437992002-04-12 09:54:03 +000021538_ACEOF
21539rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021540if { (ac_try="$ac_compile"
21541case "(($ac_try" in
21542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21543 *) ac_try_echo=$ac_try;;
21544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021548 grep -v '^ *+' conftest.er1 >conftest.err
21549 rm -f conftest.er1
21550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021552 (exit $ac_status); } && {
21553 test -z "$ac_c_werror_flag" ||
21554 test ! -s conftest.err
21555 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021556 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021559sed 's/^/| /' conftest.$ac_ext >&5
21560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021561 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021563
21564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021565fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021566{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21567echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021568if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021569 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021570#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021572
21573fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021575{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21576echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021577if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021579else
21580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021581/* confdefs.h. */
21582_ACEOF
21583cat confdefs.h >>conftest.$ac_ext
21584cat >>conftest.$ac_ext <<_ACEOF
21585/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021586
Martin v. Löwis11437992002-04-12 09:54:03 +000021587int
21588main ()
21589{
21590/* FIXME: Include the comments suggested by Paul. */
21591#ifndef __cplusplus
21592 /* Ultrix mips cc rejects this. */
21593 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021595 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021596 char const *const *pcpcc;
21597 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021598 /* NEC SVR4.0.2 mips cc rejects this. */
21599 struct point {int x, y;};
21600 static struct point const zero = {0,0};
21601 /* AIX XL C 1.02.0.0 rejects this.
21602 It does not let you subtract one const X* pointer from another in
21603 an arm of an if-expression whose if-part is not a constant
21604 expression */
21605 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021606 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021607 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021608 ++pcpcc;
21609 ppc = (char**) pcpcc;
21610 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021611 { /* SCO 3.2v4 cc rejects this. */
21612 char *t;
21613 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021614
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021616 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021617 }
21618 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21619 int x[] = {25, 17};
21620 const int *foo = &x[0];
21621 ++foo;
21622 }
21623 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21624 typedef const int *iptr;
21625 iptr p = 0;
21626 ++p;
21627 }
21628 { /* AIX XL C 1.02.0.0 rejects this saying
21629 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21630 struct s { int j; const int *ap[3]; };
21631 struct s *b; b->j = 5;
21632 }
21633 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21634 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021635 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021636 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021637 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021638#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021639
Martin v. Löwis11437992002-04-12 09:54:03 +000021640 ;
21641 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021642}
Martin v. Löwis11437992002-04-12 09:54:03 +000021643_ACEOF
21644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021645if { (ac_try="$ac_compile"
21646case "(($ac_try" in
21647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21648 *) ac_try_echo=$ac_try;;
21649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021653 grep -v '^ *+' conftest.er1 >conftest.err
21654 rm -f conftest.er1
21655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021657 (exit $ac_status); } && {
21658 test -z "$ac_c_werror_flag" ||
21659 test ! -s conftest.err
21660 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021661 ac_cv_c_const=yes
21662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021664sed 's/^/| /' conftest.$ac_ext >&5
21665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021668
21669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021670fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021671{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21672echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021673if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021674
21675cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021676#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021677_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021678
21679fi
21680
Michael W. Hudson54241132001-12-07 15:38:26 +000021681
Guido van Rossumda88dad1995-01-26 00:46:29 +000021682works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021683{ echo "$as_me:$LINENO: checking for working volatile" >&5
21684echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021686/* confdefs.h. */
21687_ACEOF
21688cat confdefs.h >>conftest.$ac_ext
21689cat >>conftest.$ac_ext <<_ACEOF
21690/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021691
Martin v. Löwis11437992002-04-12 09:54:03 +000021692int
21693main ()
21694{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021695volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021696 ;
21697 return 0;
21698}
21699_ACEOF
21700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021701if { (ac_try="$ac_compile"
21702case "(($ac_try" in
21703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21704 *) ac_try_echo=$ac_try;;
21705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021709 grep -v '^ *+' conftest.er1 >conftest.err
21710 rm -f conftest.er1
21711 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021713 (exit $ac_status); } && {
21714 test -z "$ac_c_werror_flag" ||
21715 test ! -s conftest.err
21716 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021717 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021720sed 's/^/| /' conftest.$ac_ext >&5
21721
Martin v. Löwis11437992002-04-12 09:54:03 +000021722
21723cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021724#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021725_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021726
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021727
Guido van Rossum627b2d71993-12-24 10:39:16 +000021728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729
21730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021731{ echo "$as_me:$LINENO: result: $works" >&5
21732echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021733
Guido van Rossumda88dad1995-01-26 00:46:29 +000021734works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021735{ echo "$as_me:$LINENO: checking for working signed char" >&5
21736echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021738/* confdefs.h. */
21739_ACEOF
21740cat confdefs.h >>conftest.$ac_ext
21741cat >>conftest.$ac_ext <<_ACEOF
21742/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021743
Martin v. Löwis11437992002-04-12 09:54:03 +000021744int
21745main ()
21746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021747signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021748 ;
21749 return 0;
21750}
21751_ACEOF
21752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021753if { (ac_try="$ac_compile"
21754case "(($ac_try" in
21755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21756 *) ac_try_echo=$ac_try;;
21757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021761 grep -v '^ *+' conftest.er1 >conftest.err
21762 rm -f conftest.er1
21763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021765 (exit $ac_status); } && {
21766 test -z "$ac_c_werror_flag" ||
21767 test ! -s conftest.err
21768 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021769 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021772sed 's/^/| /' conftest.$ac_ext >&5
21773
Martin v. Löwis11437992002-04-12 09:54:03 +000021774
21775cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021776#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021777_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021778
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021779
Guido van Rossum7f43da71994-08-01 12:15:30 +000021780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021781
21782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021783{ echo "$as_me:$LINENO: result: $works" >&5
21784echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021785
Guido van Rossumda88dad1995-01-26 00:46:29 +000021786have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021787{ echo "$as_me:$LINENO: checking for prototypes" >&5
21788echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021790/* confdefs.h. */
21791_ACEOF
21792cat confdefs.h >>conftest.$ac_ext
21793cat >>conftest.$ac_ext <<_ACEOF
21794/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021795int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021796int
21797main ()
21798{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021799return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021800 ;
21801 return 0;
21802}
21803_ACEOF
21804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021805if { (ac_try="$ac_compile"
21806case "(($ac_try" in
21807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21808 *) ac_try_echo=$ac_try;;
21809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021813 grep -v '^ *+' conftest.er1 >conftest.err
21814 rm -f conftest.er1
21815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021817 (exit $ac_status); } && {
21818 test -z "$ac_c_werror_flag" ||
21819 test ! -s conftest.err
21820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021821
21822
21823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021824#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021825_ACEOF
21826
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021827 have_prototypes=yes
21828
Guido van Rossumf78abae1997-01-21 22:02:36 +000021829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021831sed 's/^/| /' conftest.$ac_ext >&5
21832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833
Guido van Rossum7f43da71994-08-01 12:15:30 +000021834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021835
21836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021837{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21838echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021839
Guido van Rossumda88dad1995-01-26 00:46:29 +000021840works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021841{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21842echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021844/* confdefs.h. */
21845_ACEOF
21846cat confdefs.h >>conftest.$ac_ext
21847cat >>conftest.$ac_ext <<_ACEOF
21848/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021849
21850#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021851int foo(int x, ...) {
21852 va_list va;
21853 va_start(va, x);
21854 va_arg(va, int);
21855 va_arg(va, char *);
21856 va_arg(va, double);
21857 return 0;
21858}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021859
Martin v. Löwis11437992002-04-12 09:54:03 +000021860int
21861main ()
21862{
Guido van Rossum90eea071996-08-30 20:58:57 +000021863return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021864 ;
21865 return 0;
21866}
21867_ACEOF
21868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021869if { (ac_try="$ac_compile"
21870case "(($ac_try" in
21871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21872 *) ac_try_echo=$ac_try;;
21873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021877 grep -v '^ *+' conftest.er1 >conftest.err
21878 rm -f conftest.er1
21879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021881 (exit $ac_status); } && {
21882 test -z "$ac_c_werror_flag" ||
21883 test ! -s conftest.err
21884 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021885
21886
21887cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021888#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021889_ACEOF
21890
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021891 works=yes
21892
Guido van Rossumf78abae1997-01-21 22:02:36 +000021893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021895sed 's/^/| /' conftest.$ac_ext >&5
21896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021897
Guido van Rossum627b2d71993-12-24 10:39:16 +000021898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899
21900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021901{ echo "$as_me:$LINENO: result: $works" >&5
21902echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021903
Martin v. Löwisd6320502004-08-12 13:45:08 +000021904# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021905{ echo "$as_me:$LINENO: checking for socketpair" >&5
21906echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021907cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021908/* confdefs.h. */
21909_ACEOF
21910cat confdefs.h >>conftest.$ac_ext
21911cat >>conftest.$ac_ext <<_ACEOF
21912/* end confdefs.h. */
21913
21914#include <sys/types.h>
21915#include <sys/socket.h>
21916
21917int
21918main ()
21919{
21920void *x=socketpair
21921 ;
21922 return 0;
21923}
21924_ACEOF
21925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926if { (ac_try="$ac_compile"
21927case "(($ac_try" in
21928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21929 *) ac_try_echo=$ac_try;;
21930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021934 grep -v '^ *+' conftest.er1 >conftest.err
21935 rm -f conftest.er1
21936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021938 (exit $ac_status); } && {
21939 test -z "$ac_c_werror_flag" ||
21940 test ! -s conftest.err
21941 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021942
21943cat >>confdefs.h <<\_ACEOF
21944#define HAVE_SOCKETPAIR 1
21945_ACEOF
21946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021947 { echo "$as_me:$LINENO: result: yes" >&5
21948echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021950 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021951sed 's/^/| /' conftest.$ac_ext >&5
21952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021953 { echo "$as_me:$LINENO: result: no" >&5
21954echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021955
21956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021957
21958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021959
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021960# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021961{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21962echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021964/* confdefs.h. */
21965_ACEOF
21966cat confdefs.h >>conftest.$ac_ext
21967cat >>conftest.$ac_ext <<_ACEOF
21968/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021969#include <sys/types.h>
21970#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021971int
21972main ()
21973{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021974struct sockaddr x;
21975x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021976 ;
21977 return 0;
21978}
21979_ACEOF
21980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021981if { (ac_try="$ac_compile"
21982case "(($ac_try" in
21983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21984 *) ac_try_echo=$ac_try;;
21985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021989 grep -v '^ *+' conftest.er1 >conftest.err
21990 rm -f conftest.er1
21991 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021993 (exit $ac_status); } && {
21994 test -z "$ac_c_werror_flag" ||
21995 test ! -s conftest.err
21996 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021997 { echo "$as_me:$LINENO: result: yes" >&5
21998echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021999
22000cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022001#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022002_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022003
22004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022006sed 's/^/| /' conftest.$ac_ext >&5
22007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022008 { echo "$as_me:$LINENO: result: no" >&5
22009echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022011
22012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022013
Guido van Rossumda88dad1995-01-26 00:46:29 +000022014va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022015{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22016echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022018/* confdefs.h. */
22019_ACEOF
22020cat confdefs.h >>conftest.$ac_ext
22021cat >>conftest.$ac_ext <<_ACEOF
22022/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022023
22024#ifdef HAVE_STDARG_PROTOTYPES
22025#include <stdarg.h>
22026#else
22027#include <varargs.h>
22028#endif
22029
Martin v. Löwis11437992002-04-12 09:54:03 +000022030int
22031main ()
22032{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022033va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022034 ;
22035 return 0;
22036}
22037_ACEOF
22038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022039if { (ac_try="$ac_compile"
22040case "(($ac_try" in
22041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22042 *) ac_try_echo=$ac_try;;
22043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022047 grep -v '^ *+' conftest.er1 >conftest.err
22048 rm -f conftest.er1
22049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022051 (exit $ac_status); } && {
22052 test -z "$ac_c_werror_flag" ||
22053 test ! -s conftest.err
22054 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022055 :
22056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022058sed 's/^/| /' conftest.$ac_ext >&5
22059
Martin v. Löwis11437992002-04-12 09:54:03 +000022060
22061
22062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022063#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022064_ACEOF
22065
Guido van Rossumda88dad1995-01-26 00:46:29 +000022066 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022069
22070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022071{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22072echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022074# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022075
22076
22077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022078{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22079echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022080if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022082else
Martin v. Löwis11437992002-04-12 09:54:03 +000022083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022084/* confdefs.h. */
22085_ACEOF
22086cat confdefs.h >>conftest.$ac_ext
22087cat >>conftest.$ac_ext <<_ACEOF
22088/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022089/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22090 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22091#define gethostbyname_r innocuous_gethostbyname_r
22092
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022093/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022094 which can conflict with char gethostbyname_r (); below.
22095 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022096 <limits.h> exists even on freestanding compilers. */
22097
22098#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022099# include <limits.h>
22100#else
22101# include <assert.h>
22102#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022103
22104#undef gethostbyname_r
22105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022106/* Override any GCC internal prototype to avoid an error.
22107 Use char because int might match the return type of a GCC
22108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022109#ifdef __cplusplus
22110extern "C"
22111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022112char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022113/* The GNU C library defines this for functions which it implements
22114 to always fail with ENOSYS. Some functions are actually named
22115 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022116#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022117choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022118#endif
22119
Skip Montanaro6dead952003-09-25 14:50:04 +000022120int
22121main ()
22122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022123return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022124 ;
22125 return 0;
22126}
22127_ACEOF
22128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022129if { (ac_try="$ac_link"
22130case "(($ac_try" in
22131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22132 *) ac_try_echo=$ac_try;;
22133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022137 grep -v '^ *+' conftest.er1 >conftest.err
22138 rm -f conftest.er1
22139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022141 (exit $ac_status); } && {
22142 test -z "$ac_c_werror_flag" ||
22143 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022144 } && test -s conftest$ac_exeext &&
22145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022146 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022149sed 's/^/| /' conftest.$ac_ext >&5
22150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022151 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022153
22154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022155 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022157{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22158echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22159if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022160
Martin v. Löwis11437992002-04-12 09:54:03 +000022161 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022162#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022163_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022164
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022165 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22166echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022167 OLD_CFLAGS=$CFLAGS
22168 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022170/* confdefs.h. */
22171_ACEOF
22172cat confdefs.h >>conftest.$ac_ext
22173cat >>conftest.$ac_ext <<_ACEOF
22174/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022175
22176# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022177
Martin v. Löwis11437992002-04-12 09:54:03 +000022178int
22179main ()
22180{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022181
22182 char *name;
22183 struct hostent *he, *res;
22184 char buffer[2048];
22185 int buflen = 2048;
22186 int h_errnop;
22187
22188 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022189
22190 ;
22191 return 0;
22192}
22193_ACEOF
22194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022195if { (ac_try="$ac_compile"
22196case "(($ac_try" in
22197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22198 *) ac_try_echo=$ac_try;;
22199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022203 grep -v '^ *+' conftest.er1 >conftest.err
22204 rm -f conftest.er1
22205 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022207 (exit $ac_status); } && {
22208 test -z "$ac_c_werror_flag" ||
22209 test ! -s conftest.err
22210 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022211
22212 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022213#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022214_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022215
Martin v. Löwis11437992002-04-12 09:54:03 +000022216
22217cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022218#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022219_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022220
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022221 { echo "$as_me:$LINENO: result: yes" >&5
22222echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022223
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022226sed 's/^/| /' conftest.$ac_ext >&5
22227
Martin v. Löwis11437992002-04-12 09:54:03 +000022228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022229 { echo "$as_me:$LINENO: result: no" >&5
22230echo "${ECHO_T}no" >&6; }
22231 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22232echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022234/* confdefs.h. */
22235_ACEOF
22236cat confdefs.h >>conftest.$ac_ext
22237cat >>conftest.$ac_ext <<_ACEOF
22238/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022239
22240# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022241
Martin v. Löwis11437992002-04-12 09:54:03 +000022242int
22243main ()
22244{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022245
22246 char *name;
22247 struct hostent *he;
22248 char buffer[2048];
22249 int buflen = 2048;
22250 int h_errnop;
22251
22252 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022253
22254 ;
22255 return 0;
22256}
22257_ACEOF
22258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022259if { (ac_try="$ac_compile"
22260case "(($ac_try" in
22261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22262 *) ac_try_echo=$ac_try;;
22263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022267 grep -v '^ *+' conftest.er1 >conftest.err
22268 rm -f conftest.er1
22269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022271 (exit $ac_status); } && {
22272 test -z "$ac_c_werror_flag" ||
22273 test ! -s conftest.err
22274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022275
22276 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022277#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022278_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022279
Martin v. Löwis11437992002-04-12 09:54:03 +000022280
22281cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022282#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022283_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022284
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022285 { echo "$as_me:$LINENO: result: yes" >&5
22286echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022290sed 's/^/| /' conftest.$ac_ext >&5
22291
Martin v. Löwis11437992002-04-12 09:54:03 +000022292
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022293 { echo "$as_me:$LINENO: result: no" >&5
22294echo "${ECHO_T}no" >&6; }
22295 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22296echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022298/* confdefs.h. */
22299_ACEOF
22300cat confdefs.h >>conftest.$ac_ext
22301cat >>conftest.$ac_ext <<_ACEOF
22302/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022303
22304# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022305
Martin v. Löwis11437992002-04-12 09:54:03 +000022306int
22307main ()
22308{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022309
22310 char *name;
22311 struct hostent *he;
22312 struct hostent_data data;
22313
22314 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022315
22316 ;
22317 return 0;
22318}
22319_ACEOF
22320rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022321if { (ac_try="$ac_compile"
22322case "(($ac_try" in
22323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22324 *) ac_try_echo=$ac_try;;
22325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022329 grep -v '^ *+' conftest.er1 >conftest.err
22330 rm -f conftest.er1
22331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022333 (exit $ac_status); } && {
22334 test -z "$ac_c_werror_flag" ||
22335 test ! -s conftest.err
22336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022337
22338 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022339#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022340_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022341
Martin v. Löwis11437992002-04-12 09:54:03 +000022342
22343cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022344#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022346
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022347 { echo "$as_me:$LINENO: result: yes" >&5
22348echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022350else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022352sed 's/^/| /' conftest.$ac_ext >&5
22353
Martin v. Löwis11437992002-04-12 09:54:03 +000022354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022355 { echo "$as_me:$LINENO: result: no" >&5
22356echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022357
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022359
22360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022361
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022363
22364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367
22368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022369 CFLAGS=$OLD_CFLAGS
22370
22371else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022372
Martin v. Löwis11437992002-04-12 09:54:03 +000022373
22374for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022375do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22377{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022379if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022381else
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022383/* confdefs.h. */
22384_ACEOF
22385cat confdefs.h >>conftest.$ac_ext
22386cat >>conftest.$ac_ext <<_ACEOF
22387/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022388/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22389 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22390#define $ac_func innocuous_$ac_func
22391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022392/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022393 which can conflict with char $ac_func (); below.
22394 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022395 <limits.h> exists even on freestanding compilers. */
22396
22397#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022398# include <limits.h>
22399#else
22400# include <assert.h>
22401#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022402
22403#undef $ac_func
22404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022405/* Override any GCC internal prototype to avoid an error.
22406 Use char because int might match the return type of a GCC
22407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022408#ifdef __cplusplus
22409extern "C"
22410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022411char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022412/* The GNU C library defines this for functions which it implements
22413 to always fail with ENOSYS. Some functions are actually named
22414 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022415#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022416choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022417#endif
22418
Skip Montanaro6dead952003-09-25 14:50:04 +000022419int
22420main ()
22421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022422return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022423 ;
22424 return 0;
22425}
22426_ACEOF
22427rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022428if { (ac_try="$ac_link"
22429case "(($ac_try" in
22430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22431 *) ac_try_echo=$ac_try;;
22432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022436 grep -v '^ *+' conftest.er1 >conftest.err
22437 rm -f conftest.er1
22438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022440 (exit $ac_status); } && {
22441 test -z "$ac_c_werror_flag" ||
22442 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022443 } && test -s conftest$ac_exeext &&
22444 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022445 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022448sed 's/^/| /' conftest.$ac_ext >&5
22449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022450 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022452
22453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022454 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022456ac_res=`eval echo '${'$as_ac_var'}'`
22457 { echo "$as_me:$LINENO: result: $ac_res" >&5
22458echo "${ECHO_T}$ac_res" >&6; }
22459if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022460 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022461#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022462_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022464fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022465done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022466
Michael W. Hudson54241132001-12-07 15:38:26 +000022467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022468fi
22469
Michael W. Hudson54241132001-12-07 15:38:26 +000022470
22471
22472
22473
22474
22475
Guido van Rossum627b2d71993-12-24 10:39:16 +000022476# checks for system services
22477# (none yet)
22478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022479# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022480{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22481echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022482if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022483 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022484else
Martin v. Löwis11437992002-04-12 09:54:03 +000022485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022486/* confdefs.h. */
22487_ACEOF
22488cat confdefs.h >>conftest.$ac_ext
22489cat >>conftest.$ac_ext <<_ACEOF
22490/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022491/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22492 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22493#define __fpu_control innocuous___fpu_control
22494
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022495/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022496 which can conflict with char __fpu_control (); below.
22497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022498 <limits.h> exists even on freestanding compilers. */
22499
22500#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022501# include <limits.h>
22502#else
22503# include <assert.h>
22504#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022505
22506#undef __fpu_control
22507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022508/* Override any GCC internal prototype to avoid an error.
22509 Use char because int might match the return type of a GCC
22510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022511#ifdef __cplusplus
22512extern "C"
22513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022514char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022515/* The GNU C library defines this for functions which it implements
22516 to always fail with ENOSYS. Some functions are actually named
22517 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022518#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022519choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022520#endif
22521
Skip Montanaro6dead952003-09-25 14:50:04 +000022522int
22523main ()
22524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022525return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022526 ;
22527 return 0;
22528}
22529_ACEOF
22530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022531if { (ac_try="$ac_link"
22532case "(($ac_try" in
22533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22534 *) ac_try_echo=$ac_try;;
22535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022539 grep -v '^ *+' conftest.er1 >conftest.err
22540 rm -f conftest.er1
22541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022543 (exit $ac_status); } && {
22544 test -z "$ac_c_werror_flag" ||
22545 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022546 } && test -s conftest$ac_exeext &&
22547 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022548 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022551sed 's/^/| /' conftest.$ac_ext >&5
22552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022553 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022555
22556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022557 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022558fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022559{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22560echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22561if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022562 :
22563else
Martin v. Löwis11437992002-04-12 09:54:03 +000022564
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022565{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22566echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022567if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022569else
Martin v. Löwis11437992002-04-12 09:54:03 +000022570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022571LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022579/* Override any GCC internal prototype to avoid an error.
22580 Use char because int might match the return type of a GCC
22581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022582#ifdef __cplusplus
22583extern "C"
22584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022585char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022586int
22587main ()
22588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022589return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022590 ;
22591 return 0;
22592}
22593_ACEOF
22594rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022595if { (ac_try="$ac_link"
22596case "(($ac_try" in
22597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22598 *) ac_try_echo=$ac_try;;
22599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022601 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022603 grep -v '^ *+' conftest.er1 >conftest.err
22604 rm -f conftest.er1
22605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022607 (exit $ac_status); } && {
22608 test -z "$ac_c_werror_flag" ||
22609 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022610 } && test -s conftest$ac_exeext &&
22611 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022615sed 's/^/| /' conftest.$ac_ext >&5
22616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022617 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022619
22620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022623fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022624{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22625echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22626if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022627 cat >>confdefs.h <<_ACEOF
22628#define HAVE_LIBIEEE 1
22629_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022630
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022631 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022632
Guido van Rossum627b2d71993-12-24 10:39:16 +000022633fi
22634
Michael W. Hudson54241132001-12-07 15:38:26 +000022635
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022636fi
22637
Michael W. Hudson54241132001-12-07 15:38:26 +000022638
Guido van Rossum7f253911997-05-09 02:42:48 +000022639# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022640{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22641echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022643# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022644if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022645 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022646if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022647then
22648
22649cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022650#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022651_ACEOF
22652
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022653 { echo "$as_me:$LINENO: result: yes" >&5
22654echo "${ECHO_T}yes" >&6; }
22655else { echo "$as_me:$LINENO: result: no" >&5
22656echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022657fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022659 { echo "$as_me:$LINENO: result: no" >&5
22660echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022661fi
22662
Guido van Rossum7f253911997-05-09 02:42:48 +000022663
Guido van Rossum7f43da71994-08-01 12:15:30 +000022664# check for --with-libm=...
22665
Guido van Rossum563e7081996-09-10 18:20:48 +000022666case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022667Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022668*) LIBM=-lm
22669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022670{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22671echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022673# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022674if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022675 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022676if test "$withval" = no
22677then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022678 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22679echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022680elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022681then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022682 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22683echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22684else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22685echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022686 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022687fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022688else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022689 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22690echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022691fi
22692
Guido van Rossum7f43da71994-08-01 12:15:30 +000022693
22694# check for --with-libc=...
22695
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022696{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22697echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022699# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022700if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022701 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022702if test "$withval" = no
22703then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022704 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22705echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022706elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022707then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022708 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22709echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22710else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22711echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022713fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022714else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022715 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22716echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022717fi
22718
Guido van Rossum7f43da71994-08-01 12:15:30 +000022719
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022720# **************************************************
22721# * Check for various properties of floating point *
22722# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022723
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022724{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22725echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022726if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022727 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022728else
22729
22730if test "$cross_compiling" = yes; then
22731 ac_cv_little_endian_double=no
22732else
22733 cat >conftest.$ac_ext <<_ACEOF
22734/* confdefs.h. */
22735_ACEOF
22736cat confdefs.h >>conftest.$ac_ext
22737cat >>conftest.$ac_ext <<_ACEOF
22738/* end confdefs.h. */
22739
22740#include <string.h>
22741int main() {
22742 double x = 9006104071832581.0;
22743 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22744 return 0;
22745 else
22746 return 1;
22747}
22748
22749_ACEOF
22750rm -f conftest$ac_exeext
22751if { (ac_try="$ac_link"
22752case "(($ac_try" in
22753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22754 *) ac_try_echo=$ac_try;;
22755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022757 (eval "$ac_link") 2>&5
22758 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22761 { (case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022766 (eval "$ac_try") 2>&5
22767 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022769 (exit $ac_status); }; }; then
22770 ac_cv_little_endian_double=yes
22771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022772 echo "$as_me: program exited with status $ac_status" >&5
22773echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022774sed 's/^/| /' conftest.$ac_ext >&5
22775
22776( exit $ac_status )
22777ac_cv_little_endian_double=no
22778fi
22779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22780fi
22781
22782
22783fi
22784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022785{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22786echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022787if test "$ac_cv_little_endian_double" = yes
22788then
22789
22790cat >>confdefs.h <<\_ACEOF
22791#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22792_ACEOF
22793
22794fi
22795
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022796{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22797echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022798if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022799 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022800else
22801
22802if test "$cross_compiling" = yes; then
22803 ac_cv_big_endian_double=no
22804else
22805 cat >conftest.$ac_ext <<_ACEOF
22806/* confdefs.h. */
22807_ACEOF
22808cat confdefs.h >>conftest.$ac_ext
22809cat >>conftest.$ac_ext <<_ACEOF
22810/* end confdefs.h. */
22811
22812#include <string.h>
22813int main() {
22814 double x = 9006104071832581.0;
22815 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22816 return 0;
22817 else
22818 return 1;
22819}
22820
22821_ACEOF
22822rm -f conftest$ac_exeext
22823if { (ac_try="$ac_link"
22824case "(($ac_try" in
22825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22826 *) ac_try_echo=$ac_try;;
22827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022829 (eval "$ac_link") 2>&5
22830 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22833 { (case "(($ac_try" in
22834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22835 *) ac_try_echo=$ac_try;;
22836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022838 (eval "$ac_try") 2>&5
22839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022841 (exit $ac_status); }; }; then
22842 ac_cv_big_endian_double=yes
22843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022844 echo "$as_me: program exited with status $ac_status" >&5
22845echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022846sed 's/^/| /' conftest.$ac_ext >&5
22847
22848( exit $ac_status )
22849ac_cv_big_endian_double=no
22850fi
22851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22852fi
22853
22854
22855fi
22856
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022857{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22858echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022859if test "$ac_cv_big_endian_double" = yes
22860then
22861
22862cat >>confdefs.h <<\_ACEOF
22863#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22864_ACEOF
22865
22866fi
22867
22868# Some ARM platforms use a mixed-endian representation for doubles.
22869# While Python doesn't currently have full support for these platforms
22870# (see e.g., issue 1762561), we can at least make sure that float <-> string
22871# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022872{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22873echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022874if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022875 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022876else
22877
22878if test "$cross_compiling" = yes; then
22879 ac_cv_mixed_endian_double=no
22880else
22881 cat >conftest.$ac_ext <<_ACEOF
22882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
22887
22888#include <string.h>
22889int main() {
22890 double x = 9006104071832581.0;
22891 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22892 return 0;
22893 else
22894 return 1;
22895}
22896
22897_ACEOF
22898rm -f conftest$ac_exeext
22899if { (ac_try="$ac_link"
22900case "(($ac_try" in
22901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22902 *) ac_try_echo=$ac_try;;
22903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022905 (eval "$ac_link") 2>&5
22906 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22909 { (case "(($ac_try" in
22910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22911 *) ac_try_echo=$ac_try;;
22912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022914 (eval "$ac_try") 2>&5
22915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022917 (exit $ac_status); }; }; then
22918 ac_cv_mixed_endian_double=yes
22919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022920 echo "$as_me: program exited with status $ac_status" >&5
22921echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022922sed 's/^/| /' conftest.$ac_ext >&5
22923
22924( exit $ac_status )
22925ac_cv_mixed_endian_double=no
22926fi
22927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22928fi
22929
22930
22931fi
22932
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022933{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22934echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022935if test "$ac_cv_mixed_endian_double" = yes
22936then
22937
22938cat >>confdefs.h <<\_ACEOF
22939#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22940_ACEOF
22941
22942fi
22943
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022944# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022945# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022946# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022947# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022948# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000022949# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022950
22951# This inline assembler syntax may also work for suncc and icc,
22952# so we try it on all platforms.
22953
22954{ 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 +000022955echo $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 +000022956cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022957/* confdefs.h. */
22958_ACEOF
22959cat confdefs.h >>conftest.$ac_ext
22960cat >>conftest.$ac_ext <<_ACEOF
22961/* end confdefs.h. */
22962
22963int
22964main ()
22965{
22966
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022967 unsigned short cw;
22968 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22969 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022970
22971 ;
22972 return 0;
22973}
22974_ACEOF
22975rm -f conftest.$ac_objext
22976if { (ac_try="$ac_compile"
22977case "(($ac_try" in
22978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22979 *) ac_try_echo=$ac_try;;
22980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022982 (eval "$ac_compile") 2>conftest.er1
22983 ac_status=$?
22984 grep -v '^ *+' conftest.er1 >conftest.err
22985 rm -f conftest.er1
22986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022988 (exit $ac_status); } && {
22989 test -z "$ac_c_werror_flag" ||
22990 test ! -s conftest.err
22991 } && test -s conftest.$ac_objext; then
22992 have_gcc_asm_for_x87=yes
22993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022994 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022995sed 's/^/| /' conftest.$ac_ext >&5
22996
22997 have_gcc_asm_for_x87=no
22998fi
22999
23000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023001{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023002echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023003if test "$have_gcc_asm_for_x87" = yes
23004then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023005
23006cat >>confdefs.h <<\_ACEOF
23007#define HAVE_GCC_ASM_FOR_X87 1
23008_ACEOF
23009
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023011
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023012# Detect whether system arithmetic is subject to x87-style double
23013# rounding issues. The result of this test has little meaning on non
23014# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23015# mode is round-to-nearest and double rounding issues are present, and
23016# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23018echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023019# $BASECFLAGS may affect the result
23020ac_save_cc="$CC"
23021CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023022if test "$cross_compiling" = yes; then
23023 ac_cv_x87_double_rounding=no
23024else
23025 cat >conftest.$ac_ext <<_ACEOF
23026/* confdefs.h. */
23027_ACEOF
23028cat confdefs.h >>conftest.$ac_ext
23029cat >>conftest.$ac_ext <<_ACEOF
23030/* end confdefs.h. */
23031
23032#include <stdlib.h>
23033#include <math.h>
23034int main() {
23035 volatile double x, y, z;
23036 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23037 x = 0.99999999999999989; /* 1-2**-53 */
23038 y = 1./x;
23039 if (y != 1.)
23040 exit(0);
23041 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23042 x = 1e16;
23043 y = 2.99999;
23044 z = x + y;
23045 if (z != 1e16+4.)
23046 exit(0);
23047 /* both tests show evidence of double rounding */
23048 exit(1);
23049}
23050
23051_ACEOF
23052rm -f conftest$ac_exeext
23053if { (ac_try="$ac_link"
23054case "(($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 Dickinson3dc7c6a2009-01-04 15:09:02 +000023059 (eval "$ac_link") 2>&5
23060 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23063 { (case "(($ac_try" in
23064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23065 *) ac_try_echo=$ac_try;;
23066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023068 (eval "$ac_try") 2>&5
23069 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023071 (exit $ac_status); }; }; then
23072 ac_cv_x87_double_rounding=no
23073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023074 echo "$as_me: program exited with status $ac_status" >&5
23075echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023076sed 's/^/| /' conftest.$ac_ext >&5
23077
23078( exit $ac_status )
23079ac_cv_x87_double_rounding=yes
23080fi
23081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23082fi
23083
23084
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023085CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023086{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23087echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023088if test "$ac_cv_x87_double_rounding" = yes
23089then
23090
23091cat >>confdefs.h <<\_ACEOF
23092#define X87_DOUBLE_ROUNDING 1
23093_ACEOF
23094
23095fi
23096
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023097# ************************************
23098# * Check for mathematical functions *
23099# ************************************
23100
23101LIBS_SAVE=$LIBS
23102LIBS="$LIBS $LIBM"
23103
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023104# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23105# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023106{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23107echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023108if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023109 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023110else
23111
23112if test "$cross_compiling" = yes; then
23113 ac_cv_tanh_preserves_zero_sign=no
23114else
23115 cat >conftest.$ac_ext <<_ACEOF
23116/* confdefs.h. */
23117_ACEOF
23118cat confdefs.h >>conftest.$ac_ext
23119cat >>conftest.$ac_ext <<_ACEOF
23120/* end confdefs.h. */
23121
23122#include <math.h>
23123#include <stdlib.h>
23124int main() {
23125 /* return 0 if either negative zeros don't exist
23126 on this platform or if negative zeros exist
23127 and tanh(-0.) == -0. */
23128 if (atan2(0., -1.) == atan2(-0., -1.) ||
23129 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23130 else exit(1);
23131}
23132
23133_ACEOF
23134rm -f conftest$ac_exeext
23135if { (ac_try="$ac_link"
23136case "(($ac_try" in
23137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23138 *) ac_try_echo=$ac_try;;
23139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023141 (eval "$ac_link") 2>&5
23142 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23145 { (case "(($ac_try" in
23146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23147 *) ac_try_echo=$ac_try;;
23148esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023150 (eval "$ac_try") 2>&5
23151 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023153 (exit $ac_status); }; }; then
23154 ac_cv_tanh_preserves_zero_sign=yes
23155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023156 echo "$as_me: program exited with status $ac_status" >&5
23157echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023158sed 's/^/| /' conftest.$ac_ext >&5
23159
23160( exit $ac_status )
23161ac_cv_tanh_preserves_zero_sign=no
23162fi
23163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23164fi
23165
23166
23167fi
23168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023169{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23170echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023171if test "$ac_cv_tanh_preserves_zero_sign" = yes
23172then
23173
23174cat >>confdefs.h <<\_ACEOF
23175#define TANH_PRESERVES_ZERO_SIGN 1
23176_ACEOF
23177
23178fi
23179
23180
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023181
Michael W. Hudson54241132001-12-07 15:38:26 +000023182
Christian Heimes99170a52007-12-19 02:07:34 +000023183
23184
23185
23186
23187
Mark Dickinsonf2537862009-04-18 13:58:18 +000023188
Mark Dickinson9c113362009-09-05 10:36:23 +000023189for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23190do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23192{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023194if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023195 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023196else
23197 cat >conftest.$ac_ext <<_ACEOF
23198/* confdefs.h. */
23199_ACEOF
23200cat confdefs.h >>conftest.$ac_ext
23201cat >>conftest.$ac_ext <<_ACEOF
23202/* end confdefs.h. */
23203/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23204 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23205#define $ac_func innocuous_$ac_func
23206
23207/* System header to define __stub macros and hopefully few prototypes,
23208 which can conflict with char $ac_func (); below.
23209 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23210 <limits.h> exists even on freestanding compilers. */
23211
23212#ifdef __STDC__
23213# include <limits.h>
23214#else
23215# include <assert.h>
23216#endif
23217
23218#undef $ac_func
23219
23220/* Override any GCC internal prototype to avoid an error.
23221 Use char because int might match the return type of a GCC
23222 builtin and then its argument prototype would still apply. */
23223#ifdef __cplusplus
23224extern "C"
23225#endif
23226char $ac_func ();
23227/* The GNU C library defines this for functions which it implements
23228 to always fail with ENOSYS. Some functions are actually named
23229 something starting with __ and the normal name is an alias. */
23230#if defined __stub_$ac_func || defined __stub___$ac_func
23231choke me
23232#endif
23233
23234int
23235main ()
23236{
23237return $ac_func ();
23238 ;
23239 return 0;
23240}
23241_ACEOF
23242rm -f conftest.$ac_objext conftest$ac_exeext
23243if { (ac_try="$ac_link"
23244case "(($ac_try" in
23245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23246 *) ac_try_echo=$ac_try;;
23247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023249 (eval "$ac_link") 2>conftest.er1
23250 ac_status=$?
23251 grep -v '^ *+' conftest.er1 >conftest.err
23252 rm -f conftest.er1
23253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023255 (exit $ac_status); } && {
23256 test -z "$ac_c_werror_flag" ||
23257 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023258 } && test -s conftest$ac_exeext &&
23259 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023260 eval "$as_ac_var=yes"
23261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023262 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023263sed 's/^/| /' conftest.$ac_ext >&5
23264
23265 eval "$as_ac_var=no"
23266fi
23267
23268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23269 conftest$ac_exeext conftest.$ac_ext
23270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023271ac_res=`eval echo '${'$as_ac_var'}'`
23272 { echo "$as_me:$LINENO: result: $ac_res" >&5
23273echo "${ECHO_T}$ac_res" >&6; }
23274if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023275 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023276#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023277_ACEOF
23278
23279fi
23280done
23281
23282
23283
23284
23285
23286
23287for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023288do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023289as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23290{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23291echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023292if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023294else
23295 cat >conftest.$ac_ext <<_ACEOF
23296/* confdefs.h. */
23297_ACEOF
23298cat confdefs.h >>conftest.$ac_ext
23299cat >>conftest.$ac_ext <<_ACEOF
23300/* end confdefs.h. */
23301/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23302 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23303#define $ac_func innocuous_$ac_func
23304
23305/* System header to define __stub macros and hopefully few prototypes,
23306 which can conflict with char $ac_func (); below.
23307 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23308 <limits.h> exists even on freestanding compilers. */
23309
23310#ifdef __STDC__
23311# include <limits.h>
23312#else
23313# include <assert.h>
23314#endif
23315
23316#undef $ac_func
23317
23318/* Override any GCC internal prototype to avoid an error.
23319 Use char because int might match the return type of a GCC
23320 builtin and then its argument prototype would still apply. */
23321#ifdef __cplusplus
23322extern "C"
23323#endif
23324char $ac_func ();
23325/* The GNU C library defines this for functions which it implements
23326 to always fail with ENOSYS. Some functions are actually named
23327 something starting with __ and the normal name is an alias. */
23328#if defined __stub_$ac_func || defined __stub___$ac_func
23329choke me
23330#endif
23331
23332int
23333main ()
23334{
23335return $ac_func ();
23336 ;
23337 return 0;
23338}
23339_ACEOF
23340rm -f conftest.$ac_objext conftest$ac_exeext
23341if { (ac_try="$ac_link"
23342case "(($ac_try" in
23343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23344 *) ac_try_echo=$ac_try;;
23345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023347 (eval "$ac_link") 2>conftest.er1
23348 ac_status=$?
23349 grep -v '^ *+' conftest.er1 >conftest.err
23350 rm -f conftest.er1
23351 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023353 (exit $ac_status); } && {
23354 test -z "$ac_c_werror_flag" ||
23355 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023356 } && test -s conftest$ac_exeext &&
23357 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023358 eval "$as_ac_var=yes"
23359else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023361sed 's/^/| /' conftest.$ac_ext >&5
23362
23363 eval "$as_ac_var=no"
23364fi
23365
23366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23367 conftest$ac_exeext conftest.$ac_ext
23368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023369ac_res=`eval echo '${'$as_ac_var'}'`
23370 { echo "$as_me:$LINENO: result: $ac_res" >&5
23371echo "${ECHO_T}$ac_res" >&6; }
23372if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023373 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023375_ACEOF
23376
23377fi
23378done
23379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023380{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23381echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023382if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023383 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023384else
23385 cat >conftest.$ac_ext <<_ACEOF
23386/* confdefs.h. */
23387_ACEOF
23388cat confdefs.h >>conftest.$ac_ext
23389cat >>conftest.$ac_ext <<_ACEOF
23390/* end confdefs.h. */
23391#include <math.h>
23392
23393int
23394main ()
23395{
23396#ifndef isinf
23397 (void) isinf;
23398#endif
23399
23400 ;
23401 return 0;
23402}
23403_ACEOF
23404rm -f conftest.$ac_objext
23405if { (ac_try="$ac_compile"
23406case "(($ac_try" in
23407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23408 *) ac_try_echo=$ac_try;;
23409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023411 (eval "$ac_compile") 2>conftest.er1
23412 ac_status=$?
23413 grep -v '^ *+' conftest.er1 >conftest.err
23414 rm -f conftest.er1
23415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023417 (exit $ac_status); } && {
23418 test -z "$ac_c_werror_flag" ||
23419 test ! -s conftest.err
23420 } && test -s conftest.$ac_objext; then
23421 ac_cv_have_decl_isinf=yes
23422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023423 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023424sed 's/^/| /' conftest.$ac_ext >&5
23425
23426 ac_cv_have_decl_isinf=no
23427fi
23428
23429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023431{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23432echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23433if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023434
23435cat >>confdefs.h <<_ACEOF
23436#define HAVE_DECL_ISINF 1
23437_ACEOF
23438
23439
23440else
23441 cat >>confdefs.h <<_ACEOF
23442#define HAVE_DECL_ISINF 0
23443_ACEOF
23444
23445
23446fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023447{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23448echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023449if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023450 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023451else
23452 cat >conftest.$ac_ext <<_ACEOF
23453/* confdefs.h. */
23454_ACEOF
23455cat confdefs.h >>conftest.$ac_ext
23456cat >>conftest.$ac_ext <<_ACEOF
23457/* end confdefs.h. */
23458#include <math.h>
23459
23460int
23461main ()
23462{
23463#ifndef isnan
23464 (void) isnan;
23465#endif
23466
23467 ;
23468 return 0;
23469}
23470_ACEOF
23471rm -f conftest.$ac_objext
23472if { (ac_try="$ac_compile"
23473case "(($ac_try" in
23474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23475 *) ac_try_echo=$ac_try;;
23476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023478 (eval "$ac_compile") 2>conftest.er1
23479 ac_status=$?
23480 grep -v '^ *+' conftest.er1 >conftest.err
23481 rm -f conftest.er1
23482 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023484 (exit $ac_status); } && {
23485 test -z "$ac_c_werror_flag" ||
23486 test ! -s conftest.err
23487 } && test -s conftest.$ac_objext; then
23488 ac_cv_have_decl_isnan=yes
23489else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023490 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023491sed 's/^/| /' conftest.$ac_ext >&5
23492
23493 ac_cv_have_decl_isnan=no
23494fi
23495
23496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23497fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023498{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23499echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23500if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023501
23502cat >>confdefs.h <<_ACEOF
23503#define HAVE_DECL_ISNAN 1
23504_ACEOF
23505
23506
23507else
23508 cat >>confdefs.h <<_ACEOF
23509#define HAVE_DECL_ISNAN 0
23510_ACEOF
23511
23512
23513fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023514{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23515echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023516if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023517 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023518else
23519 cat >conftest.$ac_ext <<_ACEOF
23520/* confdefs.h. */
23521_ACEOF
23522cat confdefs.h >>conftest.$ac_ext
23523cat >>conftest.$ac_ext <<_ACEOF
23524/* end confdefs.h. */
23525#include <math.h>
23526
23527int
23528main ()
23529{
23530#ifndef isfinite
23531 (void) isfinite;
23532#endif
23533
23534 ;
23535 return 0;
23536}
23537_ACEOF
23538rm -f conftest.$ac_objext
23539if { (ac_try="$ac_compile"
23540case "(($ac_try" in
23541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23542 *) ac_try_echo=$ac_try;;
23543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023545 (eval "$ac_compile") 2>conftest.er1
23546 ac_status=$?
23547 grep -v '^ *+' conftest.er1 >conftest.err
23548 rm -f conftest.er1
23549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023551 (exit $ac_status); } && {
23552 test -z "$ac_c_werror_flag" ||
23553 test ! -s conftest.err
23554 } && test -s conftest.$ac_objext; then
23555 ac_cv_have_decl_isfinite=yes
23556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023557 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023558sed 's/^/| /' conftest.$ac_ext >&5
23559
23560 ac_cv_have_decl_isfinite=no
23561fi
23562
23563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23564fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023565{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23566echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23567if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023568
23569cat >>confdefs.h <<_ACEOF
23570#define HAVE_DECL_ISFINITE 1
23571_ACEOF
23572
23573
23574else
23575 cat >>confdefs.h <<_ACEOF
23576#define HAVE_DECL_ISFINITE 0
23577_ACEOF
23578
23579
23580fi
23581
23582
Christian Heimes99170a52007-12-19 02:07:34 +000023583
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023584LIBS=$LIBS_SAVE
23585
Mark Dickinson10683072009-04-18 21:18:19 +000023586# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023587{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23588echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023589if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023590 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023591else
23592 if test "$cross_compiling" = yes; then
23593 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023594else
23595 cat >conftest.$ac_ext <<_ACEOF
23596/* confdefs.h. */
23597_ACEOF
23598cat confdefs.h >>conftest.$ac_ext
23599cat >>conftest.$ac_ext <<_ACEOF
23600/* end confdefs.h. */
23601
23602#include <unistd.h>
23603#include <fcntl.h>
23604#include <stdio.h>
23605#include <semaphore.h>
23606#include <sys/stat.h>
23607
23608int main(void){
23609 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23610 int count;
23611 int res;
23612 if(a==SEM_FAILED){
23613 perror("sem_open");
23614 return 1;
23615
23616 }
23617 res = sem_getvalue(a, &count);
23618 sem_close(a);
23619 return res==-1 ? 1 : 0;
23620}
23621
Mark Dickinson10683072009-04-18 21:18:19 +000023622_ACEOF
23623rm -f conftest$ac_exeext
23624if { (ac_try="$ac_link"
23625case "(($ac_try" in
23626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23627 *) ac_try_echo=$ac_try;;
23628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023630 (eval "$ac_link") 2>&5
23631 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023633 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23634 { (case "(($ac_try" in
23635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23636 *) ac_try_echo=$ac_try;;
23637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023639 (eval "$ac_try") 2>&5
23640 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023642 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023643 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023644else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023645 echo "$as_me: program exited with status $ac_status" >&5
23646echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023647sed 's/^/| /' conftest.$ac_ext >&5
23648
23649( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023650ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023651fi
23652rm -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 +000023653fi
23654
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023655
23656
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023657fi
23658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023659{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23660echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023661if test $ac_cv_broken_sem_getvalue = yes
23662then
23663
23664cat >>confdefs.h <<\_ACEOF
23665#define HAVE_BROKEN_SEM_GETVALUE 1
23666_ACEOF
23667
23668fi
23669
Mark Dickinsonbd792642009-03-18 20:06:12 +000023670# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023671{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23672echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023673# Check whether --enable-big-digits was given.
23674if test "${enable_big_digits+set}" = set; then
23675 enableval=$enable_big_digits; case $enable_big_digits in
23676yes)
23677 enable_big_digits=30 ;;
23678no)
23679 enable_big_digits=15 ;;
2368015|30)
23681 ;;
23682*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023683 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23684echo "$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 +000023685 { (exit 1); exit 1; }; } ;;
23686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023687{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23688echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023689
23690cat >>confdefs.h <<_ACEOF
23691#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23692_ACEOF
23693
23694
23695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023696 { echo "$as_me:$LINENO: result: no value specified" >&5
23697echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023698fi
23699
23700
Guido van Rossumef2255b2000-03-10 22:30:29 +000023701# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023702if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023703 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23704echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023705if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023706 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023708{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23709echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023710else
Martin v. Löwis11437992002-04-12 09:54:03 +000023711 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023712{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23713echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023715/* confdefs.h. */
23716_ACEOF
23717cat confdefs.h >>conftest.$ac_ext
23718cat >>conftest.$ac_ext <<_ACEOF
23719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023720$ac_includes_default
23721#include <wchar.h>
23722_ACEOF
23723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023724if { (ac_try="$ac_compile"
23725case "(($ac_try" in
23726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23727 *) ac_try_echo=$ac_try;;
23728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023732 grep -v '^ *+' conftest.er1 >conftest.err
23733 rm -f conftest.er1
23734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023736 (exit $ac_status); } && {
23737 test -z "$ac_c_werror_flag" ||
23738 test ! -s conftest.err
23739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023740 ac_header_compiler=yes
23741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023743sed 's/^/| /' conftest.$ac_ext >&5
23744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023745 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023747
23748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023749{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23750echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023751
23752# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023753{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23754echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023756/* confdefs.h. */
23757_ACEOF
23758cat confdefs.h >>conftest.$ac_ext
23759cat >>conftest.$ac_ext <<_ACEOF
23760/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023761#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023762_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023763if { (ac_try="$ac_cpp conftest.$ac_ext"
23764case "(($ac_try" in
23765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23766 *) ac_try_echo=$ac_try;;
23767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023770 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023771 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023772 rm -f conftest.er1
23773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023775 (exit $ac_status); } >/dev/null && {
23776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23777 test ! -s conftest.err
23778 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023779 ac_header_preproc=yes
23780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023782sed 's/^/| /' conftest.$ac_ext >&5
23783
Martin v. Löwis11437992002-04-12 09:54:03 +000023784 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023786
Martin v. Löwis11437992002-04-12 09:54:03 +000023787rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023788{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23789echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023790
23791# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23793 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023794 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23795echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23796 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23797echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023798 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023799 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023800 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023801 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23802echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23803 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23804echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23805 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23806echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23807 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23808echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23809 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23810echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23811 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23812echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023813 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023814## -------------------------------------- ##
23815## Report this to http://bugs.python.org/ ##
23816## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023817_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023818 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023819 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023821{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23822echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023823if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023824 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023825else
23826 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023827fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023828{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23829echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023830
23831fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023832if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023833
23834
23835cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023836#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023837_ACEOF
23838
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023839 wchar_h="yes"
23840
Guido van Rossumef2255b2000-03-10 22:30:29 +000023841else
Martin v. Löwis11437992002-04-12 09:54:03 +000023842 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023843
23844fi
23845
Michael W. Hudson54241132001-12-07 15:38:26 +000023846
Martin v. Löwis11437992002-04-12 09:54:03 +000023847
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023848# determine wchar_t size
23849if test "$wchar_h" = yes
23850then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023851 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23852echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23853if test "${ac_cv_type_wchar_t+set}" = set; then
23854 echo $ECHO_N "(cached) $ECHO_C" >&6
23855else
23856 cat >conftest.$ac_ext <<_ACEOF
23857/* confdefs.h. */
23858_ACEOF
23859cat confdefs.h >>conftest.$ac_ext
23860cat >>conftest.$ac_ext <<_ACEOF
23861/* end confdefs.h. */
23862#include <wchar.h>
23863
23864typedef wchar_t ac__type_new_;
23865int
23866main ()
23867{
23868if ((ac__type_new_ *) 0)
23869 return 0;
23870if (sizeof (ac__type_new_))
23871 return 0;
23872 ;
23873 return 0;
23874}
23875_ACEOF
23876rm -f conftest.$ac_objext
23877if { (ac_try="$ac_compile"
23878case "(($ac_try" in
23879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23880 *) ac_try_echo=$ac_try;;
23881esac
23882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23883 (eval "$ac_compile") 2>conftest.er1
23884 ac_status=$?
23885 grep -v '^ *+' conftest.er1 >conftest.err
23886 rm -f conftest.er1
23887 cat conftest.err >&5
23888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23889 (exit $ac_status); } && {
23890 test -z "$ac_c_werror_flag" ||
23891 test ! -s conftest.err
23892 } && test -s conftest.$ac_objext; then
23893 ac_cv_type_wchar_t=yes
23894else
23895 echo "$as_me: failed program was:" >&5
23896sed 's/^/| /' conftest.$ac_ext >&5
23897
23898 ac_cv_type_wchar_t=no
23899fi
23900
23901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23902fi
23903{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23904echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23905
23906# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23909# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023910{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23911echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023912if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023914else
Martin v. Löwis11437992002-04-12 09:54:03 +000023915 if test "$cross_compiling" = yes; then
23916 # Depending upon the size, compute the lo and hi bounds.
23917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023918/* confdefs.h. */
23919_ACEOF
23920cat confdefs.h >>conftest.$ac_ext
23921cat >>conftest.$ac_ext <<_ACEOF
23922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023923#include <wchar.h>
23924
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023925 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023926int
23927main ()
23928{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023930test_array [0] = 0
23931
23932 ;
23933 return 0;
23934}
23935_ACEOF
23936rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023937if { (ac_try="$ac_compile"
23938case "(($ac_try" in
23939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23940 *) ac_try_echo=$ac_try;;
23941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023945 grep -v '^ *+' conftest.er1 >conftest.err
23946 rm -f conftest.er1
23947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023949 (exit $ac_status); } && {
23950 test -z "$ac_c_werror_flag" ||
23951 test ! -s conftest.err
23952 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023953 ac_lo=0 ac_mid=0
23954 while :; do
23955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023956/* confdefs.h. */
23957_ACEOF
23958cat confdefs.h >>conftest.$ac_ext
23959cat >>conftest.$ac_ext <<_ACEOF
23960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023961#include <wchar.h>
23962
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023963 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023964int
23965main ()
23966{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023968test_array [0] = 0
23969
23970 ;
23971 return 0;
23972}
23973_ACEOF
23974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023975if { (ac_try="$ac_compile"
23976case "(($ac_try" in
23977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23978 *) ac_try_echo=$ac_try;;
23979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023983 grep -v '^ *+' conftest.er1 >conftest.err
23984 rm -f conftest.er1
23985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023987 (exit $ac_status); } && {
23988 test -z "$ac_c_werror_flag" ||
23989 test ! -s conftest.err
23990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023991 ac_hi=$ac_mid; break
23992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023994sed 's/^/| /' conftest.$ac_ext >&5
23995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023996 ac_lo=`expr $ac_mid + 1`
23997 if test $ac_lo -le $ac_mid; then
23998 ac_lo= ac_hi=
23999 break
24000 fi
24001 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024003
24004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024005 done
24006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024008sed 's/^/| /' conftest.$ac_ext >&5
24009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024011/* confdefs.h. */
24012_ACEOF
24013cat confdefs.h >>conftest.$ac_ext
24014cat >>conftest.$ac_ext <<_ACEOF
24015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024016#include <wchar.h>
24017
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024018 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024019int
24020main ()
24021{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024022static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024023test_array [0] = 0
24024
24025 ;
24026 return 0;
24027}
24028_ACEOF
24029rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024030if { (ac_try="$ac_compile"
24031case "(($ac_try" in
24032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24033 *) ac_try_echo=$ac_try;;
24034esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024038 grep -v '^ *+' conftest.er1 >conftest.err
24039 rm -f conftest.er1
24040 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024042 (exit $ac_status); } && {
24043 test -z "$ac_c_werror_flag" ||
24044 test ! -s conftest.err
24045 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024046 ac_hi=-1 ac_mid=-1
24047 while :; do
24048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024049/* confdefs.h. */
24050_ACEOF
24051cat confdefs.h >>conftest.$ac_ext
24052cat >>conftest.$ac_ext <<_ACEOF
24053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024054#include <wchar.h>
24055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024056 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024057int
24058main ()
24059{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024061test_array [0] = 0
24062
24063 ;
24064 return 0;
24065}
24066_ACEOF
24067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024068if { (ac_try="$ac_compile"
24069case "(($ac_try" in
24070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24071 *) ac_try_echo=$ac_try;;
24072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024076 grep -v '^ *+' conftest.er1 >conftest.err
24077 rm -f conftest.er1
24078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024080 (exit $ac_status); } && {
24081 test -z "$ac_c_werror_flag" ||
24082 test ! -s conftest.err
24083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024084 ac_lo=$ac_mid; break
24085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024087sed 's/^/| /' conftest.$ac_ext >&5
24088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024089 ac_hi=`expr '(' $ac_mid ')' - 1`
24090 if test $ac_mid -le $ac_hi; then
24091 ac_lo= ac_hi=
24092 break
24093 fi
24094 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024096
24097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024098 done
24099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024101sed 's/^/| /' conftest.$ac_ext >&5
24102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024103 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024105
24106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024108
24109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024110# Binary search between lo and hi bounds.
24111while test "x$ac_lo" != "x$ac_hi"; do
24112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024114/* confdefs.h. */
24115_ACEOF
24116cat confdefs.h >>conftest.$ac_ext
24117cat >>conftest.$ac_ext <<_ACEOF
24118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024119#include <wchar.h>
24120
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024121 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024122int
24123main ()
24124{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024126test_array [0] = 0
24127
24128 ;
24129 return 0;
24130}
24131_ACEOF
24132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024133if { (ac_try="$ac_compile"
24134case "(($ac_try" in
24135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24136 *) ac_try_echo=$ac_try;;
24137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024141 grep -v '^ *+' conftest.er1 >conftest.err
24142 rm -f conftest.er1
24143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024145 (exit $ac_status); } && {
24146 test -z "$ac_c_werror_flag" ||
24147 test ! -s conftest.err
24148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024149 ac_hi=$ac_mid
24150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024152sed 's/^/| /' conftest.$ac_ext >&5
24153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024156
24157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024158done
24159case $ac_lo in
24160?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024161'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024162 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024163See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024164echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024165See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024166 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024167 else
24168 ac_cv_sizeof_wchar_t=0
24169 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024170esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024171else
Martin v. Löwis11437992002-04-12 09:54:03 +000024172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024173/* confdefs.h. */
24174_ACEOF
24175cat confdefs.h >>conftest.$ac_ext
24176cat >>conftest.$ac_ext <<_ACEOF
24177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024178#include <wchar.h>
24179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024180 typedef wchar_t ac__type_sizeof_;
24181static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24182static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024184#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024185int
24186main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024187{
Martin v. Löwis11437992002-04-12 09:54:03 +000024188
24189 FILE *f = fopen ("conftest.val", "w");
24190 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024192 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024194 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024195 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024197 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024198 }
24199 else
24200 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024201 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024203 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024204 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024205 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024206 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024207
24208 ;
24209 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024210}
Martin v. Löwis11437992002-04-12 09:54:03 +000024211_ACEOF
24212rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213if { (ac_try="$ac_link"
24214case "(($ac_try" in
24215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24216 *) ac_try_echo=$ac_try;;
24217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024220 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024223 { (case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024231 (exit $ac_status); }; }; then
24232 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024234 echo "$as_me: program exited with status $ac_status" >&5
24235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024236sed 's/^/| /' conftest.$ac_ext >&5
24237
Martin v. Löwis11437992002-04-12 09:54:03 +000024238( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024239if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024241See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024242echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024243See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024244 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024245 else
24246 ac_cv_sizeof_wchar_t=0
24247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249rm -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 +000024250fi
24251rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024253{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24254echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024255
24256
24257
Martin v. Löwis11437992002-04-12 09:54:03 +000024258cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024259#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024260_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024261
Michael W. Hudson54241132001-12-07 15:38:26 +000024262
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024263fi
24264
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024265{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24266echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024267have_ucs4_tcl=no
24268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024269/* confdefs.h. */
24270_ACEOF
24271cat confdefs.h >>conftest.$ac_ext
24272cat >>conftest.$ac_ext <<_ACEOF
24273/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024274
24275#include <tcl.h>
24276#if TCL_UTF_MAX != 6
24277# error "NOT UCS4_TCL"
24278#endif
24279int
24280main ()
24281{
24282
24283 ;
24284 return 0;
24285}
24286_ACEOF
24287rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024288if { (ac_try="$ac_compile"
24289case "(($ac_try" in
24290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24291 *) ac_try_echo=$ac_try;;
24292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024296 grep -v '^ *+' conftest.er1 >conftest.err
24297 rm -f conftest.er1
24298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024300 (exit $ac_status); } && {
24301 test -z "$ac_c_werror_flag" ||
24302 test ! -s conftest.err
24303 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024304
24305
24306cat >>confdefs.h <<\_ACEOF
24307#define HAVE_UCS4_TCL 1
24308_ACEOF
24309
24310 have_ucs4_tcl=yes
24311
24312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024314sed 's/^/| /' conftest.$ac_ext >&5
24315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024318
24319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024320{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24321echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024322
Skip Montanaro6dead952003-09-25 14:50:04 +000024323# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024324if test "$wchar_h" = yes
24325then
24326 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024327 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24328echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024329 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024331else
24332
24333 if test "$cross_compiling" = yes; then
24334 ac_cv_wchar_t_signed=yes
24335else
24336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024337/* confdefs.h. */
24338_ACEOF
24339cat confdefs.h >>conftest.$ac_ext
24340cat >>conftest.$ac_ext <<_ACEOF
24341/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024342
24343 #include <wchar.h>
24344 int main()
24345 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024346 /* Success: exit code 0 */
24347 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024348 }
24349
24350_ACEOF
24351rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352if { (ac_try="$ac_link"
24353case "(($ac_try" in
24354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24355 *) ac_try_echo=$ac_try;;
24356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024358 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024362 { (case "(($ac_try" in
24363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24364 *) ac_try_echo=$ac_try;;
24365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024367 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024368 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024370 (exit $ac_status); }; }; then
24371 ac_cv_wchar_t_signed=yes
24372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024373 echo "$as_me: program exited with status $ac_status" >&5
24374echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024375sed 's/^/| /' conftest.$ac_ext >&5
24376
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024377( exit $ac_status )
24378ac_cv_wchar_t_signed=no
24379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024380rm -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 +000024381fi
24382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024384fi
24385
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024386 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24387echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024388fi
24389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024390{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24391echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024392
24393# Check whether --with-wide-unicode was given.
24394if test "${with_wide_unicode+set}" = set; then
24395 withval=$with_wide_unicode;
24396if test "$withval" != no
24397then unicode_size="4"
24398else unicode_size="2"
24399fi
24400
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024401else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402
Georg Brandl52d168a2008-01-07 18:10:24 +000024403case "$have_ucs4_tcl" in
24404 yes) unicode_size="4" ;;
24405 *) unicode_size="2" ;;
24406esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024407
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024408fi
24409
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024410
24411
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024412
Georg Brandl52d168a2008-01-07 18:10:24 +000024413case "$unicode_size" in
24414 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024415#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024416_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024417 ;;
24418 *) cat >>confdefs.h <<\_ACEOF
24419#define Py_UNICODE_SIZE 2
24420_ACEOF
24421 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024422esac
24423
Michael W. Hudson54241132001-12-07 15:38:26 +000024424
Martin v. Löwis11437992002-04-12 09:54:03 +000024425
24426
Georg Brandl52d168a2008-01-07 18:10:24 +000024427# wchar_t is only usable if it maps to an unsigned type
24428if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024429 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024430then
24431 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024432
Martin v. Löwis11437992002-04-12 09:54:03 +000024433cat >>confdefs.h <<\_ACEOF
24434#define HAVE_USABLE_WCHAR_T 1
24435_ACEOF
24436
Georg Brandl52d168a2008-01-07 18:10:24 +000024437 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024438#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024439_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024440
Georg Brandl52d168a2008-01-07 18:10:24 +000024441elif test "$ac_cv_sizeof_short" = "$unicode_size"
24442then
24443 PY_UNICODE_TYPE="unsigned short"
24444 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024445#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024446_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024447
Georg Brandl52d168a2008-01-07 18:10:24 +000024448elif test "$ac_cv_sizeof_long" = "$unicode_size"
24449then
24450 PY_UNICODE_TYPE="unsigned long"
24451 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024452#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024453_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024454
Georg Brandl52d168a2008-01-07 18:10:24 +000024455else
24456 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024457fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024458{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24459echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024460
24461# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024462{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24463echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024464if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024465 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024467 # See if sys/param.h defines the BYTE_ORDER macro.
24468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024469/* confdefs.h. */
24470_ACEOF
24471cat confdefs.h >>conftest.$ac_ext
24472cat >>conftest.$ac_ext <<_ACEOF
24473/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024474#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024475#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024476
Martin v. Löwis11437992002-04-12 09:54:03 +000024477int
24478main ()
24479{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024480#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24481 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24482 bogus endian macros
24483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024484
24485 ;
24486 return 0;
24487}
24488_ACEOF
24489rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024490if { (ac_try="$ac_compile"
24491case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;;
24494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024498 grep -v '^ *+' conftest.er1 >conftest.err
24499 rm -f conftest.er1
24500 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502 (exit $ac_status); } && {
24503 test -z "$ac_c_werror_flag" ||
24504 test ! -s conftest.err
24505 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024506 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024508/* confdefs.h. */
24509_ACEOF
24510cat confdefs.h >>conftest.$ac_ext
24511cat >>conftest.$ac_ext <<_ACEOF
24512/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024513#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024514#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024515
Martin v. Löwis11437992002-04-12 09:54:03 +000024516int
24517main ()
24518{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024519#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024520 not big endian
24521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024522
24523 ;
24524 return 0;
24525}
24526_ACEOF
24527rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024528if { (ac_try="$ac_compile"
24529case "(($ac_try" in
24530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24531 *) ac_try_echo=$ac_try;;
24532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024536 grep -v '^ *+' conftest.er1 >conftest.err
24537 rm -f conftest.er1
24538 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024540 (exit $ac_status); } && {
24541 test -z "$ac_c_werror_flag" ||
24542 test ! -s conftest.err
24543 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024544 ac_cv_c_bigendian=yes
24545else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024547sed 's/^/| /' conftest.$ac_ext >&5
24548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551
24552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024555sed 's/^/| /' conftest.$ac_ext >&5
24556
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024557 # It does not; compile a test program.
24558if test "$cross_compiling" = yes; then
24559 # try to guess the endianness by grepping values into an object file
24560 ac_cv_c_bigendian=unknown
24561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024562/* confdefs.h. */
24563_ACEOF
24564cat confdefs.h >>conftest.$ac_ext
24565cat >>conftest.$ac_ext <<_ACEOF
24566/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024567short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24568short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24569void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24570short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24571short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24572void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024573int
24574main ()
24575{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024576 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024577 ;
24578 return 0;
24579}
24580_ACEOF
24581rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024582if { (ac_try="$ac_compile"
24583case "(($ac_try" in
24584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24585 *) ac_try_echo=$ac_try;;
24586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024590 grep -v '^ *+' conftest.er1 >conftest.err
24591 rm -f conftest.er1
24592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024594 (exit $ac_status); } && {
24595 test -z "$ac_c_werror_flag" ||
24596 test ! -s conftest.err
24597 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024598 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024600fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024601if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24602 if test "$ac_cv_c_bigendian" = unknown; then
24603 ac_cv_c_bigendian=no
24604 else
24605 # finding both strings is unlikely to happen, but who knows?
24606 ac_cv_c_bigendian=unknown
24607 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024608fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024609else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024611sed 's/^/| /' conftest.$ac_ext >&5
24612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024613
Martin v. Löwis11437992002-04-12 09:54:03 +000024614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024615
24616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024617else
24618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024619/* confdefs.h. */
24620_ACEOF
24621cat confdefs.h >>conftest.$ac_ext
24622cat >>conftest.$ac_ext <<_ACEOF
24623/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024624$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024625int
24626main ()
24627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024629 /* Are we little or big endian? From Harbison&Steele. */
24630 union
24631 {
24632 long int l;
24633 char c[sizeof (long int)];
24634 } u;
24635 u.l = 1;
24636 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024637
24638 ;
24639 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024640}
Martin v. Löwis11437992002-04-12 09:54:03 +000024641_ACEOF
24642rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024643if { (ac_try="$ac_link"
24644case "(($ac_try" in
24645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24646 *) ac_try_echo=$ac_try;;
24647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024649 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653 { (case "(($ac_try" in
24654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24655 *) ac_try_echo=$ac_try;;
24656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024658 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024661 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024662 ac_cv_c_bigendian=no
24663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 echo "$as_me: program exited with status $ac_status" >&5
24665echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024666sed 's/^/| /' conftest.$ac_ext >&5
24667
Martin v. Löwis11437992002-04-12 09:54:03 +000024668( exit $ac_status )
24669ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024671rm -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 +000024672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024673
24674
Martin v. Löwis11437992002-04-12 09:54:03 +000024675fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024676
24677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24678fi
24679{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24680echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24681case $ac_cv_c_bigendian in
24682 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024683
24684cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024685#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024686_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024687 ;;
24688 no)
24689 ;;
24690 *)
24691 { { echo "$as_me:$LINENO: error: unknown endianness
24692presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24693echo "$as_me: error: unknown endianness
24694presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024695 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024696esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024697
Michael W. Hudson54241132001-12-07 15:38:26 +000024698
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024699# Check whether right shifting a negative integer extends the sign bit
24700# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024701{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24702echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024703if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024704 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024705else
Martin v. Löwis11437992002-04-12 09:54:03 +000024706
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024707if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024708 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024709else
Martin v. Löwis11437992002-04-12 09:54:03 +000024710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024711/* confdefs.h. */
24712_ACEOF
24713cat confdefs.h >>conftest.$ac_ext
24714cat >>conftest.$ac_ext <<_ACEOF
24715/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024716
24717int main()
24718{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024719 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024720}
24721
Martin v. Löwis11437992002-04-12 09:54:03 +000024722_ACEOF
24723rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024724if { (ac_try="$ac_link"
24725case "(($ac_try" in
24726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24727 *) ac_try_echo=$ac_try;;
24728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024731 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024733 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024734 { (case "(($ac_try" in
24735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24736 *) ac_try_echo=$ac_try;;
24737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024739 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024740 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024742 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024743 ac_cv_rshift_extends_sign=yes
24744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745 echo "$as_me: program exited with status $ac_status" >&5
24746echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024747sed 's/^/| /' conftest.$ac_ext >&5
24748
Martin v. Löwis11437992002-04-12 09:54:03 +000024749( exit $ac_status )
24750ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024752rm -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 +000024753fi
24754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024755
24756fi
24757
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024758{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24759echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024760if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024761then
Martin v. Löwis11437992002-04-12 09:54:03 +000024762
24763cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024764#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024765_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024766
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024767fi
24768
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024769# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024770{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24771echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024772if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024774else
Martin v. Löwis11437992002-04-12 09:54:03 +000024775
24776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024777/* confdefs.h. */
24778_ACEOF
24779cat confdefs.h >>conftest.$ac_ext
24780cat >>conftest.$ac_ext <<_ACEOF
24781/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024782#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024783int
24784main ()
24785{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024786
24787 FILE *f = fopen("/dev/null", "r");
24788 flockfile(f);
24789 getc_unlocked(f);
24790 funlockfile(f);
24791
Martin v. Löwis11437992002-04-12 09:54:03 +000024792 ;
24793 return 0;
24794}
24795_ACEOF
24796rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024797if { (ac_try="$ac_link"
24798case "(($ac_try" in
24799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24800 *) ac_try_echo=$ac_try;;
24801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024805 grep -v '^ *+' conftest.er1 >conftest.err
24806 rm -f conftest.er1
24807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024809 (exit $ac_status); } && {
24810 test -z "$ac_c_werror_flag" ||
24811 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024812 } && test -s conftest$ac_exeext &&
24813 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024814 ac_cv_have_getc_unlocked=yes
24815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024817sed 's/^/| /' conftest.$ac_ext >&5
24818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821
24822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024823 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024824fi
24825
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24827echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024828if test "$ac_cv_have_getc_unlocked" = yes
24829then
Martin v. Löwis11437992002-04-12 09:54:03 +000024830
24831cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024832#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024833_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024834
24835fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024836
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024837# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024838# save the value of LIBS so we don't actually link Python with readline
24839LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024840
Gregory P. Smith18820942008-09-07 06:24:49 +000024841# On some systems we need to link readline to a termcap compatible
24842# library. NOTE: Keep the precedence of listed libraries synchronised
24843# with setup.py.
24844py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024845{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24846echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024847for py_libtermcap in "" ncursesw ncurses curses termcap; do
24848 if test -z "$py_libtermcap"; then
24849 READLINE_LIBS="-lreadline"
24850 else
24851 READLINE_LIBS="-lreadline -l$py_libtermcap"
24852 fi
24853 LIBS="$READLINE_LIBS $LIBS_no_readline"
24854 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024855/* confdefs.h. */
24856_ACEOF
24857cat confdefs.h >>conftest.$ac_ext
24858cat >>conftest.$ac_ext <<_ACEOF
24859/* end confdefs.h. */
24860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861/* Override any GCC internal prototype to avoid an error.
24862 Use char because int might match the return type of a GCC
24863 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024864#ifdef __cplusplus
24865extern "C"
24866#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024867char readline ();
24868int
24869main ()
24870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024872 ;
24873 return 0;
24874}
24875_ACEOF
24876rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024877if { (ac_try="$ac_link"
24878case "(($ac_try" in
24879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24880 *) ac_try_echo=$ac_try;;
24881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024883 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024884 ac_status=$?
24885 grep -v '^ *+' conftest.er1 >conftest.err
24886 rm -f conftest.er1
24887 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024889 (exit $ac_status); } && {
24890 test -z "$ac_c_werror_flag" ||
24891 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024892 } && test -s conftest$ac_exeext &&
24893 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024894 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024896 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024897sed 's/^/| /' conftest.$ac_ext >&5
24898
Gregory P. Smith18820942008-09-07 06:24:49 +000024899
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024901
24902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024903 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024904 if test $py_cv_lib_readline = yes; then
24905 break
24906 fi
24907done
24908# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24909#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024910if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024911 { echo "$as_me:$LINENO: result: none" >&5
24912echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024913else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024914 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24915echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024916
24917cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024918#define HAVE_LIBREADLINE 1
24919_ACEOF
24920
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024921fi
24922
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024923# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024924{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24925echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024926if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024927 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024928else
24929 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024930LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024931cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024932/* confdefs.h. */
24933_ACEOF
24934cat confdefs.h >>conftest.$ac_ext
24935cat >>conftest.$ac_ext <<_ACEOF
24936/* end confdefs.h. */
24937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024938/* Override any GCC internal prototype to avoid an error.
24939 Use char because int might match the return type of a GCC
24940 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024941#ifdef __cplusplus
24942extern "C"
24943#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024944char rl_callback_handler_install ();
24945int
24946main ()
24947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024949 ;
24950 return 0;
24951}
24952_ACEOF
24953rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024954if { (ac_try="$ac_link"
24955case "(($ac_try" in
24956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24957 *) ac_try_echo=$ac_try;;
24958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024960 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024962 grep -v '^ *+' conftest.er1 >conftest.err
24963 rm -f conftest.er1
24964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966 (exit $ac_status); } && {
24967 test -z "$ac_c_werror_flag" ||
24968 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024969 } && test -s conftest$ac_exeext &&
24970 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024971 ac_cv_lib_readline_rl_callback_handler_install=yes
24972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024973 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024974sed 's/^/| /' conftest.$ac_ext >&5
24975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024976 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978
24979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024980 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024981LIBS=$ac_check_lib_save_LIBS
24982fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024983{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24984echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24985if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024986
24987cat >>confdefs.h <<\_ACEOF
24988#define HAVE_RL_CALLBACK 1
24989_ACEOF
24990
24991fi
24992
24993
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024994# check for readline 2.2
24995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024996/* confdefs.h. */
24997_ACEOF
24998cat confdefs.h >>conftest.$ac_ext
24999cat >>conftest.$ac_ext <<_ACEOF
25000/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025001#include <readline/readline.h>
25002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003if { (ac_try="$ac_cpp conftest.$ac_ext"
25004case "(($ac_try" in
25005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25006 *) ac_try_echo=$ac_try;;
25007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025009 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025010 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025011 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025012 rm -f conftest.er1
25013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025015 (exit $ac_status); } >/dev/null && {
25016 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25017 test ! -s conftest.err
25018 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025019 have_readline=yes
25020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025022sed 's/^/| /' conftest.$ac_ext >&5
25023
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025024 have_readline=no
25025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025026
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025027rm -f conftest.err conftest.$ac_ext
25028if test $have_readline = yes
25029then
25030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025031/* confdefs.h. */
25032_ACEOF
25033cat confdefs.h >>conftest.$ac_ext
25034cat >>conftest.$ac_ext <<_ACEOF
25035/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025036#include <readline/readline.h>
25037
25038_ACEOF
25039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025040 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025041
25042cat >>confdefs.h <<\_ACEOF
25043#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25044_ACEOF
25045
25046fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025047rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025048
Antoine Pitroud5131772009-10-26 19:22:14 +000025049 cat >conftest.$ac_ext <<_ACEOF
25050/* confdefs.h. */
25051_ACEOF
25052cat confdefs.h >>conftest.$ac_ext
25053cat >>conftest.$ac_ext <<_ACEOF
25054/* end confdefs.h. */
25055#include <readline/readline.h>
25056
25057_ACEOF
25058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25059 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25060
25061cat >>confdefs.h <<\_ACEOF
25062#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25063_ACEOF
25064
25065fi
25066rm -f conftest*
25067
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025068fi
25069
Martin v. Löwis0daad592001-09-30 21:09:59 +000025070# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025071{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25072echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025073if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025074 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025075else
Martin v. Löwis11437992002-04-12 09:54:03 +000025076 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025077LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025079/* confdefs.h. */
25080_ACEOF
25081cat confdefs.h >>conftest.$ac_ext
25082cat >>conftest.$ac_ext <<_ACEOF
25083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025085/* Override any GCC internal prototype to avoid an error.
25086 Use char because int might match the return type of a GCC
25087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025088#ifdef __cplusplus
25089extern "C"
25090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025091char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025092int
25093main ()
25094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025095return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025096 ;
25097 return 0;
25098}
25099_ACEOF
25100rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025101if { (ac_try="$ac_link"
25102case "(($ac_try" in
25103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25104 *) ac_try_echo=$ac_try;;
25105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025109 grep -v '^ *+' conftest.er1 >conftest.err
25110 rm -f conftest.er1
25111 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113 (exit $ac_status); } && {
25114 test -z "$ac_c_werror_flag" ||
25115 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025116 } && test -s conftest$ac_exeext &&
25117 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025118 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025121sed 's/^/| /' conftest.$ac_ext >&5
25122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125
25126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025128LIBS=$ac_check_lib_save_LIBS
25129fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025130{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25131echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25132if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025133
Martin v. Löwis11437992002-04-12 09:54:03 +000025134cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025135#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025136_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025137
Martin v. Löwis0daad592001-09-30 21:09:59 +000025138fi
25139
Michael W. Hudson54241132001-12-07 15:38:26 +000025140
Thomas Wouters89d996e2007-09-08 17:39:28 +000025141# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025142{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25143echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025144if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025145 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025146else
25147 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025148LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025149cat >conftest.$ac_ext <<_ACEOF
25150/* confdefs.h. */
25151_ACEOF
25152cat confdefs.h >>conftest.$ac_ext
25153cat >>conftest.$ac_ext <<_ACEOF
25154/* end confdefs.h. */
25155
25156/* Override any GCC internal prototype to avoid an error.
25157 Use char because int might match the return type of a GCC
25158 builtin and then its argument prototype would still apply. */
25159#ifdef __cplusplus
25160extern "C"
25161#endif
25162char rl_completion_display_matches_hook ();
25163int
25164main ()
25165{
25166return rl_completion_display_matches_hook ();
25167 ;
25168 return 0;
25169}
25170_ACEOF
25171rm -f conftest.$ac_objext conftest$ac_exeext
25172if { (ac_try="$ac_link"
25173case "(($ac_try" in
25174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25175 *) ac_try_echo=$ac_try;;
25176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025178 (eval "$ac_link") 2>conftest.er1
25179 ac_status=$?
25180 grep -v '^ *+' conftest.er1 >conftest.err
25181 rm -f conftest.er1
25182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025184 (exit $ac_status); } && {
25185 test -z "$ac_c_werror_flag" ||
25186 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025187 } && test -s conftest$ac_exeext &&
25188 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025189 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025191 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025192sed 's/^/| /' conftest.$ac_ext >&5
25193
25194 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25195fi
25196
25197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25198 conftest$ac_exeext conftest.$ac_ext
25199LIBS=$ac_check_lib_save_LIBS
25200fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25202echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25203if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025204
25205cat >>confdefs.h <<\_ACEOF
25206#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25207_ACEOF
25208
25209fi
25210
25211
Martin v. Löwis0daad592001-09-30 21:09:59 +000025212# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025213{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25214echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025215if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025216 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025217else
Martin v. Löwis11437992002-04-12 09:54:03 +000025218 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025219LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025221/* confdefs.h. */
25222_ACEOF
25223cat confdefs.h >>conftest.$ac_ext
25224cat >>conftest.$ac_ext <<_ACEOF
25225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025227/* Override any GCC internal prototype to avoid an error.
25228 Use char because int might match the return type of a GCC
25229 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025230#ifdef __cplusplus
25231extern "C"
25232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025233char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025234int
25235main ()
25236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025237return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025238 ;
25239 return 0;
25240}
25241_ACEOF
25242rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025243if { (ac_try="$ac_link"
25244case "(($ac_try" in
25245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25246 *) ac_try_echo=$ac_try;;
25247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025249 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025251 grep -v '^ *+' conftest.er1 >conftest.err
25252 rm -f conftest.er1
25253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025255 (exit $ac_status); } && {
25256 test -z "$ac_c_werror_flag" ||
25257 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025258 } && test -s conftest$ac_exeext &&
25259 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025263sed 's/^/| /' conftest.$ac_ext >&5
25264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025267
25268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025270LIBS=$ac_check_lib_save_LIBS
25271fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025272{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25273echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25274if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025275
Martin v. Löwis11437992002-04-12 09:54:03 +000025276cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025277#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025278_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025279
Guido van Rossum353ae582001-07-10 16:45:32 +000025280fi
25281
Jack Jansendd19cf82001-12-06 22:36:17 +000025282
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025283# also in readline 4.2
25284cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025285/* confdefs.h. */
25286_ACEOF
25287cat confdefs.h >>conftest.$ac_ext
25288cat >>conftest.$ac_ext <<_ACEOF
25289/* end confdefs.h. */
25290#include <readline/readline.h>
25291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025292if { (ac_try="$ac_cpp conftest.$ac_ext"
25293case "(($ac_try" in
25294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25295 *) ac_try_echo=$ac_try;;
25296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025299 ac_status=$?
25300 grep -v '^ *+' conftest.er1 >conftest.err
25301 rm -f conftest.er1
25302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025304 (exit $ac_status); } >/dev/null && {
25305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25306 test ! -s conftest.err
25307 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025308 have_readline=yes
25309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025310 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025311sed 's/^/| /' conftest.$ac_ext >&5
25312
25313 have_readline=no
25314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025315
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025316rm -f conftest.err conftest.$ac_ext
25317if test $have_readline = yes
25318then
25319 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025320/* confdefs.h. */
25321_ACEOF
25322cat confdefs.h >>conftest.$ac_ext
25323cat >>conftest.$ac_ext <<_ACEOF
25324/* end confdefs.h. */
25325#include <readline/readline.h>
25326
25327_ACEOF
25328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25329 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25330
25331cat >>confdefs.h <<\_ACEOF
25332#define HAVE_RL_CATCH_SIGNAL 1
25333_ACEOF
25334
25335fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025336rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025337
25338fi
25339
Martin v. Löwis82bca632006-02-10 20:49:30 +000025340# End of readline checks: restore LIBS
25341LIBS=$LIBS_no_readline
25342
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025343{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25344echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025345if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025346 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025347else
Martin v. Löwis11437992002-04-12 09:54:03 +000025348
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025349if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025350 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025351else
Martin v. Löwis11437992002-04-12 09:54:03 +000025352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025353/* confdefs.h. */
25354_ACEOF
25355cat confdefs.h >>conftest.$ac_ext
25356cat >>conftest.$ac_ext <<_ACEOF
25357/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025358
25359int main()
25360{
25361 int val1 = nice(1);
25362 if (val1 != -1 && val1 == nice(2))
25363 exit(0);
25364 exit(1);
25365}
25366
Martin v. Löwis11437992002-04-12 09:54:03 +000025367_ACEOF
25368rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025369if { (ac_try="$ac_link"
25370case "(($ac_try" in
25371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25372 *) ac_try_echo=$ac_try;;
25373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025375 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025378 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025379 { (case "(($ac_try" in
25380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25381 *) ac_try_echo=$ac_try;;
25382esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025384 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025387 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025388 ac_cv_broken_nice=yes
25389else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390 echo "$as_me: program exited with status $ac_status" >&5
25391echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025392sed 's/^/| /' conftest.$ac_ext >&5
25393
Martin v. Löwis11437992002-04-12 09:54:03 +000025394( exit $ac_status )
25395ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025397rm -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 +000025398fi
25399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025400
25401fi
25402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025403{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25404echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025405if test "$ac_cv_broken_nice" = yes
25406then
Martin v. Löwis11437992002-04-12 09:54:03 +000025407
25408cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025409#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025410_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025411
25412fi
25413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025414{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25415echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025416if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025417 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025418else
25419 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025420 ac_cv_broken_poll=no
25421else
25422 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025423/* confdefs.h. */
25424_ACEOF
25425cat confdefs.h >>conftest.$ac_ext
25426cat >>conftest.$ac_ext <<_ACEOF
25427/* end confdefs.h. */
25428
25429#include <poll.h>
25430
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025431int main()
25432{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025433 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025434 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025435
25436 close (42);
25437
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025438 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025439 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025440 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025441 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025442 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025443 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025444 return 1;
25445}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025446
25447_ACEOF
25448rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025449if { (ac_try="$ac_link"
25450case "(($ac_try" in
25451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25452 *) ac_try_echo=$ac_try;;
25453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025455 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025456 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025459 { (case "(($ac_try" in
25460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25461 *) ac_try_echo=$ac_try;;
25462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025464 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025465 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025467 (exit $ac_status); }; }; then
25468 ac_cv_broken_poll=yes
25469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025470 echo "$as_me: program exited with status $ac_status" >&5
25471echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025472sed 's/^/| /' conftest.$ac_ext >&5
25473
25474( exit $ac_status )
25475ac_cv_broken_poll=no
25476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025477rm -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 +000025478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025479
25480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025481fi
25482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025483{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25484echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025485if test "$ac_cv_broken_poll" = yes
25486then
25487
25488cat >>confdefs.h <<\_ACEOF
25489#define HAVE_BROKEN_POLL 1
25490_ACEOF
25491
25492fi
25493
Brett Cannon43802422005-02-10 20:48:03 +000025494# 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 +000025495# (which is not required by ISO C or UNIX spec) and/or if we support
25496# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025497{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25498echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025499if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025500 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025501else
25502 cat >conftest.$ac_ext <<_ACEOF
25503/* confdefs.h. */
25504_ACEOF
25505cat confdefs.h >>conftest.$ac_ext
25506cat >>conftest.$ac_ext <<_ACEOF
25507/* end confdefs.h. */
25508#include <sys/types.h>
25509#include <$ac_cv_struct_tm>
25510
25511
25512int
25513main ()
25514{
25515static struct tm ac_aggr;
25516if (ac_aggr.tm_zone)
25517return 0;
25518 ;
25519 return 0;
25520}
25521_ACEOF
25522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025523if { (ac_try="$ac_compile"
25524case "(($ac_try" in
25525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25526 *) ac_try_echo=$ac_try;;
25527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025529 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025530 ac_status=$?
25531 grep -v '^ *+' conftest.er1 >conftest.err
25532 rm -f conftest.er1
25533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025535 (exit $ac_status); } && {
25536 test -z "$ac_c_werror_flag" ||
25537 test ! -s conftest.err
25538 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025539 ac_cv_member_struct_tm_tm_zone=yes
25540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025541 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025542sed 's/^/| /' conftest.$ac_ext >&5
25543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025544 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025545/* confdefs.h. */
25546_ACEOF
25547cat confdefs.h >>conftest.$ac_ext
25548cat >>conftest.$ac_ext <<_ACEOF
25549/* end confdefs.h. */
25550#include <sys/types.h>
25551#include <$ac_cv_struct_tm>
25552
25553
25554int
25555main ()
25556{
25557static struct tm ac_aggr;
25558if (sizeof ac_aggr.tm_zone)
25559return 0;
25560 ;
25561 return 0;
25562}
25563_ACEOF
25564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025565if { (ac_try="$ac_compile"
25566case "(($ac_try" in
25567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25568 *) ac_try_echo=$ac_try;;
25569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025571 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025572 ac_status=$?
25573 grep -v '^ *+' conftest.er1 >conftest.err
25574 rm -f conftest.er1
25575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025577 (exit $ac_status); } && {
25578 test -z "$ac_c_werror_flag" ||
25579 test ! -s conftest.err
25580 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025581 ac_cv_member_struct_tm_tm_zone=yes
25582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025583 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025584sed 's/^/| /' conftest.$ac_ext >&5
25585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025586 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025588
25589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025591
25592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025593fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025594{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25595echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25596if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025597
25598cat >>confdefs.h <<_ACEOF
25599#define HAVE_STRUCT_TM_TM_ZONE 1
25600_ACEOF
25601
25602
25603fi
25604
25605if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25606
25607cat >>confdefs.h <<\_ACEOF
25608#define HAVE_TM_ZONE 1
25609_ACEOF
25610
25611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025612 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25613echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025614if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025615 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025616else
25617 cat >conftest.$ac_ext <<_ACEOF
25618/* confdefs.h. */
25619_ACEOF
25620cat confdefs.h >>conftest.$ac_ext
25621cat >>conftest.$ac_ext <<_ACEOF
25622/* end confdefs.h. */
25623#include <time.h>
25624
25625int
25626main ()
25627{
25628#ifndef tzname
25629 (void) tzname;
25630#endif
25631
25632 ;
25633 return 0;
25634}
25635_ACEOF
25636rm -f conftest.$ac_objext
25637if { (ac_try="$ac_compile"
25638case "(($ac_try" in
25639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25640 *) ac_try_echo=$ac_try;;
25641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025643 (eval "$ac_compile") 2>conftest.er1
25644 ac_status=$?
25645 grep -v '^ *+' conftest.er1 >conftest.err
25646 rm -f conftest.er1
25647 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649 (exit $ac_status); } && {
25650 test -z "$ac_c_werror_flag" ||
25651 test ! -s conftest.err
25652 } && test -s conftest.$ac_objext; then
25653 ac_cv_have_decl_tzname=yes
25654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025655 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025656sed 's/^/| /' conftest.$ac_ext >&5
25657
25658 ac_cv_have_decl_tzname=no
25659fi
25660
25661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25662fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025663{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25664echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25665if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025666
25667cat >>confdefs.h <<_ACEOF
25668#define HAVE_DECL_TZNAME 1
25669_ACEOF
25670
25671
25672else
25673 cat >>confdefs.h <<_ACEOF
25674#define HAVE_DECL_TZNAME 0
25675_ACEOF
25676
25677
25678fi
25679
25680
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025681 { echo "$as_me:$LINENO: checking for tzname" >&5
25682echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025683if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025684 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025685else
25686 cat >conftest.$ac_ext <<_ACEOF
25687/* confdefs.h. */
25688_ACEOF
25689cat confdefs.h >>conftest.$ac_ext
25690cat >>conftest.$ac_ext <<_ACEOF
25691/* end confdefs.h. */
25692#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693#if !HAVE_DECL_TZNAME
25694extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025695#endif
25696
25697int
25698main ()
25699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025700return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025701 ;
25702 return 0;
25703}
25704_ACEOF
25705rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025706if { (ac_try="$ac_link"
25707case "(($ac_try" in
25708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25709 *) ac_try_echo=$ac_try;;
25710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025712 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025713 ac_status=$?
25714 grep -v '^ *+' conftest.er1 >conftest.err
25715 rm -f conftest.er1
25716 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025718 (exit $ac_status); } && {
25719 test -z "$ac_c_werror_flag" ||
25720 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025721 } && test -s conftest$ac_exeext &&
25722 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025723 ac_cv_var_tzname=yes
25724else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025725 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025726sed 's/^/| /' conftest.$ac_ext >&5
25727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025728 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025730
25731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025732 conftest$ac_exeext conftest.$ac_ext
25733fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025734{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25735echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025736 if test $ac_cv_var_tzname = yes; then
25737
25738cat >>confdefs.h <<\_ACEOF
25739#define HAVE_TZNAME 1
25740_ACEOF
25741
25742 fi
25743fi
25744
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025745
Martin v. Löwis1d459062005-03-14 21:23:33 +000025746# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025747{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25748echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025749if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025751else
25752
25753if test "$cross_compiling" = yes; then
25754 ac_cv_working_tzset=no
25755else
25756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025757/* confdefs.h. */
25758_ACEOF
25759cat confdefs.h >>conftest.$ac_ext
25760cat >>conftest.$ac_ext <<_ACEOF
25761/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025762
25763#include <stdlib.h>
25764#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025765#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025766
25767#if HAVE_TZNAME
25768extern char *tzname[];
25769#endif
25770
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025771int main()
25772{
Brett Cannon18367812003-09-19 00:59:16 +000025773 /* Note that we need to ensure that not only does tzset(3)
25774 do 'something' with localtime, but it works as documented
25775 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025776 This includes making sure that tzname is set properly if
25777 tm->tm_zone does not exist since it is the alternative way
25778 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025779
25780 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025781 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025782 */
25783
Martin v. Löwis1d459062005-03-14 21:23:33 +000025784 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025785 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25786
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025787 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025788 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025789 if (localtime(&groundhogday)->tm_hour != 0)
25790 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025791#if HAVE_TZNAME
25792 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25793 if (strcmp(tzname[0], "UTC") ||
25794 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25795 exit(1);
25796#endif
Brett Cannon18367812003-09-19 00:59:16 +000025797
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025798 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025799 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025800 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025801 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025802#if HAVE_TZNAME
25803 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25804 exit(1);
25805#endif
Brett Cannon18367812003-09-19 00:59:16 +000025806
25807 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25808 tzset();
25809 if (localtime(&groundhogday)->tm_hour != 11)
25810 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025811#if HAVE_TZNAME
25812 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25813 exit(1);
25814#endif
25815
25816#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025817 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25818 exit(1);
25819 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25820 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025821#endif
Brett Cannon18367812003-09-19 00:59:16 +000025822
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025823 exit(0);
25824}
25825
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
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +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
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025844 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025846 (exit $ac_status); }; }; then
25847 ac_cv_working_tzset=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
Skip Montanaro6dead952003-09-25 14:50:04 +000025851sed 's/^/| /' conftest.$ac_ext >&5
25852
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025853( exit $ac_status )
25854ac_cv_working_tzset=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
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025857fi
25858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025859
25860fi
25861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25863echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025864if test "$ac_cv_working_tzset" = yes
25865then
25866
25867cat >>confdefs.h <<\_ACEOF
25868#define HAVE_WORKING_TZSET 1
25869_ACEOF
25870
25871fi
25872
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025873# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025874{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25875echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025876if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025877 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025878else
25879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025880/* confdefs.h. */
25881_ACEOF
25882cat confdefs.h >>conftest.$ac_ext
25883cat >>conftest.$ac_ext <<_ACEOF
25884/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025885#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025886int
25887main ()
25888{
25889
25890struct stat st;
25891st.st_mtim.tv_nsec = 1;
25892
25893 ;
25894 return 0;
25895}
25896_ACEOF
25897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898if { (ac_try="$ac_compile"
25899case "(($ac_try" in
25900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25901 *) ac_try_echo=$ac_try;;
25902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025906 grep -v '^ *+' conftest.er1 >conftest.err
25907 rm -f conftest.er1
25908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910 (exit $ac_status); } && {
25911 test -z "$ac_c_werror_flag" ||
25912 test ! -s conftest.err
25913 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025914 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025917sed 's/^/| /' conftest.$ac_ext >&5
25918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25923fi
25924
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025925{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25926echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025927if test "$ac_cv_stat_tv_nsec" = yes
25928then
25929
25930cat >>confdefs.h <<\_ACEOF
25931#define HAVE_STAT_TV_NSEC 1
25932_ACEOF
25933
25934fi
25935
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025936# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025937{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25938echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025939if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025941else
25942 cat >conftest.$ac_ext <<_ACEOF
25943/* confdefs.h. */
25944_ACEOF
25945cat confdefs.h >>conftest.$ac_ext
25946cat >>conftest.$ac_ext <<_ACEOF
25947/* end confdefs.h. */
25948#include <sys/stat.h>
25949int
25950main ()
25951{
25952
25953struct stat st;
25954st.st_mtimespec.tv_nsec = 1;
25955
25956 ;
25957 return 0;
25958}
25959_ACEOF
25960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025961if { (ac_try="$ac_compile"
25962case "(($ac_try" in
25963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25964 *) ac_try_echo=$ac_try;;
25965esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025968 ac_status=$?
25969 grep -v '^ *+' conftest.er1 >conftest.err
25970 rm -f conftest.er1
25971 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025973 (exit $ac_status); } && {
25974 test -z "$ac_c_werror_flag" ||
25975 test ! -s conftest.err
25976 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025977 ac_cv_stat_tv_nsec2=yes
25978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025979 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025980sed 's/^/| /' conftest.$ac_ext >&5
25981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025982 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025983fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25986fi
25987
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025988{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25989echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025990if test "$ac_cv_stat_tv_nsec2" = yes
25991then
25992
25993cat >>confdefs.h <<\_ACEOF
25994#define HAVE_STAT_TV_NSEC2 1
25995_ACEOF
25996
25997fi
25998
Jack Jansen666b1e72001-10-31 12:11:48 +000025999# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026000{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26001echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026002if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026003 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026004else
Martin v. Löwis11437992002-04-12 09:54:03 +000026005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026006/* confdefs.h. */
26007_ACEOF
26008cat confdefs.h >>conftest.$ac_ext
26009cat >>conftest.$ac_ext <<_ACEOF
26010/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026011#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026012int
26013main ()
26014{
Jack Jansen666b1e72001-10-31 12:11:48 +000026015
26016 int rtn;
26017 rtn = mvwdelch(0,0,0);
26018
Martin v. Löwis11437992002-04-12 09:54:03 +000026019 ;
26020 return 0;
26021}
26022_ACEOF
26023rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026024if { (ac_try="$ac_compile"
26025case "(($ac_try" in
26026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26027 *) ac_try_echo=$ac_try;;
26028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026032 grep -v '^ *+' conftest.er1 >conftest.err
26033 rm -f conftest.er1
26034 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026036 (exit $ac_status); } && {
26037 test -z "$ac_c_werror_flag" ||
26038 test ! -s conftest.err
26039 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026040 ac_cv_mvwdelch_is_expression=yes
26041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026043sed 's/^/| /' conftest.$ac_ext >&5
26044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026045 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26049fi
26050
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026051{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26052echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026053
26054if test "$ac_cv_mvwdelch_is_expression" = yes
26055then
Martin v. Löwis11437992002-04-12 09:54:03 +000026056
26057cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026058#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026059_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026060
26061fi
26062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026063{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26064echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026065if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026066 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026067else
Martin v. Löwis11437992002-04-12 09:54:03 +000026068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026069/* confdefs.h. */
26070_ACEOF
26071cat confdefs.h >>conftest.$ac_ext
26072cat >>conftest.$ac_ext <<_ACEOF
26073/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026074#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026075int
26076main ()
26077{
Jack Jansen666b1e72001-10-31 12:11:48 +000026078
26079 WINDOW *w;
26080 w->_flags = 0;
26081
Martin v. Löwis11437992002-04-12 09:54:03 +000026082 ;
26083 return 0;
26084}
26085_ACEOF
26086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026087if { (ac_try="$ac_compile"
26088case "(($ac_try" in
26089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26090 *) ac_try_echo=$ac_try;;
26091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026095 grep -v '^ *+' conftest.er1 >conftest.err
26096 rm -f conftest.er1
26097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026099 (exit $ac_status); } && {
26100 test -z "$ac_c_werror_flag" ||
26101 test ! -s conftest.err
26102 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026103 ac_cv_window_has_flags=yes
26104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026106sed 's/^/| /' conftest.$ac_ext >&5
26107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026108 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26112fi
26113
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026114{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26115echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026116
Jack Jansen666b1e72001-10-31 12:11:48 +000026117
26118if test "$ac_cv_window_has_flags" = yes
26119then
Martin v. Löwis11437992002-04-12 09:54:03 +000026120
26121cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026122#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026123_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026124
26125fi
26126
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026127{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26128echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026129cat >conftest.$ac_ext <<_ACEOF
26130/* confdefs.h. */
26131_ACEOF
26132cat confdefs.h >>conftest.$ac_ext
26133cat >>conftest.$ac_ext <<_ACEOF
26134/* end confdefs.h. */
26135#include <curses.h>
26136int
26137main ()
26138{
26139void *x=is_term_resized
26140 ;
26141 return 0;
26142}
26143_ACEOF
26144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145if { (ac_try="$ac_compile"
26146case "(($ac_try" in
26147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26148 *) ac_try_echo=$ac_try;;
26149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026151 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026152 ac_status=$?
26153 grep -v '^ *+' conftest.er1 >conftest.err
26154 rm -f conftest.er1
26155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026157 (exit $ac_status); } && {
26158 test -z "$ac_c_werror_flag" ||
26159 test ! -s conftest.err
26160 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026161
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026162cat >>confdefs.h <<\_ACEOF
26163#define HAVE_CURSES_IS_TERM_RESIZED 1
26164_ACEOF
26165
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166 { echo "$as_me:$LINENO: result: yes" >&5
26167echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026168else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026169 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026170sed 's/^/| /' conftest.$ac_ext >&5
26171
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026172 { echo "$as_me:$LINENO: result: no" >&5
26173echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026174
26175fi
26176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026179{ echo "$as_me:$LINENO: checking for resize_term" >&5
26180echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026181cat >conftest.$ac_ext <<_ACEOF
26182/* confdefs.h. */
26183_ACEOF
26184cat confdefs.h >>conftest.$ac_ext
26185cat >>conftest.$ac_ext <<_ACEOF
26186/* end confdefs.h. */
26187#include <curses.h>
26188int
26189main ()
26190{
26191void *x=resize_term
26192 ;
26193 return 0;
26194}
26195_ACEOF
26196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026197if { (ac_try="$ac_compile"
26198case "(($ac_try" in
26199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26200 *) ac_try_echo=$ac_try;;
26201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026203 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026204 ac_status=$?
26205 grep -v '^ *+' conftest.er1 >conftest.err
26206 rm -f conftest.er1
26207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209 (exit $ac_status); } && {
26210 test -z "$ac_c_werror_flag" ||
26211 test ! -s conftest.err
26212 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026213
26214cat >>confdefs.h <<\_ACEOF
26215#define HAVE_CURSES_RESIZE_TERM 1
26216_ACEOF
26217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026218 { echo "$as_me:$LINENO: result: yes" >&5
26219echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026221 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026222sed 's/^/| /' conftest.$ac_ext >&5
26223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026224 { echo "$as_me:$LINENO: result: no" >&5
26225echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026226
26227fi
26228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26230
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026231{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26232echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026233cat >conftest.$ac_ext <<_ACEOF
26234/* confdefs.h. */
26235_ACEOF
26236cat confdefs.h >>conftest.$ac_ext
26237cat >>conftest.$ac_ext <<_ACEOF
26238/* end confdefs.h. */
26239#include <curses.h>
26240int
26241main ()
26242{
26243void *x=resizeterm
26244 ;
26245 return 0;
26246}
26247_ACEOF
26248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026249if { (ac_try="$ac_compile"
26250case "(($ac_try" in
26251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26252 *) ac_try_echo=$ac_try;;
26253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026255 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026256 ac_status=$?
26257 grep -v '^ *+' conftest.er1 >conftest.err
26258 rm -f conftest.er1
26259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026261 (exit $ac_status); } && {
26262 test -z "$ac_c_werror_flag" ||
26263 test ! -s conftest.err
26264 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026265
26266cat >>confdefs.h <<\_ACEOF
26267#define HAVE_CURSES_RESIZETERM 1
26268_ACEOF
26269
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270 { echo "$as_me:$LINENO: result: yes" >&5
26271echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026273 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026274sed 's/^/| /' conftest.$ac_ext >&5
26275
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026276 { echo "$as_me:$LINENO: result: no" >&5
26277echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026278
26279fi
26280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26282
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26284echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026285
26286if test -r /dev/ptmx
26287then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026288 { echo "$as_me:$LINENO: result: yes" >&5
26289echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026290
26291cat >>confdefs.h <<\_ACEOF
26292#define HAVE_DEV_PTMX 1
26293_ACEOF
26294
Thomas Wouters89f507f2006-12-13 04:49:30 +000026295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026296 { echo "$as_me:$LINENO: result: no" >&5
26297echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026298fi
26299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026300{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26301echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026302
26303if test -r /dev/ptc
26304then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026305 { echo "$as_me:$LINENO: result: yes" >&5
26306echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026307
26308cat >>confdefs.h <<\_ACEOF
26309#define HAVE_DEV_PTC 1
26310_ACEOF
26311
Thomas Wouters89f507f2006-12-13 04:49:30 +000026312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026313 { echo "$as_me:$LINENO: result: no" >&5
26314echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026315fi
26316
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026317if test "$have_long_long" = yes
26318then
26319 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26320echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26321 if test "${ac_cv_have_long_long_format+set}" = set; then
26322 echo $ECHO_N "(cached) $ECHO_C" >&6
26323else
26324 if test "$cross_compiling" = yes; then
26325 ac_cv_have_long_long_format=no
26326else
26327 cat >conftest.$ac_ext <<_ACEOF
26328/* confdefs.h. */
26329_ACEOF
26330cat confdefs.h >>conftest.$ac_ext
26331cat >>conftest.$ac_ext <<_ACEOF
26332/* end confdefs.h. */
26333
26334 #include <stdio.h>
26335 #include <stddef.h>
26336 #include <string.h>
26337
26338 #ifdef HAVE_SYS_TYPES_H
26339 #include <sys/types.h>
26340 #endif
26341
26342 int main()
26343 {
26344 char buffer[256];
26345
26346 if (sprintf(buffer, "%lld", (long long)123) < 0)
26347 return 1;
26348 if (strcmp(buffer, "123"))
26349 return 1;
26350
26351 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26352 return 1;
26353 if (strcmp(buffer, "-123"))
26354 return 1;
26355
26356 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26357 return 1;
26358 if (strcmp(buffer, "123"))
26359 return 1;
26360
26361 return 0;
26362 }
26363
26364_ACEOF
26365rm -f conftest$ac_exeext
26366if { (ac_try="$ac_link"
26367case "(($ac_try" in
26368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26369 *) ac_try_echo=$ac_try;;
26370esac
26371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26372 (eval "$ac_link") 2>&5
26373 ac_status=$?
26374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26375 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26376 { (case "(($ac_try" in
26377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26378 *) ac_try_echo=$ac_try;;
26379esac
26380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26381 (eval "$ac_try") 2>&5
26382 ac_status=$?
26383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26384 (exit $ac_status); }; }; then
26385 ac_cv_have_long_long_format=yes
26386else
26387 echo "$as_me: program exited with status $ac_status" >&5
26388echo "$as_me: failed program was:" >&5
26389sed 's/^/| /' conftest.$ac_ext >&5
26390
26391( exit $ac_status )
26392ac_cv_have_long_long_format=no
26393fi
26394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26395fi
26396
26397
26398
26399fi
26400
26401 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26402echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26403fi
26404
26405if test $ac_cv_have_long_long_format = yes
26406then
26407
26408cat >>confdefs.h <<\_ACEOF
26409#define PY_FORMAT_LONG_LONG "ll"
26410_ACEOF
26411
26412fi
26413
26414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026415{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26416echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026417if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026418 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026419else
26420 if test "$cross_compiling" = yes; then
26421 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026422else
26423 cat >conftest.$ac_ext <<_ACEOF
26424/* confdefs.h. */
26425_ACEOF
26426cat confdefs.h >>conftest.$ac_ext
26427cat >>conftest.$ac_ext <<_ACEOF
26428/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026429
Thomas Wouters477c8d52006-05-27 19:21:47 +000026430#include <stdio.h>
26431#include <stddef.h>
26432#include <string.h>
26433
Christian Heimes2c181612007-12-17 20:04:13 +000026434#ifdef HAVE_SYS_TYPES_H
26435#include <sys/types.h>
26436#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026437
26438#ifdef HAVE_SSIZE_T
26439typedef ssize_t Py_ssize_t;
26440#elif SIZEOF_VOID_P == SIZEOF_LONG
26441typedef long Py_ssize_t;
26442#else
26443typedef int Py_ssize_t;
26444#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026445
Christian Heimes2c181612007-12-17 20:04:13 +000026446int main()
26447{
26448 char buffer[256];
26449
Thomas Wouters477c8d52006-05-27 19:21:47 +000026450 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26451 return 1;
26452
Thomas Wouters89f507f2006-12-13 04:49:30 +000026453 if (strcmp(buffer, "123"))
26454 return 1;
26455
26456 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26457 return 1;
26458
26459 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026460 return 1;
26461
26462 return 0;
26463}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026464
Thomas Wouters477c8d52006-05-27 19:21:47 +000026465_ACEOF
26466rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026467if { (ac_try="$ac_link"
26468case "(($ac_try" in
26469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26470 *) ac_try_echo=$ac_try;;
26471esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026473 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026474 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026477 { (case "(($ac_try" in
26478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26479 *) ac_try_echo=$ac_try;;
26480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026482 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026483 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026485 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026486 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026488 echo "$as_me: program exited with status $ac_status" >&5
26489echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026490sed 's/^/| /' conftest.$ac_ext >&5
26491
26492( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026493ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026494fi
26495rm -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 +000026496fi
26497
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026498
26499
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026500fi
26501
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026502{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26503echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026504if test $ac_cv_have_size_t_format = yes
26505then
26506
26507cat >>confdefs.h <<\_ACEOF
26508#define PY_FORMAT_SIZE_T "z"
26509_ACEOF
26510
26511fi
26512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026513{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26514echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026515if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026517else
Martin v. Löwis11437992002-04-12 09:54:03 +000026518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026519/* confdefs.h. */
26520_ACEOF
26521cat confdefs.h >>conftest.$ac_ext
26522cat >>conftest.$ac_ext <<_ACEOF
26523/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026524
26525#ifdef HAVE_SYS_TYPES_H
26526#include <sys/types.h>
26527#endif
26528#ifdef HAVE_SYS_SOCKET_H
26529#include <sys/socket.h>
26530#endif
26531
26532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026534int
26535main ()
26536{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026537if ((ac__type_new_ *) 0)
26538 return 0;
26539if (sizeof (ac__type_new_))
26540 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026541 ;
26542 return 0;
26543}
26544_ACEOF
26545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026546if { (ac_try="$ac_compile"
26547case "(($ac_try" in
26548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26549 *) ac_try_echo=$ac_try;;
26550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026554 grep -v '^ *+' conftest.er1 >conftest.err
26555 rm -f conftest.er1
26556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026558 (exit $ac_status); } && {
26559 test -z "$ac_c_werror_flag" ||
26560 test ! -s conftest.err
26561 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026565sed 's/^/| /' conftest.$ac_ext >&5
26566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026567 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569
26570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026572{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26573echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26574if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026575 :
26576else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026577
Martin v. Löwis01c04012002-11-11 14:58:44 +000026578cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026579#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026580_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026581
26582fi
26583
Michael W. Hudson54241132001-12-07 15:38:26 +000026584
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026585{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26586echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026587if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026588 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026589else
26590 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026591 ac_cv_broken_mbstowcs=no
26592else
26593 cat >conftest.$ac_ext <<_ACEOF
26594/* confdefs.h. */
26595_ACEOF
26596cat confdefs.h >>conftest.$ac_ext
26597cat >>conftest.$ac_ext <<_ACEOF
26598/* end confdefs.h. */
26599
26600#include<stdlib.h>
26601int main() {
26602 size_t len = -1;
26603 const char *str = "text";
26604 len = mbstowcs(NULL, str, 0);
26605 return (len != 4);
26606}
26607
26608_ACEOF
26609rm -f conftest$ac_exeext
26610if { (ac_try="$ac_link"
26611case "(($ac_try" in
26612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26613 *) ac_try_echo=$ac_try;;
26614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026616 (eval "$ac_link") 2>&5
26617 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26620 { (case "(($ac_try" in
26621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26622 *) ac_try_echo=$ac_try;;
26623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026625 (eval "$ac_try") 2>&5
26626 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026628 (exit $ac_status); }; }; then
26629 ac_cv_broken_mbstowcs=no
26630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026631 echo "$as_me: program exited with status $ac_status" >&5
26632echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026633sed 's/^/| /' conftest.$ac_ext >&5
26634
26635( exit $ac_status )
26636ac_cv_broken_mbstowcs=yes
26637fi
26638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26639fi
26640
26641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026642fi
26643
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026644{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26645echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026646if test "$ac_cv_broken_mbstowcs" = yes
26647then
26648
26649cat >>confdefs.h <<\_ACEOF
26650#define HAVE_BROKEN_MBSTOWCS 1
26651_ACEOF
26652
26653fi
26654
Antoine Pitroub52ec782009-01-25 16:34:23 +000026655# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026656{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26657echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026658
26659# Check whether --with-computed-gotos was given.
26660if test "${with_computed_gotos+set}" = set; then
26661 withval=$with_computed_gotos;
26662if test "$withval" != no
26663then
26664
26665cat >>confdefs.h <<\_ACEOF
26666#define USE_COMPUTED_GOTOS 1
26667_ACEOF
26668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026669 { echo "$as_me:$LINENO: result: yes" >&5
26670echo "${ECHO_T}yes" >&6; }
26671else { echo "$as_me:$LINENO: result: no" >&5
26672echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026673fi
26674else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026675 { echo "$as_me:$LINENO: result: no" >&5
26676echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026677fi
26678
26679
26680
Michael W. Hudson54241132001-12-07 15:38:26 +000026681
26682
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026683for h in `(cd $srcdir;echo Python/thread_*.h)`
26684do
26685 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26686done
26687
Michael W. Hudson54241132001-12-07 15:38:26 +000026688
Neal Norwitzd24499d2005-12-18 21:36:39 +000026689SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026690{ echo "$as_me:$LINENO: checking for build directories" >&5
26691echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026692for dir in $SRCDIRS; do
26693 if test ! -d $dir; then
26694 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026695 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026696done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026697{ echo "$as_me:$LINENO: result: done" >&5
26698echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026699
Guido van Rossum627b2d71993-12-24 10:39:16 +000026700# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026701ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026702
Martin v. Löwis11437992002-04-12 09:54:03 +000026703cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026704# This file is a shell script that caches the results of configure
26705# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026706# scripts and configure runs, see configure's option --config-cache.
26707# It is not useful on other systems. If it contains results you don't
26708# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026709#
Martin v. Löwis11437992002-04-12 09:54:03 +000026710# config.status only pays attention to the cache file if you give it
26711# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026712#
Skip Montanaro6dead952003-09-25 14:50:04 +000026713# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026714# loading this file, other *unset* `ac_cv_foo' will be assigned the
26715# following values.
26716
26717_ACEOF
26718
Guido van Rossumf78abae1997-01-21 22:02:36 +000026719# The following way of writing the cache mishandles newlines in values,
26720# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026721# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026722# Ultrix sh set writes to stderr and can't be redirected directly,
26723# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026724(
26725 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26726 eval ac_val=\$$ac_var
26727 case $ac_val in #(
26728 *${as_nl}*)
26729 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026730 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26731echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026732 esac
26733 case $ac_var in #(
26734 _ | IFS | as_nl) ;; #(
26735 *) $as_unset $ac_var ;;
26736 esac ;;
26737 esac
26738 done
26739
Martin v. Löwis11437992002-04-12 09:54:03 +000026740 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026741 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26742 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026743 # `set' does not quote correctly, so add quotes (double-quote
26744 # substitution turns \\\\ into \\, and sed turns \\ into \).
26745 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026746 "s/'/'\\\\''/g;
26747 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026748 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026749 *)
26750 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026751 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026752 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026753 esac |
26754 sort
26755) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026756 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026757 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026758 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026759 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026760 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26761 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026762 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26763 :end' >>confcache
26764if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26765 if test -w "$cache_file"; then
26766 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026767 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26768echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026769 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026770 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026771 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26772echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026773 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026774fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026775rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026777test "x$prefix" = xNONE && prefix=$ac_default_prefix
26778# Let make expand exec_prefix.
26779test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026781DEFS=-DHAVE_CONFIG_H
26782
Skip Montanaro6dead952003-09-25 14:50:04 +000026783ac_libobjs=
26784ac_ltlibobjs=
26785for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26786 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026787 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026788 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026789 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26790 # will be set to the directory where LIBOBJS objects are built.
26791 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26792 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026793done
26794LIBOBJS=$ac_libobjs
26795
26796LTLIBOBJS=$ac_ltlibobjs
26797
26798
Martin v. Löwis11437992002-04-12 09:54:03 +000026799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026800: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026801ac_clean_files_save=$ac_clean_files
26802ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026803{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26804echo "$as_me: creating $CONFIG_STATUS" >&6;}
26805cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026806#! $SHELL
26807# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026808# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026809# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026810# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026811
Martin v. Löwis11437992002-04-12 09:54:03 +000026812debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026813ac_cs_recheck=false
26814ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026815SHELL=\${CONFIG_SHELL-$SHELL}
26816_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026818cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026819## --------------------- ##
26820## M4sh Initialization. ##
26821## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823# Be more Bourne compatible
26824DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026825if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26826 emulate sh
26827 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026828 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026829 # is contrary to our usage. Disable this feature.
26830 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026831 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026832else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026833 case `(set -o) 2>/dev/null` in
26834 *posix*) set -o posix ;;
26835esac
26836
Michael W. Hudson54241132001-12-07 15:38:26 +000026837fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026838
26839
Michael W. Hudson54241132001-12-07 15:38:26 +000026840
Michael W. Hudson54241132001-12-07 15:38:26 +000026841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026842# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026843# Avoid depending upon Character Ranges.
26844as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26845as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26846as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26847as_cr_digits='0123456789'
26848as_cr_alnum=$as_cr_Letters$as_cr_digits
26849
26850# The user is always right.
26851if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026852 echo "#! /bin/sh" >conf$$.sh
26853 echo "exit 0" >>conf$$.sh
26854 chmod +x conf$$.sh
26855 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26856 PATH_SEPARATOR=';'
26857 else
26858 PATH_SEPARATOR=:
26859 fi
26860 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026861fi
26862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026863# Support unset when possible.
26864if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26865 as_unset=unset
26866else
26867 as_unset=false
26868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026870
26871# IFS
26872# We need space, tab and new line, in precisely that order. Quoting is
26873# there to prevent editors from complaining about space-tab.
26874# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26875# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026876as_nl='
26877'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878IFS=" "" $as_nl"
26879
26880# Find who we are. Look in the path if we contain no directory separator.
26881case $0 in
26882 *[\\/]* ) as_myself=$0 ;;
26883 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026884for as_dir in $PATH
26885do
26886 IFS=$as_save_IFS
26887 test -z "$as_dir" && as_dir=.
26888 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26889done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026890IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026892 ;;
26893esac
26894# We did not find ourselves, most probably we were run as `sh COMMAND'
26895# in which case we are not to be found in the path.
26896if test "x$as_myself" = x; then
26897 as_myself=$0
26898fi
26899if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026900 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026901 { (exit 1); exit 1; }
26902fi
26903
26904# Work around bugs in pre-3.0 UWIN ksh.
26905for as_var in ENV MAIL MAILPATH
26906do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26907done
26908PS1='$ '
26909PS2='> '
26910PS4='+ '
26911
26912# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026913for as_var in \
26914 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26915 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26916 LC_TELEPHONE LC_TIME
26917do
26918 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26919 eval $as_var=C; export $as_var
26920 else
26921 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26922 fi
26923done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026924
26925# Required to use basename.
26926if expr a : '\(a\)' >/dev/null 2>&1 &&
26927 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26928 as_expr=expr
26929else
26930 as_expr=false
26931fi
26932
26933if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26934 as_basename=basename
26935else
26936 as_basename=false
26937fi
26938
26939
26940# Name of the executable.
26941as_me=`$as_basename -- "$0" ||
26942$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26943 X"$0" : 'X\(//\)$' \| \
26944 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026945echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026946 sed '/^.*\/\([^/][^/]*\)\/*$/{
26947 s//\1/
26948 q
26949 }
26950 /^X\/\(\/\/\)$/{
26951 s//\1/
26952 q
26953 }
26954 /^X\/\(\/\).*/{
26955 s//\1/
26956 q
26957 }
26958 s/.*/./; q'`
26959
26960# CDPATH.
26961$as_unset CDPATH
26962
26963
26964
Martin v. Löwis11437992002-04-12 09:54:03 +000026965 as_lineno_1=$LINENO
26966 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026967 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026968 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026969
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26971 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026972 # line-number line after each line using $LINENO; the second 'sed'
26973 # does the real work. The second script uses 'N' to pair each
26974 # line-number line with the line containing $LINENO, and appends
26975 # trailing '-' during substitution so that $LINENO is not a special
26976 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026977 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026978 # scripts with optimization help from Paolo Bonzini. Blame Lee
26979 # E. McMahon (1931-1989) for sed's syntax. :-)
26980 sed -n '
26981 p
26982 /[$]LINENO/=
26983 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026984 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026985 s/[$]LINENO.*/&-/
26986 t lineno
26987 b
26988 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026989 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026990 :loop
26991 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026992 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026993 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026994 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026995 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026996 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026997 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026998
Martin v. Löwis11437992002-04-12 09:54:03 +000026999 # Don't try to exec as it changes $[0], causing all sort of problems
27000 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027001 # original and so on. Autoconf is especially sensitive to this).
27002 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027003 # Exit status is that of the last command.
27004 exit
27005}
27006
27007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027008if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27009 as_dirname=dirname
27010else
27011 as_dirname=false
27012fi
27013
27014ECHO_C= ECHO_N= ECHO_T=
27015case `echo -n x` in
27016-n*)
27017 case `echo 'x\c'` in
27018 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27019 *) ECHO_C='\c';;
27020 esac;;
27021*)
27022 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027023esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027025if expr a : '\(a\)' >/dev/null 2>&1 &&
27026 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027027 as_expr=expr
27028else
27029 as_expr=false
27030fi
27031
27032rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027033if test -d conf$$.dir; then
27034 rm -f conf$$.dir/conf$$.file
27035else
27036 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027038fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027039echo >conf$$.file
27040if ln -s conf$$.file conf$$ 2>/dev/null; then
27041 as_ln_s='ln -s'
27042 # ... but there are two gotchas:
27043 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27044 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27045 # In both cases, we have to default to `cp -p'.
27046 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027047 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027048elif ln conf$$.file conf$$ 2>/dev/null; then
27049 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027050else
27051 as_ln_s='cp -p'
27052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027053rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27054rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027055
Skip Montanaro6dead952003-09-25 14:50:04 +000027056if mkdir -p . 2>/dev/null; then
27057 as_mkdir_p=:
27058else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027059 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027060 as_mkdir_p=false
27061fi
27062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027063if test -x / >/dev/null 2>&1; then
27064 as_test_x='test -x'
27065else
27066 if ls -dL / >/dev/null 2>&1; then
27067 as_ls_L_option=L
27068 else
27069 as_ls_L_option=
27070 fi
27071 as_test_x='
27072 eval sh -c '\''
27073 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027074 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027075 else
27076 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027077 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027078 esac;
27079 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27080 ???[sx]*):;;*)false;;esac;fi
27081 '\'' sh
27082 '
27083fi
27084as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027085
27086# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027087as_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 +000027088
27089# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027091
27092
Martin v. Löwis11437992002-04-12 09:54:03 +000027093exec 6>&1
27094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027095# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027096# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027097# values after options handling.
27098ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027099This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027100generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027101
27102 CONFIG_FILES = $CONFIG_FILES
27103 CONFIG_HEADERS = $CONFIG_HEADERS
27104 CONFIG_LINKS = $CONFIG_LINKS
27105 CONFIG_COMMANDS = $CONFIG_COMMANDS
27106 $ $0 $@
27107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027108on `(hostname || uname -n) 2>/dev/null | sed 1q`
27109"
27110
Martin v. Löwis11437992002-04-12 09:54:03 +000027111_ACEOF
27112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027113cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027114# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027115config_files="$ac_config_files"
27116config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027118_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027119
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027120cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027121ac_cs_usage="\
27122\`$as_me' instantiates files from templates according to the
27123current configuration.
27124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027125Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027126
27127 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027128 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027129 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027130 -d, --debug don't remove temporary files
27131 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027132 --file=FILE[:TEMPLATE]
27133 instantiate the configuration file FILE
27134 --header=FILE[:TEMPLATE]
27135 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027136
27137Configuration files:
27138$config_files
27139
27140Configuration headers:
27141$config_headers
27142
27143Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027145_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027146cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027147ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027148python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027149configured by $0, generated by GNU Autoconf 2.61,
27150 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027152Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027153This config.status script is free software; the Free Software Foundation
27154gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027155
27156ac_pwd='$ac_pwd'
27157srcdir='$srcdir'
27158INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027159_ACEOF
27160
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027161cat >>$CONFIG_STATUS <<\_ACEOF
27162# If no file are specified by the user, then we need to provide default
27163# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027164ac_need_defaults=:
27165while test $# != 0
27166do
27167 case $1 in
27168 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027169 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27170 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027171 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027172 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027173 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027174 ac_option=$1
27175 ac_optarg=$2
27176 ac_shift=shift
27177 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027178 esac
27179
Skip Montanaro6dead952003-09-25 14:50:04 +000027180 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027181 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027182 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27183 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027184 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027185 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027186 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027187 debug=: ;;
27188 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027189 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027190 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027191 ac_need_defaults=false;;
27192 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027193 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027195 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027196 --he | --h)
27197 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027198 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027199Try \`$0 --help' for more information." >&2
27200 { (exit 1); exit 1; }; };;
27201 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027202 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027203 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27204 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27205 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027206
27207 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027208 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027209Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027210 { (exit 1); exit 1; }; } ;;
27211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027212 *) ac_config_targets="$ac_config_targets $1"
27213 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027214
27215 esac
27216 shift
27217done
27218
Skip Montanaro6dead952003-09-25 14:50:04 +000027219ac_configure_extra_args=
27220
27221if $ac_cs_silent; then
27222 exec 6>/dev/null
27223 ac_configure_extra_args="$ac_configure_extra_args --silent"
27224fi
27225
27226_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027227cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027228if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027229 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27230 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027231 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027232 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027233fi
27234
Martin v. Löwis11437992002-04-12 09:54:03 +000027235_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027236cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027237exec 5>>config.log
27238{
27239 echo
27240 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27241## Running $as_me. ##
27242_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027243 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027244} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027246_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027247cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027248_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027249
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027250cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027251
27252# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027253for ac_config_target in $ac_config_targets
27254do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255 case $ac_config_target in
27256 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27257 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27258 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027259 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27260 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027261 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27262 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027263 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027264
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027265 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27266echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027267 { (exit 1); exit 1; }; };;
27268 esac
27269done
27270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027271
Martin v. Löwis11437992002-04-12 09:54:03 +000027272# If the user did not use the arguments to specify the items to instantiate,
27273# then the envvar interface is used. Set only those that are not.
27274# We use the long form for the default assignment because of an extremely
27275# bizarre bug on SunOS 4.1.3.
27276if $ac_need_defaults; then
27277 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27278 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27279fi
27280
Skip Montanaro6dead952003-09-25 14:50:04 +000027281# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027282# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027283# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027284# Hook for its removal unless debugging.
27285# Note that there is a small window in which the directory will not be cleaned:
27286# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027287$debug ||
27288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027289 tmp=
27290 trap 'exit_status=$?
27291 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27292' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027293 trap '{ (exit 1); exit 1; }' 1 2 13 15
27294}
Martin v. Löwis11437992002-04-12 09:54:03 +000027295# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027296
Martin v. Löwis11437992002-04-12 09:54:03 +000027297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027298 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027299 test -n "$tmp" && test -d "$tmp"
27300} ||
27301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027302 tmp=./conf$$-$RANDOM
27303 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027304} ||
27305{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027306 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027307 { (exit 1); exit 1; }
27308}
27309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027310#
27311# Set up the sed scripts for CONFIG_FILES section.
27312#
27313
27314# No need to generate the scripts if there are no CONFIG_FILES.
27315# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027316if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027317
27318_ACEOF
27319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027322ac_delim='%!_!# '
27323for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027324 cat >conf$$subs.sed <<_ACEOF
27325SHELL!$SHELL$ac_delim
27326PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27327PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27328PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27329PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27330PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27331PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27332exec_prefix!$exec_prefix$ac_delim
27333prefix!$prefix$ac_delim
27334program_transform_name!$program_transform_name$ac_delim
27335bindir!$bindir$ac_delim
27336sbindir!$sbindir$ac_delim
27337libexecdir!$libexecdir$ac_delim
27338datarootdir!$datarootdir$ac_delim
27339datadir!$datadir$ac_delim
27340sysconfdir!$sysconfdir$ac_delim
27341sharedstatedir!$sharedstatedir$ac_delim
27342localstatedir!$localstatedir$ac_delim
27343includedir!$includedir$ac_delim
27344oldincludedir!$oldincludedir$ac_delim
27345docdir!$docdir$ac_delim
27346infodir!$infodir$ac_delim
27347htmldir!$htmldir$ac_delim
27348dvidir!$dvidir$ac_delim
27349pdfdir!$pdfdir$ac_delim
27350psdir!$psdir$ac_delim
27351libdir!$libdir$ac_delim
27352localedir!$localedir$ac_delim
27353mandir!$mandir$ac_delim
27354DEFS!$DEFS$ac_delim
27355ECHO_C!$ECHO_C$ac_delim
27356ECHO_N!$ECHO_N$ac_delim
27357ECHO_T!$ECHO_T$ac_delim
27358LIBS!$LIBS$ac_delim
27359build_alias!$build_alias$ac_delim
27360host_alias!$host_alias$ac_delim
27361target_alias!$target_alias$ac_delim
27362VERSION!$VERSION$ac_delim
27363SOVERSION!$SOVERSION$ac_delim
27364CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27365UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27366ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27367PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27368PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27369PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27370PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27371PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27372FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27373FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27374FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27375FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27376FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27377MACHDEP!$MACHDEP$ac_delim
27378SGI_ABI!$SGI_ABI$ac_delim
27379CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27380EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27381CC!$CC$ac_delim
27382CFLAGS!$CFLAGS$ac_delim
27383LDFLAGS!$LDFLAGS$ac_delim
27384CPPFLAGS!$CPPFLAGS$ac_delim
27385ac_ct_CC!$ac_ct_CC$ac_delim
27386EXEEXT!$EXEEXT$ac_delim
27387OBJEXT!$OBJEXT$ac_delim
27388CXX!$CXX$ac_delim
27389MAINCC!$MAINCC$ac_delim
27390CPP!$CPP$ac_delim
27391GREP!$GREP$ac_delim
27392EGREP!$EGREP$ac_delim
27393BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27394LIBRARY!$LIBRARY$ac_delim
27395LDLIBRARY!$LDLIBRARY$ac_delim
27396DLLLIBRARY!$DLLLIBRARY$ac_delim
27397BLDLIBRARY!$BLDLIBRARY$ac_delim
27398LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27399INSTSONAME!$INSTSONAME$ac_delim
27400RUNSHARED!$RUNSHARED$ac_delim
27401LINKCC!$LINKCC$ac_delim
27402GNULD!$GNULD$ac_delim
27403RANLIB!$RANLIB$ac_delim
27404AR!$AR$ac_delim
27405ARFLAGS!$ARFLAGS$ac_delim
27406SVNVERSION!$SVNVERSION$ac_delim
27407INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27408INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27409INSTALL_DATA!$INSTALL_DATA$ac_delim
27410LN!$LN$ac_delim
27411OPT!$OPT$ac_delim
27412BASECFLAGS!$BASECFLAGS$ac_delim
27413UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27414OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27415LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27416SO!$SO$ac_delim
27417LDSHARED!$LDSHARED$ac_delim
27418BLDSHARED!$BLDSHARED$ac_delim
27419CCSHARED!$CCSHARED$ac_delim
27420LINKFORSHARED!$LINKFORSHARED$ac_delim
27421CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27422_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027424 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027425 break
27426 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027427 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27428echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027429 { (exit 1); exit 1; }; }
27430 else
27431 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027432 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027433done
27434
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027435ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27436if test -n "$ac_eof"; then
27437 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27438 ac_eof=`expr $ac_eof + 1`
27439fi
27440
27441cat >>$CONFIG_STATUS <<_ACEOF
27442cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27443/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027444_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027445sed '
27446s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27447s/^/s,@/; s/!/@,|#_!!_#|/
27448:n
27449t n
27450s/'"$ac_delim"'$/,g/; t
27451s/$/\\/; p
27452N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27453' >>$CONFIG_STATUS <conf$$subs.sed
27454rm -f conf$$subs.sed
27455cat >>$CONFIG_STATUS <<_ACEOF
27456CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027457_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027458
27459
27460ac_delim='%!_!# '
27461for ac_last_try in false false false false false :; do
27462 cat >conf$$subs.sed <<_ACEOF
27463SHLIBS!$SHLIBS$ac_delim
27464USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27465SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27466USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27467LDLAST!$LDLAST$ac_delim
27468THREADOBJ!$THREADOBJ$ac_delim
27469DLINCLDIR!$DLINCLDIR$ac_delim
27470DYNLOADFILE!$DYNLOADFILE$ac_delim
27471MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27472TRUE!$TRUE$ac_delim
27473LIBOBJS!$LIBOBJS$ac_delim
27474HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27475HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27476HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27477HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27478HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27479LIBM!$LIBM$ac_delim
27480LIBC!$LIBC$ac_delim
27481THREADHEADERS!$THREADHEADERS$ac_delim
27482SRCDIRS!$SRCDIRS$ac_delim
27483LTLIBOBJS!$LTLIBOBJS$ac_delim
27484_ACEOF
27485
27486 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27487 break
27488 elif $ac_last_try; then
27489 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27490echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027491 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027492 else
27493 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27494 fi
27495done
27496
27497ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27498if test -n "$ac_eof"; then
27499 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27500 ac_eof=`expr $ac_eof + 1`
27501fi
27502
27503cat >>$CONFIG_STATUS <<_ACEOF
27504cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27505/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027506_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027507sed '
27508s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27509s/^/s,@/; s/!/@,|#_!!_#|/
27510:n
27511t n
27512s/'"$ac_delim"'$/,g/; t
27513s/$/\\/; p
27514N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27515' >>$CONFIG_STATUS <conf$$subs.sed
27516rm -f conf$$subs.sed
27517cat >>$CONFIG_STATUS <<_ACEOF
27518:end
27519s/|#_!!_#|//g
27520CEOF$ac_eof
27521_ACEOF
27522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027523
27524# VPATH may cause trouble with some makes, so we remove $(srcdir),
27525# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27526# trailing colons and then remove the whole line if VPATH becomes empty
27527# (actually we leave an empty line to preserve line numbers).
27528if test "x$srcdir" = x.; then
27529 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27530s/:*\$(srcdir):*/:/
27531s/:*\${srcdir}:*/:/
27532s/:*@srcdir@:*/:/
27533s/^\([^=]*=[ ]*\):*/\1/
27534s/:*$//
27535s/^[^=]*=[ ]*$//
27536}'
27537fi
27538
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027539cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027540fi # test -n "$CONFIG_FILES"
27541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027543for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027544do
27545 case $ac_tag in
27546 :[FHLC]) ac_mode=$ac_tag; continue;;
27547 esac
27548 case $ac_mode$ac_tag in
27549 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027550 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27551echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027552 { (exit 1); exit 1; }; };;
27553 :[FH]-) ac_tag=-:-;;
27554 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27555 esac
27556 ac_save_IFS=$IFS
27557 IFS=:
27558 set x $ac_tag
27559 IFS=$ac_save_IFS
27560 shift
27561 ac_file=$1
27562 shift
27563
27564 case $ac_mode in
27565 :L) ac_source=$1;;
27566 :[FH])
27567 ac_file_inputs=
27568 for ac_f
27569 do
27570 case $ac_f in
27571 -) ac_f="$tmp/stdin";;
27572 *) # Look for the file first in the build tree, then in the source tree
27573 # (if the path is not absolute). The absolute path cannot be DOS-style,
27574 # because $ac_f cannot contain `:'.
27575 test -f "$ac_f" ||
27576 case $ac_f in
27577 [\\/$]*) false;;
27578 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27579 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027580 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27581echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582 { (exit 1); exit 1; }; };;
27583 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027584 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027585 done
27586
27587 # Let's still pretend it is `configure' which instantiates (i.e., don't
27588 # use $as_me), people would be surprised to read:
27589 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027590 configure_input="Generated from "`IFS=:
27591 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592 if test x"$ac_file" != x-; then
27593 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027594 { echo "$as_me:$LINENO: creating $ac_file" >&5
27595echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027596 fi
27597
27598 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027599 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027600 esac
27601 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027602 esac
27603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027604 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027605$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027606 X"$ac_file" : 'X\(//\)[^/]' \| \
27607 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027608 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027609echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027610 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27611 s//\1/
27612 q
27613 }
27614 /^X\(\/\/\)[^/].*/{
27615 s//\1/
27616 q
27617 }
27618 /^X\(\/\/\)$/{
27619 s//\1/
27620 q
27621 }
27622 /^X\(\/\).*/{
27623 s//\1/
27624 q
27625 }
27626 s/.*/./; q'`
27627 { as_dir="$ac_dir"
27628 case $as_dir in #(
27629 -*) as_dir=./$as_dir;;
27630 esac
27631 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027632 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027633 while :; do
27634 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027635 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027636 *) as_qdir=$as_dir;;
27637 esac
27638 as_dirs="'$as_qdir' $as_dirs"
27639 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027640$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027641 X"$as_dir" : 'X\(//\)[^/]' \| \
27642 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027643 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027644echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027645 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27646 s//\1/
27647 q
27648 }
27649 /^X\(\/\/\)[^/].*/{
27650 s//\1/
27651 q
27652 }
27653 /^X\(\/\/\)$/{
27654 s//\1/
27655 q
27656 }
27657 /^X\(\/\).*/{
27658 s//\1/
27659 q
27660 }
27661 s/.*/./; q'`
27662 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027663 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027664 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027665 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27666echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027667 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027668 ac_builddir=.
27669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027670case "$ac_dir" in
27671.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27672*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027673 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027674 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027675 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027676 case $ac_top_builddir_sub in
27677 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27678 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27679 esac ;;
27680esac
27681ac_abs_top_builddir=$ac_pwd
27682ac_abs_builddir=$ac_pwd$ac_dir_suffix
27683# for backward compatibility:
27684ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027685
27686case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027687 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027688 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027689 ac_top_srcdir=$ac_top_builddir_sub
27690 ac_abs_top_srcdir=$ac_pwd ;;
27691 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027692 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027693 ac_top_srcdir=$srcdir
27694 ac_abs_top_srcdir=$srcdir ;;
27695 *) # Relative name.
27696 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27697 ac_top_srcdir=$ac_top_build_prefix$srcdir
27698 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027699esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027701
Martin v. Löwis11437992002-04-12 09:54:03 +000027702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703 case $ac_mode in
27704 :F)
27705 #
27706 # CONFIG_FILE
27707 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027708
27709 case $INSTALL in
27710 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027711 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027712 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027713_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027714
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027715cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027716# If the template does not know about datarootdir, expand it.
27717# FIXME: This hack should be removed a few years after 2.60.
27718ac_datarootdir_hack=; ac_datarootdir_seen=
27719
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027720case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027721 p
27722 q
27723}
27724/@datadir@/p
27725/@docdir@/p
27726/@infodir@/p
27727/@localedir@/p
27728/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027729' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027730*datarootdir*) ac_datarootdir_seen=yes;;
27731*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027732 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27733echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027734_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027735cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027736 ac_datarootdir_hack='
27737 s&@datadir@&$datadir&g
27738 s&@docdir@&$docdir&g
27739 s&@infodir@&$infodir&g
27740 s&@localedir@&$localedir&g
27741 s&@mandir@&$mandir&g
27742 s&\\\${datarootdir}&$datarootdir&g' ;;
27743esac
27744_ACEOF
27745
27746# Neutralize VPATH when `$srcdir' = `.'.
27747# Shell code in configure.ac might set extrasub.
27748# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749cat >>$CONFIG_STATUS <<_ACEOF
27750 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027751$extrasub
27752_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027753cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027754:t
27755/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027756s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027757s&@top_builddir@&$ac_top_builddir_sub&;t t
27758s&@srcdir@&$ac_srcdir&;t t
27759s&@abs_srcdir@&$ac_abs_srcdir&;t t
27760s&@top_srcdir@&$ac_top_srcdir&;t t
27761s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27762s&@builddir@&$ac_builddir&;t t
27763s&@abs_builddir@&$ac_abs_builddir&;t t
27764s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27765s&@INSTALL@&$ac_INSTALL&;t t
27766$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027767" $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 +000027768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27770 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27771 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027772 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027773which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027774echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027775which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027777 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027778 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027779 -) cat "$tmp/out"; rm -f "$tmp/out";;
27780 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27781 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027782 ;;
27783 :H)
27784 #
27785 # CONFIG_HEADER
27786 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027787_ACEOF
27788
27789# Transform confdefs.h into a sed script `conftest.defines', that
27790# substitutes the proper values into config.h.in to produce config.h.
27791rm -f conftest.defines conftest.tail
27792# First, append a space to every undef/define line, to ease matching.
27793echo 's/$/ /' >conftest.defines
27794# Then, protect against being on the right side of a sed subst, or in
27795# an unquoted here document, in config.status. If some macros were
27796# called several times there might be several #defines for the same
27797# symbol, which is useless. But do not sort them, since the last
27798# AC_DEFINE must be honored.
27799ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27800# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27801# NAME is the cpp macro being defined, VALUE is the value it is being given.
27802# PARAMS is the parameter list in the macro definition--in most cases, it's
27803# just an empty string.
27804ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27805ac_dB='\\)[ (].*,\\1define\\2'
27806ac_dC=' '
27807ac_dD=' ,'
27808
27809uniq confdefs.h |
27810 sed -n '
27811 t rset
27812 :rset
27813 s/^[ ]*#[ ]*define[ ][ ]*//
27814 t ok
27815 d
27816 :ok
27817 s/[\\&,]/\\&/g
27818 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27819 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27820 ' >>conftest.defines
27821
27822# Remove the space that was appended to ease matching.
27823# Then replace #undef with comments. This is necessary, for
27824# example, in the case of _POSIX_SOURCE, which is predefined and required
27825# on some systems where configure will not decide to define it.
27826# (The regexp can be short, since the line contains either #define or #undef.)
27827echo 's/ $//
27828s,^[ #]*u.*,/* & */,' >>conftest.defines
27829
27830# Break up conftest.defines:
27831ac_max_sed_lines=50
27832
27833# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27834# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27835# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27836# et cetera.
27837ac_in='$ac_file_inputs'
27838ac_out='"$tmp/out1"'
27839ac_nxt='"$tmp/out2"'
27840
27841while :
27842do
27843 # Write a here document:
27844 cat >>$CONFIG_STATUS <<_ACEOF
27845 # First, check the format of the line:
27846 cat >"\$tmp/defines.sed" <<\\CEOF
27847/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27848/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27849b
27850:def
27851_ACEOF
27852 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27853 echo 'CEOF
27854 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27855 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27856 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27857 grep . conftest.tail >/dev/null || break
27858 rm -f conftest.defines
27859 mv conftest.tail conftest.defines
27860done
27861rm -f conftest.defines conftest.tail
27862
27863echo "ac_result=$ac_in" >>$CONFIG_STATUS
27864cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027865 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027866 echo "/* $configure_input */" >"$tmp/config.h"
27867 cat "$ac_result" >>"$tmp/config.h"
27868 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27869 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27870echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027871 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027872 rm -f $ac_file
27873 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027874 fi
27875 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027876 echo "/* $configure_input */"
27877 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027878 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027879 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027880 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027882
27883 esac
27884
27885done # for ac_tag
27886
Guido van Rossum627b2d71993-12-24 10:39:16 +000027887
Martin v. Löwis11437992002-04-12 09:54:03 +000027888{ (exit 0); exit 0; }
27889_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027890chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027891ac_clean_files=$ac_clean_files_save
27892
27893
27894# configure is writing to config.log, and then calls config.status.
27895# config.status does its own redirection, appending to config.log.
27896# Unfortunately, on DOS this fails, as config.log is still kept open
27897# by configure, so config.status won't be able to write to it; its
27898# output is simply discarded. So we exec the FD to /dev/null,
27899# effectively closing config.log, so it can be properly (re)opened and
27900# appended to by config.status. When coming back to configure, we
27901# need to make the FD available again.
27902if test "$no_create" != yes; then
27903 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027904 ac_config_status_args=
27905 test "$silent" = yes &&
27906 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027907 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027908 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027909 exec 5>>config.log
27910 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27911 # would make configure fail if this is the last instruction.
27912 $ac_cs_success || { (exit 1); exit 1; }
27913fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027914
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027915
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027916echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027917if test ! -f Modules/Setup
27918then
27919 cp $srcdir/Modules/Setup.dist Modules/Setup
27920fi
27921
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027922echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027923if test ! -f Modules/Setup.local
27924then
27925 echo "# Edit this file for local setup changes" >Modules/Setup.local
27926fi
27927
27928echo "creating Makefile"
27929$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27930 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027931 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027932mv config.c Modules