blob: 931e689a8a7c386cdada89bfd2080f98889e20d6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002# From configure.in Revision: 78196 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002103 # In addition, Stefan Krah confirms that issue #1244610 exists through
2104 # OpenBSD 4.6, but is fixed in 4.7.
2105 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002106 define_xopen_source=no
2107 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2108 # also defined. This can be overridden by defining _BSD_SOURCE
2109 # As this has a different meaning on Linux, only define it on OpenBSD
2110
2111cat >>confdefs.h <<\_ACEOF
2112#define _BSD_SOURCE 1
2113_ACEOF
2114
2115 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002116 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002117 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2118 # also defined. This can be overridden by defining _BSD_SOURCE
2119 # As this has a different meaning on Linux, only define it on OpenBSD
2120
2121cat >>confdefs.h <<\_ACEOF
2122#define _BSD_SOURCE 1
2123_ACEOF
2124
2125 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002126 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2127 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2128 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002129 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 +00002130 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002131 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2132 # of union __?sigval. Reported by Stuart Bishop.
2133 SunOS/5.6)
2134 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002135 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2136 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002137 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002138 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002139 define_xopen_source=no;;
2140 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002141 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002142 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002143 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002144 # On FreeBSD 4, the math functions C89 does not cover are never defined
2145 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2146 FreeBSD/4.*)
2147 define_xopen_source=no;;
2148 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2149 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2150 # identifies itself as Darwin/7.*
2151 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2152 # disables platform specific features beyond repair.
2153 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2154 # has no effect, don't bother defining them
2155 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002156 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002157 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2158 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2159 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002160 AIX/4)
2161 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002162 AIX/5)
2163 if test `uname -r` -eq 1; then
2164 define_xopen_source=no
2165 fi
2166 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002167 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2168 # defining NI_NUMERICHOST.
2169 QNX/6.3.2)
2170 define_xopen_source=no
2171 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002172
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002173esac
2174
2175if test $define_xopen_source = yes
2176then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002177 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2178 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002179 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2180 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002181 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002182 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183
2184cat >>confdefs.h <<\_ACEOF
2185#define _XOPEN_SOURCE 500
2186_ACEOF
2187
2188 ;;
2189 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190
2191cat >>confdefs.h <<\_ACEOF
2192#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002193_ACEOF
2194
Skip Montanarof0d5f792004-08-15 14:08:23 +00002195 ;;
2196 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002197
2198 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2199 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2200 # several APIs are not declared. Since this is also needed in some
2201 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002202 # except for Solaris 10, where it must not be defined,
2203 # as it implies XPG4.2
2204 case $ac_sys_system/$ac_sys_release in
2205 SunOS/5.10)
2206 ;;
2207 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002208
2209cat >>confdefs.h <<\_ACEOF
2210#define _XOPEN_SOURCE_EXTENDED 1
2211_ACEOF
2212
Martin v. Löwis7dece662005-11-26 11:38:24 +00002213 ;;
2214 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002215
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002216
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002217cat >>confdefs.h <<\_ACEOF
2218#define _POSIX_C_SOURCE 200112L
2219_ACEOF
2220
2221
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002222fi
2223
Guido van Rossum91922671997-10-09 20:24:13 +00002224#
2225# SGI compilers allow the specification of the both the ABI and the
2226# ISA on the command line. Depending on the values of these switches,
2227# different and often incompatable code will be generated.
2228#
2229# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2230# thus supply support for various ABI/ISA combinations. The MACHDEP
2231# variable is also adjusted.
2232#
2233
2234if test ! -z "$SGI_ABI"
2235then
2236 CC="cc $SGI_ABI"
2237 LDFLAGS="$SGI_ABI $LDFLAGS"
2238 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2239fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002240{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2241echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002242
Jack Jansen6b08a402004-06-03 12:41:45 +00002243# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2244# it may influence the way we can build extensions, so distutils
2245# needs to check it
2246
Thomas Wouters477c8d52006-05-27 19:21:47 +00002247
Jack Jansen6b08a402004-06-03 12:41:45 +00002248CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002249EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002250
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002251{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2252echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002253ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002254{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2255echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002256
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002258
2259# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2260# for debug/optimization stuff. BASECFLAGS is for flags that are required
2261# just to get things to compile and link. Users are free to override OPT
2262# when running configure or make. The build should not break if they do.
2263# BASECFLAGS should generally not be messed with, however.
2264
2265# XXX shouldn't some/most/all of this code be merged with the stuff later
2266# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002267{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2268echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002270# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002272 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002273 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002274 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275 without_gcc=yes;;
2276 yes) CC=gcc
2277 without_gcc=no;;
2278 *) CC=$withval
2279 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002281else
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002283 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002284 AIX*) CC=cc_r
2285 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002286 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002287 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002288fi
2289
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002290{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2291echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002292
Guido van Rossum8b131c51995-03-09 14:10:13 +00002293# If the user switches compilers, we can't believe the cache
2294if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2295then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002296 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002297(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002299(it is also a good idea to do 'make clean' before compiling)" >&2;}
2300 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002301fi
2302
Martin v. Löwis11437992002-04-12 09:54:03 +00002303ac_ext=c
2304ac_cpp='$CPP $CPPFLAGS'
2305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2307ac_compiler_gnu=$ac_cv_c_compiler_gnu
2308if test -n "$ac_tool_prefix"; then
2309 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2310set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002311{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2312echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002313if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002315else
2316 if test -n "$CC"; then
2317 ac_cv_prog_CC="$CC" # Let the user override the test.
2318else
Martin v. Löwis11437992002-04-12 09:54:03 +00002319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2320for as_dir in $PATH
2321do
2322 IFS=$as_save_IFS
2323 test -z "$as_dir" && as_dir=.
2324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002325 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 +00002326 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002327 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002328 break 2
2329 fi
2330done
2331done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002333
Jack Jansendd19cf82001-12-06 22:36:17 +00002334fi
2335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002336CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002337if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002338 { echo "$as_me:$LINENO: result: $CC" >&5
2339echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002341 { echo "$as_me:$LINENO: result: no" >&5
2342echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002343fi
2344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345
Martin v. Löwis11437992002-04-12 09:54:03 +00002346fi
2347if test -z "$ac_cv_prog_CC"; then
2348 ac_ct_CC=$CC
2349 # Extract the first word of "gcc", so it can be a program name with args.
2350set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002351{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2352echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002354 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002355else
2356 if test -n "$ac_ct_CC"; then
2357 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2358else
2359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2360for as_dir in $PATH
2361do
2362 IFS=$as_save_IFS
2363 test -z "$as_dir" && as_dir=.
2364 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365 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 +00002366 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002367 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002368 break 2
2369 fi
2370done
2371done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374fi
2375fi
2376ac_ct_CC=$ac_cv_prog_ac_ct_CC
2377if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002378 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2379echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002381 { echo "$as_me:$LINENO: result: no" >&5
2382echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383fi
2384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002385 if test "x$ac_ct_CC" = x; then
2386 CC=""
2387 else
2388 case $cross_compiling:$ac_tool_warned in
2389yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002390{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2391whose name does not start with the host triplet. If you think this
2392configuration is useful to you, please write to autoconf@gnu.org." >&5
2393echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2394whose name does not start with the host triplet. If you think this
2395configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396ac_tool_warned=yes ;;
2397esac
2398 CC=$ac_ct_CC
2399 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002400else
2401 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002402fi
2403
Jack Jansendd19cf82001-12-06 22:36:17 +00002404if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405 if test -n "$ac_tool_prefix"; then
2406 # 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 +00002407set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002408{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2409echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002411 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002412else
2413 if test -n "$CC"; then
2414 ac_cv_prog_CC="$CC" # Let the user override the test.
2415else
Martin v. Löwis11437992002-04-12 09:54:03 +00002416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2417for as_dir in $PATH
2418do
2419 IFS=$as_save_IFS
2420 test -z "$as_dir" && as_dir=.
2421 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422 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 +00002423 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002424 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002425 break 2
2426 fi
2427done
2428done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
2431fi
2432fi
2433CC=$ac_cv_prog_CC
2434if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002435 { echo "$as_me:$LINENO: result: $CC" >&5
2436echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002438 { echo "$as_me:$LINENO: result: no" >&5
2439echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002440fi
2441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002444fi
2445if test -z "$CC"; then
2446 # Extract the first word of "cc", so it can be a program name with args.
2447set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002448{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002450if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002452else
2453 if test -n "$CC"; then
2454 ac_cv_prog_CC="$CC" # Let the user override the test.
2455else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002456 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2458for as_dir in $PATH
2459do
2460 IFS=$as_save_IFS
2461 test -z "$as_dir" && as_dir=.
2462 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 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 +00002464 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2465 ac_prog_rejected=yes
2466 continue
2467 fi
2468 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002469 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 break 2
2471 fi
2472done
2473done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002475
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002476if test $ac_prog_rejected = yes; then
2477 # We found a bogon in the path, so make sure we never use it.
2478 set dummy $ac_cv_prog_CC
2479 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002481 # We chose a different compiler from the bogus one.
2482 # However, it has the same basename, so the bogon will be chosen
2483 # first if we set CC to just the basename; use the full file name.
2484 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002486 fi
2487fi
2488fi
2489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002490CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002491if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002492 { echo "$as_me:$LINENO: result: $CC" >&5
2493echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495 { echo "$as_me:$LINENO: result: no" >&5
2496echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497fi
2498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499
Martin v. Löwis11437992002-04-12 09:54:03 +00002500fi
2501if test -z "$CC"; then
2502 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 do
2505 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2506set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002507{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2508echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002511else
2512 if test -n "$CC"; then
2513 ac_cv_prog_CC="$CC" # Let the user override the test.
2514else
Martin v. Löwis11437992002-04-12 09:54:03 +00002515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2516for as_dir in $PATH
2517do
2518 IFS=$as_save_IFS
2519 test -z "$as_dir" && as_dir=.
2520 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 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 +00002522 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002523 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002526done
2527done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002529
2530fi
2531fi
2532CC=$ac_cv_prog_CC
2533if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002534 { echo "$as_me:$LINENO: result: $CC" >&5
2535echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002537 { echo "$as_me:$LINENO: result: no" >&5
2538echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002539fi
2540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 test -n "$CC" && break
2543 done
2544fi
2545if test -z "$CC"; then
2546 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002548do
2549 # Extract the first word of "$ac_prog", so it can be a program name with args.
2550set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002551{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2552echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002553if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002555else
2556 if test -n "$ac_ct_CC"; then
2557 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2558else
2559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2560for as_dir in $PATH
2561do
2562 IFS=$as_save_IFS
2563 test -z "$as_dir" && as_dir=.
2564 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 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 +00002566 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002567 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 break 2
2569 fi
2570done
2571done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574fi
2575fi
2576ac_ct_CC=$ac_cv_prog_ac_ct_CC
2577if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002578 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2579echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581 { echo "$as_me:$LINENO: result: no" >&5
2582echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002583fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 test -n "$ac_ct_CC" && break
2587done
Michael W. Hudson54241132001-12-07 15:38:26 +00002588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 if test "x$ac_ct_CC" = x; then
2590 CC=""
2591 else
2592 case $cross_compiling:$ac_tool_warned in
2593yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002594{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2595whose name does not start with the host triplet. If you think this
2596configuration is useful to you, please write to autoconf@gnu.org." >&5
2597echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2598whose name does not start with the host triplet. If you think this
2599configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600ac_tool_warned=yes ;;
2601esac
2602 CC=$ac_ct_CC
2603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002604fi
2605
2606fi
2607
2608
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002609test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002610See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002612See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
2615# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002616echo "$as_me:$LINENO: checking for C compiler version" >&5
2617ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618{ (ac_try="$ac_compiler --version >&5"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628{ (ac_try="$ac_compiler -v >&5"
2629case "(($ac_try" in
2630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2631 *) ac_try_echo=$ac_try;;
2632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638{ (ac_try="$ac_compiler -V >&5"
2639case "(($ac_try" in
2640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2641 *) ac_try_echo=$ac_try;;
2642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 (exit $ac_status); }
2648
2649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002650/* confdefs.h. */
2651_ACEOF
2652cat confdefs.h >>conftest.$ac_ext
2653cat >>conftest.$ac_ext <<_ACEOF
2654/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656int
2657main ()
2658{
2659
2660 ;
2661 return 0;
2662}
2663_ACEOF
2664ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002665ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002666# Try to create an executable without -o first, disregard a.out.
2667# It will help us diagnose broken compilers, and finding out an intuition
2668# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002669{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2670echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2671ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2672#
2673# List of possible output files, starting from the most likely.
2674# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2675# only as a last resort. b.out is created by i960 compilers.
2676ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2677#
2678# The IRIX 6 linker writes into existing files which may not be
2679# executable, retaining their permissions. Remove them first so a
2680# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681ac_rmfiles=
2682for ac_file in $ac_files
2683do
2684 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002685 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2687 esac
2688done
2689rm -f $ac_rmfiles
2690
2691if { (ac_try="$ac_link_default"
2692case "(($ac_try" in
2693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694 *) ac_try_echo=$ac_try;;
2695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2702# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2703# in a Makefile. We should not override ac_cv_exeext if it was cached,
2704# so that the user can short-circuit this test for compilers unknown to
2705# Autoconf.
2706for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002707do
2708 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002711 ;;
2712 [ab].out )
2713 # We found the default executable, but exeext='' is most
2714 # certainly right.
2715 break;;
2716 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2718 then :; else
2719 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2720 fi
2721 # We set ac_cv_exeext here because the later test for it is not
2722 # safe: cross compilers may not add the suffix if given an `-o'
2723 # argument, so we may need to know it at that point already.
2724 # Even if this section looks crufty: it has the advantage of
2725 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002726 break;;
2727 * )
2728 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 esac
2730done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731test "$ac_cv_exeext" = no && ac_cv_exeext=
2732
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002733else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734 ac_file=''
2735fi
2736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002737{ echo "$as_me:$LINENO: result: $ac_file" >&5
2738echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002739if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002741sed 's/^/| /' conftest.$ac_ext >&5
2742
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002743{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002744See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002746See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002748fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002749
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002750ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002753# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002754{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2755echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002756# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2757# If not cross compiling, check that we can run a simple program.
2758if test "$cross_compiling" != yes; then
2759 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760 { (case "(($ac_try" in
2761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2762 *) ac_try_echo=$ac_try;;
2763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 (exit $ac_status); }; }; then
2769 cross_compiling=no
2770 else
2771 if test "$cross_compiling" = maybe; then
2772 cross_compiling=yes
2773 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002774 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002775If you meant to cross compile, use \`--host'.
2776See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002778If you meant to cross compile, use \`--host'.
2779See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002780 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 fi
2782 fi
2783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002784{ echo "$as_me:$LINENO: result: yes" >&5
2785echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002788ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002790# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2792echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2793{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2794echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002796{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2797echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798if { (ac_try="$ac_link"
2799case "(($ac_try" in
2800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2801 *) ac_try_echo=$ac_try;;
2802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002805 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2809# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2810# work properly (i.e., refer to `conftest.exe'), while it won't with
2811# `rm'.
2812for ac_file in conftest.exe conftest conftest.*; do
2813 test -f "$ac_file" || continue
2814 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2817 break;;
2818 * ) break;;
2819 esac
2820done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002822 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002823See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002825See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002826 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002827fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002828
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002829rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002830{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2831echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002832
2833rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002834EXEEXT=$ac_cv_exeext
2835ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002836{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2837echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002838if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002839 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002840else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002841 cat >conftest.$ac_ext <<_ACEOF
2842/* confdefs.h. */
2843_ACEOF
2844cat confdefs.h >>conftest.$ac_ext
2845cat >>conftest.$ac_ext <<_ACEOF
2846/* end confdefs.h. */
2847
2848int
2849main ()
2850{
2851
2852 ;
2853 return 0;
2854}
2855_ACEOF
2856rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857if { (ac_try="$ac_compile"
2858case "(($ac_try" in
2859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2860 *) ac_try_echo=$ac_try;;
2861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002867 for ac_file in conftest.o conftest.obj conftest.*; do
2868 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002870 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2872 break;;
2873 esac
2874done
2875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002877sed 's/^/| /' conftest.$ac_ext >&5
2878
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002879{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002880See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002881echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002882See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002884fi
2885
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002886rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002887fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002888{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2889echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002890OBJEXT=$ac_cv_objext
2891ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2893echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002894if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002896else
2897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002898/* confdefs.h. */
2899_ACEOF
2900cat confdefs.h >>conftest.$ac_ext
2901cat >>conftest.$ac_ext <<_ACEOF
2902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002903
Martin v. Löwis11437992002-04-12 09:54:03 +00002904int
2905main ()
2906{
2907#ifndef __GNUC__
2908 choke me
2909#endif
2910
2911 ;
2912 return 0;
2913}
2914_ACEOF
2915rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916if { (ac_try="$ac_compile"
2917case "(($ac_try" in
2918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2919 *) ac_try_echo=$ac_try;;
2920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002924 grep -v '^ *+' conftest.er1 >conftest.err
2925 rm -f conftest.er1
2926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002928 (exit $ac_status); } && {
2929 test -z "$ac_c_werror_flag" ||
2930 test ! -s conftest.err
2931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002932 ac_compiler_gnu=yes
2933else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002937 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939
2940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002941ac_cv_c_compiler_gnu=$ac_compiler_gnu
2942
2943fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002944{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2945echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2946GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002947ac_test_CFLAGS=${CFLAGS+set}
2948ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002949{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2950echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002951if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002953else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002954 ac_save_c_werror_flag=$ac_c_werror_flag
2955 ac_c_werror_flag=yes
2956 ac_cv_prog_cc_g=no
2957 CFLAGS="-g"
2958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002959/* confdefs.h. */
2960_ACEOF
2961cat confdefs.h >>conftest.$ac_ext
2962cat >>conftest.$ac_ext <<_ACEOF
2963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965int
2966main ()
2967{
2968
2969 ;
2970 return 0;
2971}
2972_ACEOF
2973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002974if { (ac_try="$ac_compile"
2975case "(($ac_try" in
2976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2977 *) ac_try_echo=$ac_try;;
2978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002982 grep -v '^ *+' conftest.er1 >conftest.err
2983 rm -f conftest.er1
2984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002986 (exit $ac_status); } && {
2987 test -z "$ac_c_werror_flag" ||
2988 test ! -s conftest.err
2989 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002990 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002993sed 's/^/| /' conftest.$ac_ext >&5
2994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 CFLAGS=""
2996 cat >conftest.$ac_ext <<_ACEOF
2997/* confdefs.h. */
2998_ACEOF
2999cat confdefs.h >>conftest.$ac_ext
3000cat >>conftest.$ac_ext <<_ACEOF
3001/* end confdefs.h. */
3002
3003int
3004main ()
3005{
3006
3007 ;
3008 return 0;
3009}
3010_ACEOF
3011rm -f conftest.$ac_objext
3012if { (ac_try="$ac_compile"
3013case "(($ac_try" in
3014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3015 *) ac_try_echo=$ac_try;;
3016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 (eval "$ac_compile") 2>conftest.er1
3019 ac_status=$?
3020 grep -v '^ *+' conftest.er1 >conftest.err
3021 rm -f conftest.er1
3022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 (exit $ac_status); } && {
3025 test -z "$ac_c_werror_flag" ||
3026 test ! -s conftest.err
3027 } && test -s conftest.$ac_objext; then
3028 :
3029else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003030 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003031sed 's/^/| /' conftest.$ac_ext >&5
3032
3033 ac_c_werror_flag=$ac_save_c_werror_flag
3034 CFLAGS="-g"
3035 cat >conftest.$ac_ext <<_ACEOF
3036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041
3042int
3043main ()
3044{
3045
3046 ;
3047 return 0;
3048}
3049_ACEOF
3050rm -f conftest.$ac_objext
3051if { (ac_try="$ac_compile"
3052case "(($ac_try" in
3053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3054 *) ac_try_echo=$ac_try;;
3055esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057 (eval "$ac_compile") 2>conftest.er1
3058 ac_status=$?
3059 grep -v '^ *+' conftest.er1 >conftest.err
3060 rm -f conftest.er1
3061 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063 (exit $ac_status); } && {
3064 test -z "$ac_c_werror_flag" ||
3065 test ! -s conftest.err
3066 } && test -s conftest.$ac_objext; then
3067 ac_cv_prog_cc_g=yes
3068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003069 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070sed 's/^/| /' conftest.$ac_ext >&5
3071
3072
Guido van Rossum627b2d71993-12-24 10:39:16 +00003073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074
3075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077
3078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3079fi
3080
3081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3082 ac_c_werror_flag=$ac_save_c_werror_flag
3083fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003084{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3085echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003086if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003087 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003088elif test $ac_cv_prog_cc_g = yes; then
3089 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003090 CFLAGS="-g -O2"
3091 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003092 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093 fi
3094else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003095 if test "$GCC" = yes; then
3096 CFLAGS="-O2"
3097 else
3098 CFLAGS=
3099 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003101{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3102echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003104 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003105else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003107ac_save_CC=$CC
3108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003109/* confdefs.h. */
3110_ACEOF
3111cat confdefs.h >>conftest.$ac_ext
3112cat >>conftest.$ac_ext <<_ACEOF
3113/* end confdefs.h. */
3114#include <stdarg.h>
3115#include <stdio.h>
3116#include <sys/types.h>
3117#include <sys/stat.h>
3118/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3119struct buf { int x; };
3120FILE * (*rcsopen) (struct buf *, struct stat *, int);
3121static char *e (p, i)
3122 char **p;
3123 int i;
3124{
3125 return p[i];
3126}
3127static char *f (char * (*g) (char **, int), char **p, ...)
3128{
3129 char *s;
3130 va_list v;
3131 va_start (v,p);
3132 s = g (p, va_arg (v,int));
3133 va_end (v);
3134 return s;
3135}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003136
3137/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3138 function prototypes and stuff, but not '\xHH' hex character constants.
3139 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003141 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3142 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003144int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3147 inside strings and character constants. */
3148#define FOO(x) 'x'
3149int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3150
Skip Montanaro6dead952003-09-25 14:50:04 +00003151int test (int i, double x);
3152struct s1 {int (*f) (int a);};
3153struct s2 {int (*f) (double a);};
3154int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3155int argc;
3156char **argv;
3157int
3158main ()
3159{
3160return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3161 ;
3162 return 0;
3163}
3164_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3166 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003167do
3168 CC="$ac_save_CC $ac_arg"
3169 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170if { (ac_try="$ac_compile"
3171case "(($ac_try" in
3172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3173 *) ac_try_echo=$ac_try;;
3174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003178 grep -v '^ *+' conftest.er1 >conftest.err
3179 rm -f conftest.er1
3180 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 (exit $ac_status); } && {
3183 test -z "$ac_c_werror_flag" ||
3184 test ! -s conftest.err
3185 } && test -s conftest.$ac_objext; then
3186 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003189sed 's/^/| /' conftest.$ac_ext >&5
3190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191
Skip Montanaro6dead952003-09-25 14:50:04 +00003192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193
3194rm -f core conftest.err conftest.$ac_objext
3195 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003196done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003198CC=$ac_save_CC
3199
3200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# AC_CACHE_VAL
3202case "x$ac_cv_prog_cc_c89" in
3203 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003204 { echo "$as_me:$LINENO: result: none needed" >&5
3205echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003207 { echo "$as_me:$LINENO: result: unsupported" >&5
3208echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003209 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003211 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3212echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003213esac
3214
Skip Montanaro6dead952003-09-25 14:50:04 +00003215
Martin v. Löwis11437992002-04-12 09:54:03 +00003216ac_ext=c
3217ac_cpp='$CPP $CPPFLAGS'
3218ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003222
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003223
3224
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003225{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3226echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231
3232 case $withval in
3233 no) with_cxx_main=no
3234 MAINCC='$(CC)';;
3235 yes) with_cxx_main=yes
3236 MAINCC='$(CXX)';;
3237 *) with_cxx_main=yes
3238 MAINCC=$withval
3239 if test -z "$CXX"
3240 then
3241 CXX=$withval
3242 fi;;
3243 esac
3244else
3245
3246 with_cxx_main=no
3247 MAINCC='$(CC)'
3248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249fi
3250
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003251{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3252echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003253
3254preset_cxx="$CXX"
3255if test -z "$CXX"
3256then
3257 case "$CC" in
3258 gcc) # Extract the first word of "g++", so it can be a program name with args.
3259set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003260{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003262if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003263 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003264else
3265 case $CXX in
3266 [\\/]* | ?:[\\/]*)
3267 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3268 ;;
3269 *)
3270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3271for as_dir in notfound
3272do
3273 IFS=$as_save_IFS
3274 test -z "$as_dir" && as_dir=.
3275 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003276 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 +00003277 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003278 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003279 break 2
3280 fi
3281done
3282done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003283IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003284
3285 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3286 ;;
3287esac
3288fi
3289CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003290if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003291 { echo "$as_me:$LINENO: result: $CXX" >&5
3292echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003294 { echo "$as_me:$LINENO: result: no" >&5
3295echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298 ;;
3299 cc) # Extract the first word of "c++", so it can be a program name with args.
3300set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003301{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003303if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003304 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003305else
3306 case $CXX in
3307 [\\/]* | ?:[\\/]*)
3308 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3309 ;;
3310 *)
3311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3312for as_dir in notfound
3313do
3314 IFS=$as_save_IFS
3315 test -z "$as_dir" && as_dir=.
3316 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317 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 +00003318 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003320 break 2
3321 fi
3322done
3323done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325
3326 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3327 ;;
3328esac
3329fi
3330CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003331if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003332 { echo "$as_me:$LINENO: result: $CXX" >&5
3333echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003334else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003335 { echo "$as_me:$LINENO: result: no" >&5
3336echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339 ;;
3340 esac
3341 if test "$CXX" = "notfound"
3342 then
3343 CXX=""
3344 fi
3345fi
3346if test -z "$CXX"
3347then
3348 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3349do
3350 # Extract the first word of "$ac_prog", so it can be a program name with args.
3351set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003355 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356else
3357 if test -n "$CXX"; then
3358 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3359else
3360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
3365 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366 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 +00003367 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003369 break 2
3370 fi
3371done
3372done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003373IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003374
3375fi
3376fi
3377CXX=$ac_cv_prog_CXX
3378if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003379 { echo "$as_me:$LINENO: result: $CXX" >&5
3380echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003382 { echo "$as_me:$LINENO: result: no" >&5
3383echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003384fi
3385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003386
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003387 test -n "$CXX" && break
3388done
3389test -n "$CXX" || CXX="notfound"
3390
3391 if test "$CXX" = "notfound"
3392 then
3393 CXX=""
3394 fi
3395fi
3396if test "$preset_cxx" != "$CXX"
3397then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003398 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003399
3400 By default, distutils will build C++ extension modules with \"$CXX\".
3401 If this is not intended, then set CXX on the configure command line.
3402 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003403echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003404
3405 By default, distutils will build C++ extension modules with \"$CXX\".
3406 If this is not intended, then set CXX on the configure command line.
3407 " >&2;}
3408fi
3409
3410
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003411# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003412
3413ac_ext=c
3414ac_cpp='$CPP $CPPFLAGS'
3415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3417ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003418{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3419echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003420# On Suns, sometimes $CPP names a directory.
3421if test -n "$CPP" && test -d "$CPP"; then
3422 CPP=
3423fi
3424if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003427else
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 # Double quotes because CPP needs to be expanded
3429 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3430 do
3431 ac_preproc_ok=false
3432for ac_c_preproc_warn_flag in '' yes
3433do
3434 # Use a header file that comes with gcc, so configuring glibc
3435 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003436 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3437 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003438 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # not just through cpp. "Syntax error" is here to catch this case.
3440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003441/* confdefs.h. */
3442_ACEOF
3443cat confdefs.h >>conftest.$ac_ext
3444cat >>conftest.$ac_ext <<_ACEOF
3445/* end confdefs.h. */
3446#ifdef __STDC__
3447# include <limits.h>
3448#else
3449# include <assert.h>
3450#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003451 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453if { (ac_try="$ac_cpp conftest.$ac_ext"
3454case "(($ac_try" in
3455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3456 *) ac_try_echo=$ac_try;;
3457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003461 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 rm -f conftest.er1
3463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 (exit $ac_status); } >/dev/null && {
3466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3467 test ! -s conftest.err
3468 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003469 :
3470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003472sed 's/^/| /' conftest.$ac_ext >&5
3473
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 # Broken: fails on valid input.
3475continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003481 # can be detected and how.
3482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003483/* confdefs.h. */
3484_ACEOF
3485cat confdefs.h >>conftest.$ac_ext
3486cat >>conftest.$ac_ext <<_ACEOF
3487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003488#include <ac_nonexistent.h>
3489_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490if { (ac_try="$ac_cpp conftest.$ac_ext"
3491case "(($ac_try" in
3492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493 *) ac_try_echo=$ac_try;;
3494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003496 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003498 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 rm -f conftest.er1
3500 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502 (exit $ac_status); } >/dev/null && {
3503 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3504 test ! -s conftest.err
3505 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: success on invalid input.
3507continue
3508else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003510sed 's/^/| /' conftest.$ac_ext >&5
3511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 # Passes both tests.
3513ac_preproc_ok=:
3514break
3515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517rm -f conftest.err conftest.$ac_ext
3518
3519done
3520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3521rm -f conftest.err conftest.$ac_ext
3522if $ac_preproc_ok; then
3523 break
3524fi
3525
3526 done
3527 ac_cv_prog_CPP=$CPP
3528
3529fi
3530 CPP=$ac_cv_prog_CPP
3531else
3532 ac_cv_prog_CPP=$CPP
3533fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534{ echo "$as_me:$LINENO: result: $CPP" >&5
3535echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003536ac_preproc_ok=false
3537for ac_c_preproc_warn_flag in '' yes
3538do
3539 # Use a header file that comes with gcc, so configuring glibc
3540 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003541 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3542 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 # On the NeXT, cc -E runs the code through the compiler's parser,
3544 # not just through cpp. "Syntax error" is here to catch this case.
3545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003546/* confdefs.h. */
3547_ACEOF
3548cat confdefs.h >>conftest.$ac_ext
3549cat >>conftest.$ac_ext <<_ACEOF
3550/* end confdefs.h. */
3551#ifdef __STDC__
3552# include <limits.h>
3553#else
3554# include <assert.h>
3555#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003556 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558if { (ac_try="$ac_cpp conftest.$ac_ext"
3559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003566 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 rm -f conftest.er1
3568 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570 (exit $ac_status); } >/dev/null && {
3571 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3572 test ! -s conftest.err
3573 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 :
3575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003577sed 's/^/| /' conftest.$ac_ext >&5
3578
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # Broken: fails on valid input.
3580continue
3581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583rm -f conftest.err conftest.$ac_ext
3584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 # can be detected and how.
3587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003588/* confdefs.h. */
3589_ACEOF
3590cat confdefs.h >>conftest.$ac_ext
3591cat >>conftest.$ac_ext <<_ACEOF
3592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003593#include <ac_nonexistent.h>
3594_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595if { (ac_try="$ac_cpp conftest.$ac_ext"
3596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003603 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 rm -f conftest.er1
3605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 (exit $ac_status); } >/dev/null && {
3608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3609 test ! -s conftest.err
3610 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 # Broken: success on invalid input.
3612continue
3613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003615sed 's/^/| /' conftest.$ac_ext >&5
3616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 # Passes both tests.
3618ac_preproc_ok=:
3619break
3620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622rm -f conftest.err conftest.$ac_ext
3623
3624done
3625# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3626rm -f conftest.err conftest.$ac_ext
3627if $ac_preproc_ok; then
3628 :
3629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003630 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003631See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003633See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
3637ac_ext=c
3638ac_cpp='$CPP $CPPFLAGS'
3639ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3640ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3641ac_compiler_gnu=$ac_cv_c_compiler_gnu
3642
3643
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3645echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003647 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003649 # Extract the first word of "grep ggrep" to use in msg output
3650if test -z "$GREP"; then
3651set dummy grep ggrep; ac_prog_name=$2
3652if test "${ac_cv_path_GREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003656# Loop through the user's path and test for each of PROGNAME-LIST
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003663 for ac_exec_ext in '' $ac_executable_extensions; do
3664 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3665 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3666 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 # Check for GNU $ac_path_GREP
3668case `"$ac_path_GREP" --version 2>&1` in
3669*GNU*)
3670 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3671*)
3672 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003673 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 while :
3675 do
3676 cat "conftest.in" "conftest.in" >"conftest.tmp"
3677 mv "conftest.tmp" "conftest.in"
3678 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003679 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3681 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3682 ac_count=`expr $ac_count + 1`
3683 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3684 # Best one so far, save it but keep looking for a better one
3685 ac_cv_path_GREP="$ac_path_GREP"
3686 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003687 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 # 10*(2^10) chars as input seems more than enough
3689 test $ac_count -gt 10 && break
3690 done
3691 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3692esac
3693
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694
3695 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696 done
3697done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698
3699done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003701
3702
3703fi
3704
3705GREP="$ac_cv_path_GREP"
3706if test -z "$GREP"; then
3707 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3708echo "$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 +00003709 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003710fi
3711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712else
3713 ac_cv_path_GREP=$GREP
3714fi
3715
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003718{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3719echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 GREP="$ac_cv_path_GREP"
3721
3722
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003723{ echo "$as_me:$LINENO: checking for egrep" >&5
3724echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727else
3728 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3729 then ac_cv_path_EGREP="$GREP -E"
3730 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003731 # Extract the first word of "egrep" to use in msg output
3732if test -z "$EGREP"; then
3733set dummy egrep; ac_prog_name=$2
3734if test "${ac_cv_path_EGREP+set}" = set; then
3735 echo $ECHO_N "(cached) $ECHO_C" >&6
3736else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003738# Loop through the user's path and test for each of PROGNAME-LIST
3739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
3744 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
3746 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3747 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3748 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 # Check for GNU $ac_path_EGREP
3750case `"$ac_path_EGREP" --version 2>&1` in
3751*GNU*)
3752 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3753*)
3754 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003755 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756 while :
3757 do
3758 cat "conftest.in" "conftest.in" >"conftest.tmp"
3759 mv "conftest.tmp" "conftest.in"
3760 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003761 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3763 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3764 ac_count=`expr $ac_count + 1`
3765 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3766 # Best one so far, save it but keep looking for a better one
3767 ac_cv_path_EGREP="$ac_path_EGREP"
3768 ac_path_EGREP_max=$ac_count
3769 fi
3770 # 10*(2^10) chars as input seems more than enough
3771 test $ac_count -gt 10 && break
3772 done
3773 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3774esac
3775
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003776
3777 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778 done
3779done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780
3781done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003783
3784
3785fi
3786
3787EGREP="$ac_cv_path_EGREP"
3788if test -z "$EGREP"; then
3789 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3790echo "$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 +00003791 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003792fi
3793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794else
3795 ac_cv_path_EGREP=$EGREP
3796fi
3797
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 fi
3800fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003801{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3802echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003804
3805
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003806
3807{ echo "$as_me:$LINENO: checking for AIX" >&5
3808echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3809cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003810/* confdefs.h. */
3811_ACEOF
3812cat confdefs.h >>conftest.$ac_ext
3813cat >>conftest.$ac_ext <<_ACEOF
3814/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003815#ifdef _AIX
3816 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003817#endif
3818
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003819_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3821 $EGREP "yes" >/dev/null 2>&1; then
3822 { echo "$as_me:$LINENO: result: yes" >&5
3823echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003824cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003825#define _ALL_SOURCE 1
3826_ACEOF
3827
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003828else
3829 { echo "$as_me:$LINENO: result: no" >&5
3830echo "${ECHO_T}no" >&6; }
3831fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003832rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003833
3834
3835
3836# Check for unsupported systems
3837case $ac_sys_system/$ac_sys_release in
3838atheos*|Linux*/1*)
3839 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3840 echo See README for details.
3841 exit 1;;
3842esac
3843
3844
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003845{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3846echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003847
3848# Check whether --with-suffix was given.
3849if test "${with_suffix+set}" = set; then
3850 withval=$with_suffix;
3851 case $withval in
3852 no) EXEEXT=;;
3853 yes) EXEEXT=.exe;;
3854 *) EXEEXT=$withval;;
3855 esac
3856fi
3857
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003858{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3859echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003860
3861# Test whether we're running on a non-case-sensitive system, in which
3862# case we give a warning if no ext is given
3863
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003864{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3865echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003866if test ! -d CaseSensitiveTestDir; then
3867mkdir CaseSensitiveTestDir
3868fi
3869
3870if test -d casesensitivetestdir
3871then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003872 { echo "$as_me:$LINENO: result: yes" >&5
3873echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003874 BUILDEXEEXT=.exe
3875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003876 { echo "$as_me:$LINENO: result: no" >&5
3877echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003878 BUILDEXEEXT=$EXEEXT
3879fi
3880rmdir CaseSensitiveTestDir
3881
3882case $MACHDEP in
3883bsdos*)
3884 case $CC in
3885 gcc) CC="$CC -D_HAVE_BSDI";;
3886 esac;;
3887esac
3888
3889case $ac_sys_system in
3890hp*|HP*)
3891 case $CC in
3892 cc|*/cc) CC="$CC -Ae";;
3893 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003894SunOS*)
3895 # Some functions have a prototype only with that define, e.g. confstr
3896
3897cat >>confdefs.h <<\_ACEOF
3898#define __EXTENSIONS__ 1
3899_ACEOF
3900
3901 ;;
3902esac
3903
3904
3905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003906{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3907echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003908if test -z "$LIBRARY"
3909then
3910 LIBRARY='libpython$(VERSION).a'
3911fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003912{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3913echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003914
3915# LDLIBRARY is the name of the library to link against (as opposed to the
3916# name of the library into which to insert object files). BLDLIBRARY is also
3917# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3918# is blank as the main program is not linked directly against LDLIBRARY.
3919# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3920# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3921# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3922# DLLLIBRARY is the shared (i.e., DLL) library.
3923#
3924# RUNSHARED is used to run shared python without installed libraries
3925#
3926# INSTSONAME is the name of the shared library that will be use to install
3927# on the system - some systems like version suffix, others don't
3928
3929
3930
3931
3932
3933
3934LDLIBRARY="$LIBRARY"
3935BLDLIBRARY='$(LDLIBRARY)'
3936INSTSONAME='$(LDLIBRARY)'
3937DLLLIBRARY=''
3938LDLIBRARYDIR=''
3939RUNSHARED=''
3940
3941# LINKCC is the command that links the python executable -- default is $(CC).
3942# If CXX is set, and if it is needed to link a main function that was
3943# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3944# python might then depend on the C++ runtime
3945# This is altered for AIX in order to build the export list before
3946# linking.
3947
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003948{ echo "$as_me:$LINENO: checking LINKCC" >&5
3949echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003950if test -z "$LINKCC"
3951then
3952 LINKCC='$(PURIFY) $(MAINCC)'
3953 case $ac_sys_system in
3954 AIX*)
3955 exp_extra="\"\""
3956 if test $ac_sys_release -ge 5 -o \
3957 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3958 exp_extra="."
3959 fi
3960 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961 QNX*)
3962 # qcc must be used because the other compilers do not
3963 # support -N.
3964 LINKCC=qcc;;
3965 esac
3966fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003967{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3968echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003969
3970# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3971# make sure we default having it set to "no": this is used by
3972# distutils.unixccompiler to know if it should add --enable-new-dtags
3973# to linker command lines, and failing to detect GNU ld simply results
3974# in the same bahaviour as before.
3975
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003976{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3977echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003978ac_prog=ld
3979if test "$GCC" = yes; then
3980 ac_prog=`$CC -print-prog-name=ld`
3981fi
3982case `"$ac_prog" -V 2>&1 < /dev/null` in
3983 *GNU*)
3984 GNULD=yes;;
3985 *)
3986 GNULD=no;;
3987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003988{ echo "$as_me:$LINENO: result: $GNULD" >&5
3989echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003990
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003991{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3992echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003993# Check whether --enable-shared was given.
3994if test "${enable_shared+set}" = set; then
3995 enableval=$enable_shared;
3996fi
3997
3998
3999if test -z "$enable_shared"
4000then
4001 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004002 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004003 enable_shared="yes";;
4004 *)
4005 enable_shared="no";;
4006 esac
4007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4009echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004010
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004011{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4012echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004013# Check whether --enable-profiling was given.
4014if test "${enable_profiling+set}" = set; then
4015 enableval=$enable_profiling; ac_save_cc="$CC"
4016 CC="$CC -pg"
4017 if test "$cross_compiling" = yes; then
4018 ac_enable_profiling="no"
4019else
4020 cat >conftest.$ac_ext <<_ACEOF
4021/* confdefs.h. */
4022_ACEOF
4023cat confdefs.h >>conftest.$ac_ext
4024cat >>conftest.$ac_ext <<_ACEOF
4025/* end confdefs.h. */
4026int main() { return 0; }
4027_ACEOF
4028rm -f conftest$ac_exeext
4029if { (ac_try="$ac_link"
4030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004035 (eval "$ac_link") 2>&5
4036 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4039 { (case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004044 (eval "$ac_try") 2>&5
4045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047 (exit $ac_status); }; }; then
4048 ac_enable_profiling="yes"
4049else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004050 echo "$as_me: program exited with status $ac_status" >&5
4051echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004052sed 's/^/| /' conftest.$ac_ext >&5
4053
4054( exit $ac_status )
4055ac_enable_profiling="no"
4056fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4058fi
4059
4060
4061 CC="$ac_save_cc"
4062fi
4063
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004064{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4065echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004066
4067case "$ac_enable_profiling" in
4068 "yes")
4069 BASECFLAGS="-pg $BASECFLAGS"
4070 LDFLAGS="-pg $LDFLAGS"
4071 ;;
4072esac
4073
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004074{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4075echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004076
4077# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4078# library that we build, but we do not want to link against it (we
4079# will find it with a -framework option). For this reason there is an
4080# extra variable BLDLIBRARY against which Python and the extension
4081# modules are linked, BLDLIBRARY. This is normally the same as
4082# LDLIBRARY, but empty for MacOSX framework builds.
4083if test "$enable_framework"
4084then
4085 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4086 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4087 BLDLIBRARY=''
4088else
4089 BLDLIBRARY='$(LDLIBRARY)'
4090fi
4091
4092# Other platforms follow
4093if test $enable_shared = "yes"; then
4094
4095cat >>confdefs.h <<\_ACEOF
4096#define Py_ENABLE_SHARED 1
4097_ACEOF
4098
4099 case $ac_sys_system in
4100 CYGWIN*)
4101 LDLIBRARY='libpython$(VERSION).dll.a'
4102 DLLLIBRARY='libpython$(VERSION).dll'
4103 ;;
4104 SunOS*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 INSTSONAME="$LDLIBRARY".$SOVERSION
4109 ;;
4110 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4111 LDLIBRARY='libpython$(VERSION).so'
4112 BLDLIBRARY='-L. -lpython$(VERSION)'
4113 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4114 case $ac_sys_system in
4115 FreeBSD*)
4116 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4117 ;;
4118 esac
4119 INSTSONAME="$LDLIBRARY".$SOVERSION
4120 ;;
4121 hp*|HP*)
4122 case `uname -m` in
4123 ia64)
4124 LDLIBRARY='libpython$(VERSION).so'
4125 ;;
4126 *)
4127 LDLIBRARY='libpython$(VERSION).sl'
4128 ;;
4129 esac
4130 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4131 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4132 ;;
4133 OSF*)
4134 LDLIBRARY='libpython$(VERSION).so'
4135 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4136 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4137 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004138 Darwin*)
4139 LDLIBRARY='libpython$(VERSION).dylib'
4140 BLDLIBRARY='-L. -lpython$(VERSION)'
4141 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4142 ;;
4143
4144 esac
4145else # shared is disabled
4146 case $ac_sys_system in
4147 CYGWIN*)
4148 BLDLIBRARY='$(LIBRARY)'
4149 LDLIBRARY='libpython$(VERSION).dll.a'
4150 ;;
4151 esac
4152fi
4153
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004154{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4155echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004156
4157if test -n "$ac_tool_prefix"; then
4158 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4159set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004160{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004162if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004163 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164else
4165 if test -n "$RANLIB"; then
4166 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4167else
4168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4169for as_dir in $PATH
4170do
4171 IFS=$as_save_IFS
4172 test -z "$as_dir" && as_dir=.
4173 for ac_exec_ext in '' $ac_executable_extensions; do
4174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4175 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004177 break 2
4178 fi
4179done
4180done
4181IFS=$as_save_IFS
4182
4183fi
4184fi
4185RANLIB=$ac_cv_prog_RANLIB
4186if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004187 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4188echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004190 { echo "$as_me:$LINENO: result: no" >&5
4191echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004192fi
4193
4194
4195fi
4196if test -z "$ac_cv_prog_RANLIB"; then
4197 ac_ct_RANLIB=$RANLIB
4198 # Extract the first word of "ranlib", so it can be a program name with args.
4199set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004200{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004202if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004203 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204else
4205 if test -n "$ac_ct_RANLIB"; then
4206 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4207else
4208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_exec_ext in '' $ac_executable_extensions; do
4214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4215 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004216 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217 break 2
4218 fi
4219done
4220done
4221IFS=$as_save_IFS
4222
4223fi
4224fi
4225ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4226if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004227 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4228echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004230 { echo "$as_me:$LINENO: result: no" >&5
4231echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004232fi
4233
4234 if test "x$ac_ct_RANLIB" = x; then
4235 RANLIB=":"
4236 else
4237 case $cross_compiling:$ac_tool_warned in
4238yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004239{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4240whose name does not start with the host triplet. If you think this
4241configuration is useful to you, please write to autoconf@gnu.org." >&5
4242echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4243whose name does not start with the host triplet. If you think this
4244configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004245ac_tool_warned=yes ;;
4246esac
4247 RANLIB=$ac_ct_RANLIB
4248 fi
4249else
4250 RANLIB="$ac_cv_prog_RANLIB"
4251fi
4252
4253
4254for ac_prog in ar aal
4255do
4256 # Extract the first word of "$ac_prog", so it can be a program name with args.
4257set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004258{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004260if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004261 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262else
4263 if test -n "$AR"; then
4264 ac_cv_prog_AR="$AR" # Let the user override the test.
4265else
4266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4267for as_dir in $PATH
4268do
4269 IFS=$as_save_IFS
4270 test -z "$as_dir" && as_dir=.
4271 for ac_exec_ext in '' $ac_executable_extensions; do
4272 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4273 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275 break 2
4276 fi
4277done
4278done
4279IFS=$as_save_IFS
4280
4281fi
4282fi
4283AR=$ac_cv_prog_AR
4284if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004285 { echo "$as_me:$LINENO: result: $AR" >&5
4286echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004288 { echo "$as_me:$LINENO: result: no" >&5
4289echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004290fi
4291
4292
4293 test -n "$AR" && break
4294done
4295test -n "$AR" || AR="ar"
4296
4297
4298# tweak ARFLAGS only if the user didn't set it on the command line
4299
4300if test -z "$ARFLAGS"
4301then
4302 ARFLAGS="rc"
4303fi
4304
4305
4306# Extract the first word of "svnversion", so it can be a program name with args.
4307set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004308{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004310if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004311 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312else
4313 if test -n "$SVNVERSION"; then
4314 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4315else
4316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319 IFS=$as_save_IFS
4320 test -z "$as_dir" && as_dir=.
4321 for ac_exec_ext in '' $ac_executable_extensions; do
4322 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4323 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004325 break 2
4326 fi
4327done
4328done
4329IFS=$as_save_IFS
4330
4331 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4332fi
4333fi
4334SVNVERSION=$ac_cv_prog_SVNVERSION
4335if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004336 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4337echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004339 { echo "$as_me:$LINENO: result: no" >&5
4340echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004341fi
4342
4343
4344if test $SVNVERSION = found
4345then
4346 SVNVERSION="svnversion \$(srcdir)"
4347else
4348 SVNVERSION="echo Unversioned directory"
4349fi
4350
4351case $MACHDEP in
4352bsdos*|hp*|HP*)
4353 # install -d does not work on BSDI or HP-UX
4354 if test -z "$INSTALL"
4355 then
4356 INSTALL="${srcdir}/install-sh -c"
4357 fi
4358esac
4359ac_aux_dir=
4360for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4361 if test -f "$ac_dir/install-sh"; then
4362 ac_aux_dir=$ac_dir
4363 ac_install_sh="$ac_aux_dir/install-sh -c"
4364 break
4365 elif test -f "$ac_dir/install.sh"; then
4366 ac_aux_dir=$ac_dir
4367 ac_install_sh="$ac_aux_dir/install.sh -c"
4368 break
4369 elif test -f "$ac_dir/shtool"; then
4370 ac_aux_dir=$ac_dir
4371 ac_install_sh="$ac_aux_dir/shtool install -c"
4372 break
4373 fi
4374done
4375if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004376 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4377echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004378 { (exit 1); exit 1; }; }
4379fi
4380
4381# These three variables are undocumented and unsupported,
4382# and are intended to be withdrawn in a future Autoconf release.
4383# They can cause serious problems if a builder's source tree is in a directory
4384# whose full name contains unusual characters.
4385ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4386ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4387ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4388
4389
4390# Find a good install program. We prefer a C program (faster),
4391# so one script is as good as another. But avoid the broken or
4392# incompatible versions:
4393# SysV /etc/install, /usr/sbin/install
4394# SunOS /usr/etc/install
4395# IRIX /sbin/install
4396# AIX /bin/install
4397# AmigaOS /C/install, which installs bootblocks on floppy discs
4398# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4399# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4400# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4401# OS/2's system install, which has a completely different semantic
4402# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004403{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4404echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004405if test -z "$INSTALL"; then
4406if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004408else
4409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4410for as_dir in $PATH
4411do
4412 IFS=$as_save_IFS
4413 test -z "$as_dir" && as_dir=.
4414 # Account for people who put trailing slashes in PATH elements.
4415case $as_dir/ in
4416 ./ | .// | /cC/* | \
4417 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4418 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4419 /usr/ucb/* ) ;;
4420 *)
4421 # OSF1 and SCO ODT 3.0 have their own names for install.
4422 # Don't use installbsd from OSF since it installs stuff as root
4423 # by default.
4424 for ac_prog in ginstall scoinst install; do
4425 for ac_exec_ext in '' $ac_executable_extensions; do
4426 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4427 if test $ac_prog = install &&
4428 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4429 # AIX install. It has an incompatible calling convention.
4430 :
4431 elif test $ac_prog = install &&
4432 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4433 # program-specific install script used by HP pwplus--don't use.
4434 :
4435 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004436 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4437 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004438 fi
4439 fi
4440 done
4441 done
4442 ;;
4443esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004444done
4445IFS=$as_save_IFS
4446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004447
4448fi
4449 if test "${ac_cv_path_install+set}" = set; then
4450 INSTALL=$ac_cv_path_install
4451 else
4452 # As a last resort, use the slow shell script. Don't cache a
4453 # value for INSTALL within a source directory, because that will
4454 # break other packages using the cache if that directory is
4455 # removed, or if the value is a relative name.
4456 INSTALL=$ac_install_sh
4457 fi
4458fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4460echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461
4462# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4463# It thinks the first close brace ends the variable substitution.
4464test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4465
4466test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4467
4468test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4469
4470
4471# Not every filesystem supports hard links
4472
4473if test -z "$LN" ; then
4474 case $ac_sys_system in
4475 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004476 *) LN=ln;;
4477 esac
4478fi
4479
4480# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004481{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4482echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004483
4484# Check whether --with-pydebug was given.
4485if test "${with_pydebug+set}" = set; then
4486 withval=$with_pydebug;
4487if test "$withval" != no
4488then
4489
4490cat >>confdefs.h <<\_ACEOF
4491#define Py_DEBUG 1
4492_ACEOF
4493
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004494 { echo "$as_me:$LINENO: result: yes" >&5
4495echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004496 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004497else { echo "$as_me:$LINENO: result: no" >&5
4498echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004499fi
4500else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004501 { echo "$as_me:$LINENO: result: no" >&5
4502echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004503fi
4504
4505
4506# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4507# merged with this chunk of code?
4508
4509# Optimizer/debugger flags
4510# ------------------------
4511# (The following bit of code is complicated enough - please keep things
4512# indented properly. Just pretend you're editing Python code. ;-)
4513
4514# There are two parallel sets of case statements below, one that checks to
4515# see if OPT was set and one that does BASECFLAGS setting based upon
4516# compiler and platform. BASECFLAGS tweaks need to be made even if the
4517# user set OPT.
4518
4519# tweak OPT based on compiler and platform, only if the user didn't set
4520# it on the command line
4521
4522if test -z "$OPT"
4523then
4524 case $GCC in
4525 yes)
4526 if test "$CC" != 'g++' ; then
4527 STRICT_PROTO="-Wstrict-prototypes"
4528 fi
4529 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4530 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4531 WRAP="-fwrapv"
4532 fi
4533 case $ac_cv_prog_cc_g in
4534 yes)
4535 if test "$Py_DEBUG" = 'true' ; then
4536 # Optimization messes up debuggers, so turn it off for
4537 # debug builds.
4538 OPT="-g -Wall $STRICT_PROTO"
4539 else
4540 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4541 fi
4542 ;;
4543 *)
4544 OPT="-O3 -Wall $STRICT_PROTO"
4545 ;;
4546 esac
4547 case $ac_sys_system in
4548 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4549 ;;
4550 esac
4551 ;;
4552
4553 *)
4554 OPT="-O"
4555 ;;
4556 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004557fi
4558
4559
4560
4561# The -arch flags for universal builds on OSX
4562UNIVERSAL_ARCH_FLAGS=
4563
4564
4565# tweak BASECFLAGS based on compiler and platform
4566case $GCC in
4567yes)
4568 # Python violates C99 rules, by casting between incompatible
4569 # pointer types. GCC may generate bad code as a result of that,
4570 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004571 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4572echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004573 ac_save_cc="$CC"
4574 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004575 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004576 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004577else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004578 cat >conftest.$ac_ext <<_ACEOF
4579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004584
4585int
4586main ()
4587{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004588int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004589 ;
4590 return 0;
4591}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004593rm -f conftest.$ac_objext
4594if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004601 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004602 grep -v '^ *+' conftest.er1 >conftest.err
4603 rm -f conftest.er1
4604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004606 (exit $ac_status); } && {
4607 test -z "$ac_c_werror_flag" ||
4608 test ! -s conftest.err
4609 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610 ac_cv_no_strict_aliasing_ok=yes
4611else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004612 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004613sed 's/^/| /' conftest.$ac_ext >&5
4614
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004615 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616fi
4617
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004619fi
4620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004622 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624 if test $ac_cv_no_strict_aliasing_ok = yes
4625 then
4626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4627 fi
4628
4629 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4630 # support. Without this, treatment of subnormals doesn't follow
4631 # the standard.
4632 case $ac_sys_machine in
4633 alpha*)
4634 BASECFLAGS="$BASECFLAGS -mieee"
4635 ;;
4636 esac
4637
4638 case $ac_sys_system in
4639 SCO_SV*)
4640 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4641 ;;
4642 # is there any other compiler on Darwin besides gcc?
4643 Darwin*)
4644 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4645 # used to be here, but non-Apple gcc doesn't accept them.
4646
4647
4648 if test "${enable_universalsdk}"; then
4649 UNIVERSAL_ARCH_FLAGS=""
4650 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4652 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004653 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654
Ronald Oussoren755740f2010-02-07 19:56:39 +00004655 # You have to use different flags on various versions of
4656 # OSX to extract PPC code from an universal binary, basically
4657 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4658 # newer.
4659 # Because '-arch pp7400' works on OSX 10.5 or higher this
4660 # test is only present in the '32-bit' branch, all other
4661 # branches require OSX 10.5 to compile.
4662
4663 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4664echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4665 FN="test.$$"
4666 cat >${FN}.c <<-EOF
4667 int main() { return 0; }
4668EOF
4669 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4670 if test $? != 0 ; then
4671 rm ${FN} ${FN}.c
4672 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4673echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4674 else
4675 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4676 if test $? != 0 ; then
4677 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4678 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4679echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4680 else
4681 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4682echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4683 fi
4684 rm -f ${FN} ${FN}.c ${FN}.out
4685 fi
4686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4688 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004689 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004690 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004691
4692 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4693 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004694 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004695 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004697 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4698 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004699 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004700 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004701
4702 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4703 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004704 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004705 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004708 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4709echo "$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 +00004710 { (exit 1); exit 1; }; }
4711
4712 fi
4713
4714
4715 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4716 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4717 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4718 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4719 fi
4720 fi
4721
4722 # Calculate the right deployment target for this build.
4723 #
4724 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4725 if test ${cur_target} '>' 10.2; then
4726 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004727 if test ${enable_universalsdk}; then
4728 if test "${UNIVERSAL_ARCHS}" = "all"; then
4729 # Ensure that the default platform for a
4730 # 4-way universal build is OSX 10.5,
4731 # that's the first OS release where
4732 # 4-way builds make sense.
4733 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004734
4735 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4736 cur_target='10.5'
4737
4738 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4739 cur_target='10.5'
4740
4741 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4742 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004743 fi
4744 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004745 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004746 # On Intel macs default to a deployment
4747 # target of 10.4, that's the first OSX
4748 # release with Intel support.
4749 cur_target="10.4"
4750 fi
4751 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752 fi
4753 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4754
4755 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4756 # environment with a value that is the same as what we'll use
4757 # in the Makefile to ensure that we'll get the same compiler
4758 # environment during configure and build time.
4759 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4760 export MACOSX_DEPLOYMENT_TARGET
4761 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4762
4763 ;;
4764 OSF*)
4765 BASECFLAGS="$BASECFLAGS -mieee"
4766 ;;
4767 esac
4768 ;;
4769
4770*)
4771 case $ac_sys_system in
4772 OpenUNIX*|UnixWare*)
4773 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4774 ;;
4775 OSF*)
4776 BASECFLAGS="$BASECFLAGS -ieee -std"
4777 ;;
4778 SCO_SV*)
4779 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4780 ;;
4781 esac
4782 ;;
4783esac
4784
4785if test "$Py_DEBUG" = 'true'; then
4786 :
4787else
4788 OPT="-DNDEBUG $OPT"
4789fi
4790
4791if test "$ac_arch_flags"
4792then
4793 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4794fi
4795
4796# disable check for icc since it seems to pass, but generates a warning
4797if test "$CC" = icc
4798then
4799 ac_cv_opt_olimit_ok=no
4800fi
4801
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004802{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4803echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004805 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806else
4807 ac_save_cc="$CC"
4808CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004809cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810/* confdefs.h. */
4811_ACEOF
4812cat confdefs.h >>conftest.$ac_ext
4813cat >>conftest.$ac_ext <<_ACEOF
4814/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004815
4816int
4817main ()
4818{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004820 ;
4821 return 0;
4822}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004824rm -f conftest.$ac_objext
4825if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826case "(($ac_try" in
4827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4828 *) ac_try_echo=$ac_try;;
4829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 grep -v '^ *+' conftest.er1 >conftest.err
4834 rm -f conftest.er1
4835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 (exit $ac_status); } && {
4838 test -z "$ac_c_werror_flag" ||
4839 test ! -s conftest.err
4840 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 ac_cv_opt_olimit_ok=yes
4842else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004843 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844sed 's/^/| /' conftest.$ac_ext >&5
4845
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004846 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
4848
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850CC="$ac_save_cc"
4851fi
4852
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004853{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4854echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855if test $ac_cv_opt_olimit_ok = yes; then
4856 case $ac_sys_system in
4857 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4858 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4859 # environment?
4860 Darwin*)
4861 ;;
4862 *)
4863 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4864 ;;
4865 esac
4866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004867 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4868echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004870 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871else
4872 ac_save_cc="$CC"
4873 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 cat >conftest.$ac_ext <<_ACEOF
4875/* confdefs.h. */
4876_ACEOF
4877cat confdefs.h >>conftest.$ac_ext
4878cat >>conftest.$ac_ext <<_ACEOF
4879/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004880
4881int
4882main ()
4883{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004885 ;
4886 return 0;
4887}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004889rm -f conftest.$ac_objext
4890if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891case "(($ac_try" in
4892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4893 *) ac_try_echo=$ac_try;;
4894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004896 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004898 grep -v '^ *+' conftest.er1 >conftest.err
4899 rm -f conftest.er1
4900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004902 (exit $ac_status); } && {
4903 test -z "$ac_c_werror_flag" ||
4904 test ! -s conftest.err
4905 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 ac_cv_olimit_ok=yes
4907else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004908 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909sed 's/^/| /' conftest.$ac_ext >&5
4910
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004911 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912fi
4913
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915 CC="$ac_save_cc"
4916fi
4917
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004918 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4919echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920 if test $ac_cv_olimit_ok = yes; then
4921 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4922 fi
4923fi
4924
4925# Check whether GCC supports PyArg_ParseTuple format
4926if test "$GCC" = "yes"
4927then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004928 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4929echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930 save_CFLAGS=$CFLAGS
4931 CFLAGS="$CFLAGS -Werror"
4932 cat >conftest.$ac_ext <<_ACEOF
4933/* confdefs.h. */
4934_ACEOF
4935cat confdefs.h >>conftest.$ac_ext
4936cat >>conftest.$ac_ext <<_ACEOF
4937/* end confdefs.h. */
4938
4939 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4940
4941int
4942main ()
4943{
4944
4945 ;
4946 return 0;
4947}
4948_ACEOF
4949rm -f conftest.$ac_objext
4950if { (ac_try="$ac_compile"
4951case "(($ac_try" in
4952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4953 *) ac_try_echo=$ac_try;;
4954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 (eval "$ac_compile") 2>conftest.er1
4957 ac_status=$?
4958 grep -v '^ *+' conftest.er1 >conftest.err
4959 rm -f conftest.er1
4960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 (exit $ac_status); } && {
4963 test -z "$ac_c_werror_flag" ||
4964 test ! -s conftest.err
4965 } && test -s conftest.$ac_objext; then
4966
4967cat >>confdefs.h <<\_ACEOF
4968#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4969_ACEOF
4970
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004971 { echo "$as_me:$LINENO: result: yes" >&5
4972echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004974 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975sed 's/^/| /' conftest.$ac_ext >&5
4976
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004977 { echo "$as_me:$LINENO: result: no" >&5
4978echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979
4980fi
4981
4982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4983 CFLAGS=$save_CFLAGS
4984fi
4985
4986# On some compilers, pthreads are available without further options
4987# (e.g. MacOS X). On some of these systems, the compiler will not
4988# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4989# So we have to see first whether pthreads are available without
4990# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004991{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4992echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004994 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995else
4996 if test "$cross_compiling" = yes; then
4997 ac_cv_pthread_is_default=no
4998else
4999 cat >conftest.$ac_ext <<_ACEOF
5000/* confdefs.h. */
5001_ACEOF
5002cat confdefs.h >>conftest.$ac_ext
5003cat >>conftest.$ac_ext <<_ACEOF
5004/* end confdefs.h. */
5005
5006#include <pthread.h>
5007
5008void* routine(void* p){return NULL;}
5009
5010int main(){
5011 pthread_t p;
5012 if(pthread_create(&p,NULL,routine,NULL)!=0)
5013 return 1;
5014 (void)pthread_detach(p);
5015 return 0;
5016}
5017
5018_ACEOF
5019rm -f conftest$ac_exeext
5020if { (ac_try="$ac_link"
5021case "(($ac_try" in
5022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5023 *) ac_try_echo=$ac_try;;
5024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 (eval "$ac_link") 2>&5
5027 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5030 { (case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 (eval "$ac_try") 2>&5
5036 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 (exit $ac_status); }; }; then
5039
5040 ac_cv_pthread_is_default=yes
5041 ac_cv_kthread=no
5042 ac_cv_pthread=no
5043
5044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045 echo "$as_me: program exited with status $ac_status" >&5
5046echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047sed 's/^/| /' conftest.$ac_ext >&5
5048
5049( exit $ac_status )
5050ac_cv_pthread_is_default=no
5051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5053fi
5054
5055
5056
5057fi
5058
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005059{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5060echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061
5062
5063if test $ac_cv_pthread_is_default = yes
5064then
5065 ac_cv_kpthread=no
5066else
5067# -Kpthread, if available, provides the right #defines
5068# and linker options to make pthread_create available
5069# Some compilers won't report that they do not support -Kpthread,
5070# so we need to run a program to see whether it really made the
5071# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005072{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5073echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005075 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076else
5077 ac_save_cc="$CC"
5078CC="$CC -Kpthread"
5079if test "$cross_compiling" = yes; then
5080 ac_cv_kpthread=no
5081else
5082 cat >conftest.$ac_ext <<_ACEOF
5083/* confdefs.h. */
5084_ACEOF
5085cat confdefs.h >>conftest.$ac_ext
5086cat >>conftest.$ac_ext <<_ACEOF
5087/* end confdefs.h. */
5088
5089#include <pthread.h>
5090
5091void* routine(void* p){return NULL;}
5092
5093int main(){
5094 pthread_t p;
5095 if(pthread_create(&p,NULL,routine,NULL)!=0)
5096 return 1;
5097 (void)pthread_detach(p);
5098 return 0;
5099}
5100
5101_ACEOF
5102rm -f conftest$ac_exeext
5103if { (ac_try="$ac_link"
5104case "(($ac_try" in
5105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5106 *) ac_try_echo=$ac_try;;
5107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 (eval "$ac_link") 2>&5
5110 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5113 { (case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 (eval "$ac_try") 2>&5
5119 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121 (exit $ac_status); }; }; then
5122 ac_cv_kpthread=yes
5123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005124 echo "$as_me: program exited with status $ac_status" >&5
5125echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126sed 's/^/| /' conftest.$ac_ext >&5
5127
5128( exit $ac_status )
5129ac_cv_kpthread=no
5130fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5132fi
5133
5134
5135CC="$ac_save_cc"
5136fi
5137
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5139echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140fi
5141
5142if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5143then
5144# -Kthread, if available, provides the right #defines
5145# and linker options to make pthread_create available
5146# Some compilers won't report that they do not support -Kthread,
5147# so we need to run a program to see whether it really made the
5148# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005149{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5150echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005152 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153else
5154 ac_save_cc="$CC"
5155CC="$CC -Kthread"
5156if test "$cross_compiling" = yes; then
5157 ac_cv_kthread=no
5158else
5159 cat >conftest.$ac_ext <<_ACEOF
5160/* confdefs.h. */
5161_ACEOF
5162cat confdefs.h >>conftest.$ac_ext
5163cat >>conftest.$ac_ext <<_ACEOF
5164/* end confdefs.h. */
5165
5166#include <pthread.h>
5167
5168void* routine(void* p){return NULL;}
5169
5170int main(){
5171 pthread_t p;
5172 if(pthread_create(&p,NULL,routine,NULL)!=0)
5173 return 1;
5174 (void)pthread_detach(p);
5175 return 0;
5176}
5177
5178_ACEOF
5179rm -f conftest$ac_exeext
5180if { (ac_try="$ac_link"
5181case "(($ac_try" in
5182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5183 *) ac_try_echo=$ac_try;;
5184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186 (eval "$ac_link") 2>&5
5187 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5190 { (case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195 (eval "$ac_try") 2>&5
5196 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198 (exit $ac_status); }; }; then
5199 ac_cv_kthread=yes
5200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201 echo "$as_me: program exited with status $ac_status" >&5
5202echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203sed 's/^/| /' conftest.$ac_ext >&5
5204
5205( exit $ac_status )
5206ac_cv_kthread=no
5207fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5209fi
5210
5211
5212CC="$ac_save_cc"
5213fi
5214
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005215{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5216echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217fi
5218
5219if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5220then
5221# -pthread, if available, provides the right #defines
5222# and linker options to make pthread_create available
5223# Some compilers won't report that they do not support -pthread,
5224# so we need to run a program to see whether it really made the
5225# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005226{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5227echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005229 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230else
5231 ac_save_cc="$CC"
5232CC="$CC -pthread"
5233if test "$cross_compiling" = yes; then
5234 ac_cv_pthread=no
5235else
5236 cat >conftest.$ac_ext <<_ACEOF
5237/* confdefs.h. */
5238_ACEOF
5239cat confdefs.h >>conftest.$ac_ext
5240cat >>conftest.$ac_ext <<_ACEOF
5241/* end confdefs.h. */
5242
5243#include <pthread.h>
5244
5245void* routine(void* p){return NULL;}
5246
5247int main(){
5248 pthread_t p;
5249 if(pthread_create(&p,NULL,routine,NULL)!=0)
5250 return 1;
5251 (void)pthread_detach(p);
5252 return 0;
5253}
5254
5255_ACEOF
5256rm -f conftest$ac_exeext
5257if { (ac_try="$ac_link"
5258case "(($ac_try" in
5259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5260 *) ac_try_echo=$ac_try;;
5261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263 (eval "$ac_link") 2>&5
5264 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5267 { (case "(($ac_try" in
5268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5269 *) ac_try_echo=$ac_try;;
5270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272 (eval "$ac_try") 2>&5
5273 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275 (exit $ac_status); }; }; then
5276 ac_cv_pthread=yes
5277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005278 echo "$as_me: program exited with status $ac_status" >&5
5279echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280sed 's/^/| /' conftest.$ac_ext >&5
5281
5282( exit $ac_status )
5283ac_cv_pthread=no
5284fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5286fi
5287
5288
5289CC="$ac_save_cc"
5290fi
5291
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005292{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5293echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294fi
5295
5296# If we have set a CC compiler flag for thread support then
5297# check if it works for CXX, too.
5298ac_cv_cxx_thread=no
5299if test ! -z "$CXX"
5300then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005301{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5302echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303ac_save_cxx="$CXX"
5304
5305if test "$ac_cv_kpthread" = "yes"
5306then
5307 CXX="$CXX -Kpthread"
5308 ac_cv_cxx_thread=yes
5309elif test "$ac_cv_kthread" = "yes"
5310then
5311 CXX="$CXX -Kthread"
5312 ac_cv_cxx_thread=yes
5313elif test "$ac_cv_pthread" = "yes"
5314then
5315 CXX="$CXX -pthread"
5316 ac_cv_cxx_thread=yes
5317fi
5318
5319if test $ac_cv_cxx_thread = yes
5320then
5321 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5322 $CXX -c conftest.$ac_ext 2>&5
5323 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5324 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5325 then
5326 ac_cv_cxx_thread=yes
5327 else
5328 ac_cv_cxx_thread=no
5329 fi
5330 rm -fr conftest*
5331fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005332{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5333echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
5335CXX="$ac_save_cxx"
5336
5337
5338# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005339{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5340echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005342 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343else
5344 cat >conftest.$ac_ext <<_ACEOF
5345/* confdefs.h. */
5346_ACEOF
5347cat confdefs.h >>conftest.$ac_ext
5348cat >>conftest.$ac_ext <<_ACEOF
5349/* end confdefs.h. */
5350#include <stdlib.h>
5351#include <stdarg.h>
5352#include <string.h>
5353#include <float.h>
5354
5355int
5356main ()
5357{
5358
5359 ;
5360 return 0;
5361}
5362_ACEOF
5363rm -f conftest.$ac_objext
5364if { (ac_try="$ac_compile"
5365case "(($ac_try" in
5366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5367 *) ac_try_echo=$ac_try;;
5368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370 (eval "$ac_compile") 2>conftest.er1
5371 ac_status=$?
5372 grep -v '^ *+' conftest.er1 >conftest.err
5373 rm -f conftest.er1
5374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 (exit $ac_status); } && {
5377 test -z "$ac_c_werror_flag" ||
5378 test ! -s conftest.err
5379 } && test -s conftest.$ac_objext; then
5380 ac_cv_header_stdc=yes
5381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005382 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383sed 's/^/| /' conftest.$ac_ext >&5
5384
5385 ac_cv_header_stdc=no
5386fi
5387
5388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5389
5390if test $ac_cv_header_stdc = yes; then
5391 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5392 cat >conftest.$ac_ext <<_ACEOF
5393/* confdefs.h. */
5394_ACEOF
5395cat confdefs.h >>conftest.$ac_ext
5396cat >>conftest.$ac_ext <<_ACEOF
5397/* end confdefs.h. */
5398#include <string.h>
5399
5400_ACEOF
5401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5402 $EGREP "memchr" >/dev/null 2>&1; then
5403 :
5404else
5405 ac_cv_header_stdc=no
5406fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00005407rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408
5409fi
5410
5411if test $ac_cv_header_stdc = yes; then
5412 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5413 cat >conftest.$ac_ext <<_ACEOF
5414/* confdefs.h. */
5415_ACEOF
5416cat confdefs.h >>conftest.$ac_ext
5417cat >>conftest.$ac_ext <<_ACEOF
5418/* end confdefs.h. */
5419#include <stdlib.h>
5420
5421_ACEOF
5422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5423 $EGREP "free" >/dev/null 2>&1; then
5424 :
5425else
5426 ac_cv_header_stdc=no
5427fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00005428rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429
5430fi
5431
5432if test $ac_cv_header_stdc = yes; then
5433 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5434 if test "$cross_compiling" = yes; then
5435 :
5436else
5437 cat >conftest.$ac_ext <<_ACEOF
5438/* confdefs.h. */
5439_ACEOF
5440cat confdefs.h >>conftest.$ac_ext
5441cat >>conftest.$ac_ext <<_ACEOF
5442/* end confdefs.h. */
5443#include <ctype.h>
5444#include <stdlib.h>
5445#if ((' ' & 0x0FF) == 0x020)
5446# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5447# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5448#else
5449# define ISLOWER(c) \
5450 (('a' <= (c) && (c) <= 'i') \
5451 || ('j' <= (c) && (c) <= 'r') \
5452 || ('s' <= (c) && (c) <= 'z'))
5453# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5454#endif
5455
5456#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5457int
5458main ()
5459{
5460 int i;
5461 for (i = 0; i < 256; i++)
5462 if (XOR (islower (i), ISLOWER (i))
5463 || toupper (i) != TOUPPER (i))
5464 return 2;
5465 return 0;
5466}
5467_ACEOF
5468rm -f conftest$ac_exeext
5469if { (ac_try="$ac_link"
5470case "(($ac_try" in
5471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5472 *) ac_try_echo=$ac_try;;
5473esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475 (eval "$ac_link") 2>&5
5476 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5479 { (case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484 (eval "$ac_try") 2>&5
5485 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 (exit $ac_status); }; }; then
5488 :
5489else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005490 echo "$as_me: program exited with status $ac_status" >&5
5491echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492sed 's/^/| /' conftest.$ac_ext >&5
5493
5494( exit $ac_status )
5495ac_cv_header_stdc=no
5496fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5498fi
5499
5500
5501fi
5502fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5504echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505if test $ac_cv_header_stdc = yes; then
5506
5507cat >>confdefs.h <<\_ACEOF
5508#define STDC_HEADERS 1
5509_ACEOF
5510
5511fi
5512
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005513# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5524 inttypes.h stdint.h unistd.h
5525do
5526as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5527{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5528echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5529if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5530 echo $ECHO_N "(cached) $ECHO_C" >&6
5531else
5532 cat >conftest.$ac_ext <<_ACEOF
5533/* confdefs.h. */
5534_ACEOF
5535cat confdefs.h >>conftest.$ac_ext
5536cat >>conftest.$ac_ext <<_ACEOF
5537/* end confdefs.h. */
5538$ac_includes_default
5539
5540#include <$ac_header>
5541_ACEOF
5542rm -f conftest.$ac_objext
5543if { (ac_try="$ac_compile"
5544case "(($ac_try" in
5545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5546 *) ac_try_echo=$ac_try;;
5547esac
5548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5549 (eval "$ac_compile") 2>conftest.er1
5550 ac_status=$?
5551 grep -v '^ *+' conftest.er1 >conftest.err
5552 rm -f conftest.er1
5553 cat conftest.err >&5
5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555 (exit $ac_status); } && {
5556 test -z "$ac_c_werror_flag" ||
5557 test ! -s conftest.err
5558 } && test -s conftest.$ac_objext; then
5559 eval "$as_ac_Header=yes"
5560else
5561 echo "$as_me: failed program was:" >&5
5562sed 's/^/| /' conftest.$ac_ext >&5
5563
5564 eval "$as_ac_Header=no"
5565fi
5566
5567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568fi
5569ac_res=`eval echo '${'$as_ac_Header'}'`
5570 { echo "$as_me:$LINENO: result: $ac_res" >&5
5571echo "${ECHO_T}$ac_res" >&6; }
5572if test `eval echo '${'$as_ac_Header'}'` = yes; then
5573 cat >>confdefs.h <<_ACEOF
5574#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5575_ACEOF
5576
5577fi
5578
5579done
5580
5581
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582
Martin v. Löwis11437992002-04-12 09:54:03 +00005583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
Anthony Baxter8a560de2004-10-13 15:30:56 +00005618
Martin v. Löwisc3001752005-01-23 09:27:24 +00005619
Martin v. Löwis11017b12006-01-14 18:12:57 +00005620
Thomas Wouters477c8d52006-05-27 19:21:47 +00005621
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005622
5623
5624
5625
5626
5627
5628
5629
Thomas Wouters89f507f2006-12-13 04:49:30 +00005630
Christian Heimes043d6f62008-01-07 17:19:16 +00005631
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005632
5633
Christian Heimesbbe741d2008-03-28 10:53:29 +00005634
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005635
Ronald Oussoren755740f2010-02-07 19:56:39 +00005636
5637
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005638for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5639fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005640ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005641shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005642unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005643sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5644sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005645sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005646sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005647sys/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 +00005648sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005649bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005650do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005653 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5654echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005655if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005656 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005657fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658ac_res=`eval echo '${'$as_ac_Header'}'`
5659 { echo "$as_me:$LINENO: result: $ac_res" >&5
5660echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005661else
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005663{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5664echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005666/* confdefs.h. */
5667_ACEOF
5668cat confdefs.h >>conftest.$ac_ext
5669cat >>conftest.$ac_ext <<_ACEOF
5670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005671$ac_includes_default
5672#include <$ac_header>
5673_ACEOF
5674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005675if { (ac_try="$ac_compile"
5676case "(($ac_try" in
5677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5678 *) ac_try_echo=$ac_try;;
5679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 grep -v '^ *+' conftest.er1 >conftest.err
5684 rm -f conftest.er1
5685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005687 (exit $ac_status); } && {
5688 test -z "$ac_c_werror_flag" ||
5689 test ! -s conftest.err
5690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005691 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005694sed 's/^/| /' conftest.$ac_ext >&5
5695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005698
5699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005700{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5701echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005702
5703# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5705echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005707/* confdefs.h. */
5708_ACEOF
5709cat confdefs.h >>conftest.$ac_ext
5710cat >>conftest.$ac_ext <<_ACEOF
5711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005712#include <$ac_header>
5713_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005714if { (ac_try="$ac_cpp conftest.$ac_ext"
5715case "(($ac_try" in
5716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5717 *) ac_try_echo=$ac_try;;
5718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005720 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005721 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005722 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 rm -f conftest.er1
5724 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005726 (exit $ac_status); } >/dev/null && {
5727 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5728 test ! -s conftest.err
5729 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 ac_header_preproc=yes
5731else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005733sed 's/^/| /' conftest.$ac_ext >&5
5734
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005737
Martin v. Löwis11437992002-04-12 09:54:03 +00005738rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005739{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5740echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005741
5742# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005743case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5744 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005745 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5746echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5747 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5748echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005749 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005750 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005752 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5753echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5754 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5755echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5757echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5759echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5761echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5763echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005764 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005765## -------------------------------------- ##
5766## Report this to http://bugs.python.org/ ##
5767## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005768_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005770 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005772{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005775 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005776else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005779ac_res=`eval echo '${'$as_ac_Header'}'`
5780 { echo "$as_me:$LINENO: result: $ac_res" >&5
5781echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005782
5783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005786#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005787_ACEOF
5788
5789fi
5790
Guido van Rossum627b2d71993-12-24 10:39:16 +00005791done
5792
Martin v. Löwis11437992002-04-12 09:54:03 +00005793
5794
5795
5796
5797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005798ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005799for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005800 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5801{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5802echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005803if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005805else
Martin v. Löwis11437992002-04-12 09:54:03 +00005806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005807/* confdefs.h. */
5808_ACEOF
5809cat confdefs.h >>conftest.$ac_ext
5810cat >>conftest.$ac_ext <<_ACEOF
5811/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812#include <sys/types.h>
5813#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005814
Martin v. Löwis11437992002-04-12 09:54:03 +00005815int
5816main ()
5817{
5818if ((DIR *) 0)
5819return 0;
5820 ;
5821 return 0;
5822}
5823_ACEOF
5824rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825if { (ac_try="$ac_compile"
5826case "(($ac_try" in
5827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5828 *) ac_try_echo=$ac_try;;
5829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005833 grep -v '^ *+' conftest.er1 >conftest.err
5834 rm -f conftest.er1
5835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837 (exit $ac_status); } && {
5838 test -z "$ac_c_werror_flag" ||
5839 test ! -s conftest.err
5840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005844sed 's/^/| /' conftest.$ac_ext >&5
5845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005851ac_res=`eval echo '${'$as_ac_Header'}'`
5852 { echo "$as_me:$LINENO: result: $ac_res" >&5
5853echo "${ECHO_T}$ac_res" >&6; }
5854if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005855 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005856#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005857_ACEOF
5858
5859ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862done
5863# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5864if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005865 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5866echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005867if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005869else
Martin v. Löwis11437992002-04-12 09:54:03 +00005870 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005872/* confdefs.h. */
5873_ACEOF
5874cat confdefs.h >>conftest.$ac_ext
5875cat >>conftest.$ac_ext <<_ACEOF
5876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005878/* Override any GCC internal prototype to avoid an error.
5879 Use char because int might match the return type of a GCC
5880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005881#ifdef __cplusplus
5882extern "C"
5883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005884char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005885int
5886main ()
5887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005888return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005889 ;
5890 return 0;
5891}
5892_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005893for ac_lib in '' dir; do
5894 if test -z "$ac_lib"; then
5895 ac_res="none required"
5896 else
5897 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005898 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005899 fi
5900 rm -f conftest.$ac_objext conftest$ac_exeext
5901if { (ac_try="$ac_link"
5902case "(($ac_try" in
5903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5904 *) ac_try_echo=$ac_try;;
5905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005907 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005908 ac_status=$?
5909 grep -v '^ *+' conftest.er1 >conftest.err
5910 rm -f conftest.er1
5911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005913 (exit $ac_status); } && {
5914 test -z "$ac_c_werror_flag" ||
5915 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005916 } && test -s conftest$ac_exeext &&
5917 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005918 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005920 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005921sed 's/^/| /' conftest.$ac_ext >&5
5922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923
Thomas Wouters477c8d52006-05-27 19:21:47 +00005924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005925
5926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5927 conftest$ac_exeext
5928 if test "${ac_cv_search_opendir+set}" = set; then
5929 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005931done
5932if test "${ac_cv_search_opendir+set}" = set; then
5933 :
5934else
5935 ac_cv_search_opendir=no
5936fi
5937rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005938LIBS=$ac_func_search_save_LIBS
5939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005940{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5941echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942ac_res=$ac_cv_search_opendir
5943if test "$ac_res" != no; then
5944 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005947
Michael W. Hudson54241132001-12-07 15:38:26 +00005948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005949 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5950echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005951if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005953else
5954 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005962/* Override any GCC internal prototype to avoid an error.
5963 Use char because int might match the return type of a GCC
5964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005965#ifdef __cplusplus
5966extern "C"
5967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005968char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005969int
5970main ()
5971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005972return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005973 ;
5974 return 0;
5975}
5976_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005977for ac_lib in '' x; do
5978 if test -z "$ac_lib"; then
5979 ac_res="none required"
5980 else
5981 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005983 fi
5984 rm -f conftest.$ac_objext conftest$ac_exeext
5985if { (ac_try="$ac_link"
5986case "(($ac_try" in
5987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5988 *) ac_try_echo=$ac_try;;
5989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005991 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005992 ac_status=$?
5993 grep -v '^ *+' conftest.er1 >conftest.err
5994 rm -f conftest.er1
5995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005997 (exit $ac_status); } && {
5998 test -z "$ac_c_werror_flag" ||
5999 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006000 } && test -s conftest$ac_exeext &&
6001 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006002 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006003else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006004 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006005sed 's/^/| /' conftest.$ac_ext >&5
6006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006007
Thomas Wouters477c8d52006-05-27 19:21:47 +00006008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009
6010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6011 conftest$ac_exeext
6012 if test "${ac_cv_search_opendir+set}" = set; then
6013 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006015done
6016if test "${ac_cv_search_opendir+set}" = set; then
6017 :
6018else
6019 ac_cv_search_opendir=no
6020fi
6021rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006022LIBS=$ac_func_search_save_LIBS
6023fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006024{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6025echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026ac_res=$ac_cv_search_opendir
6027if test "$ac_res" != no; then
6028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006030fi
6031
6032fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006034{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6035echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006037 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038else
6039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046int
6047main ()
6048{
6049return makedev(0, 0);
6050 ;
6051 return 0;
6052}
6053_ACEOF
6054rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055if { (ac_try="$ac_link"
6056case "(($ac_try" in
6057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6058 *) ac_try_echo=$ac_try;;
6059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006061 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006063 grep -v '^ *+' conftest.er1 >conftest.err
6064 rm -f conftest.er1
6065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006067 (exit $ac_status); } && {
6068 test -z "$ac_c_werror_flag" ||
6069 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070 } && test -s conftest$ac_exeext &&
6071 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072 ac_cv_header_sys_types_h_makedev=yes
6073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006075sed 's/^/| /' conftest.$ac_ext >&5
6076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079
6080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082
6083fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006084{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6085echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087if test $ac_cv_header_sys_types_h_makedev = no; then
6088if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006089 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6090echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006094{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6095echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096else
6097 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006098{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6099echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006101/* confdefs.h. */
6102_ACEOF
6103cat confdefs.h >>conftest.$ac_ext
6104cat >>conftest.$ac_ext <<_ACEOF
6105/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106$ac_includes_default
6107#include <sys/mkdev.h>
6108_ACEOF
6109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110if { (ac_try="$ac_compile"
6111case "(($ac_try" in
6112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6113 *) ac_try_echo=$ac_try;;
6114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118 grep -v '^ *+' conftest.er1 >conftest.err
6119 rm -f conftest.er1
6120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122 (exit $ac_status); } && {
6123 test -z "$ac_c_werror_flag" ||
6124 test ! -s conftest.err
6125 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126 ac_header_compiler=yes
6127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006129sed 's/^/| /' conftest.$ac_ext >&5
6130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133
6134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006135{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6136echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137
6138# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6140echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006142/* confdefs.h. */
6143_ACEOF
6144cat confdefs.h >>conftest.$ac_ext
6145cat >>conftest.$ac_ext <<_ACEOF
6146/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147#include <sys/mkdev.h>
6148_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149if { (ac_try="$ac_cpp conftest.$ac_ext"
6150case "(($ac_try" in
6151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6152 *) ac_try_echo=$ac_try;;
6153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006157 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 rm -f conftest.er1
6159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006161 (exit $ac_status); } >/dev/null && {
6162 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6163 test ! -s conftest.err
6164 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 ac_header_preproc=yes
6166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006168sed 's/^/| /' conftest.$ac_ext >&5
6169
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170 ac_header_preproc=no
6171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006174{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6175echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176
6177# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006178case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6179 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006180 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6181echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006185 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6188echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006200## -------------------------------------- ##
6201## Report this to http://bugs.python.org/ ##
6202## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006203_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006205 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006207{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6208echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211else
6212 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6213fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006214{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6215echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216
6217fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006218if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219
6220cat >>confdefs.h <<\_ACEOF
6221#define MAJOR_IN_MKDEV 1
6222_ACEOF
6223
6224fi
6225
6226
6227
6228 if test $ac_cv_header_sys_mkdev_h = no; then
6229 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006230 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6231echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006233 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006235{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6236echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237else
6238 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006239{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6240echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247$ac_includes_default
6248#include <sys/sysmacros.h>
6249_ACEOF
6250rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251if { (ac_try="$ac_compile"
6252case "(($ac_try" in
6253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6254 *) ac_try_echo=$ac_try;;
6255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259 grep -v '^ *+' conftest.er1 >conftest.err
6260 rm -f conftest.er1
6261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006263 (exit $ac_status); } && {
6264 test -z "$ac_c_werror_flag" ||
6265 test ! -s conftest.err
6266 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267 ac_header_compiler=yes
6268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006270sed 's/^/| /' conftest.$ac_ext >&5
6271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274
6275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006276{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6277echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278
6279# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6281echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* confdefs.h. */
6284_ACEOF
6285cat confdefs.h >>conftest.$ac_ext
6286cat >>conftest.$ac_ext <<_ACEOF
6287/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288#include <sys/sysmacros.h>
6289_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290if { (ac_try="$ac_cpp conftest.$ac_ext"
6291case "(($ac_try" in
6292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6293 *) ac_try_echo=$ac_try;;
6294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006296 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006298 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 rm -f conftest.er1
6300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006302 (exit $ac_status); } >/dev/null && {
6303 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6304 test ! -s conftest.err
6305 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 ac_header_preproc=yes
6307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006309sed 's/^/| /' conftest.$ac_ext >&5
6310
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311 ac_header_preproc=no
6312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006313
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006315{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6316echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317
6318# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006319case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6320 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006321 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6322echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006326 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6329echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006340 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006341## -------------------------------------- ##
6342## Report this to http://bugs.python.org/ ##
6343## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006344_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006345 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006346 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006348{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6349echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006351 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352else
6353 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6354fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006355{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6356echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006359if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360
6361cat >>confdefs.h <<\_ACEOF
6362#define MAJOR_IN_SYSMACROS 1
6363_ACEOF
6364
6365fi
6366
6367
6368 fi
6369fi
6370
Michael W. Hudson54241132001-12-07 15:38:26 +00006371
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373
6374for ac_header in term.h
6375do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006376as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6377{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6378echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006380 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381else
6382 cat >conftest.$ac_ext <<_ACEOF
6383/* confdefs.h. */
6384_ACEOF
6385cat confdefs.h >>conftest.$ac_ext
6386cat >>conftest.$ac_ext <<_ACEOF
6387/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006389#ifdef HAVE_CURSES_H
6390#include <curses.h>
6391#endif
6392
6393
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395_ACEOF
6396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397if { (ac_try="$ac_compile"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006413 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006415 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416sed 's/^/| /' conftest.$ac_ext >&5
6417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423ac_res=`eval echo '${'$as_ac_Header'}'`
6424 { echo "$as_me:$LINENO: result: $ac_res" >&5
6425echo "${ECHO_T}$ac_res" >&6; }
6426if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006427 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006429_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006431fi
6432
6433done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006434
6435
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436# On Linux, netlink.h requires asm/types.h
6437
6438for ac_header in linux/netlink.h
6439do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006440as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6441{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006443if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006444 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445else
6446 cat >conftest.$ac_ext <<_ACEOF
6447/* confdefs.h. */
6448_ACEOF
6449cat confdefs.h >>conftest.$ac_ext
6450cat >>conftest.$ac_ext <<_ACEOF
6451/* end confdefs.h. */
6452
6453#ifdef HAVE_ASM_TYPES_H
6454#include <asm/types.h>
6455#endif
6456#ifdef HAVE_SYS_SOCKET_H
6457#include <sys/socket.h>
6458#endif
6459
6460
6461#include <$ac_header>
6462_ACEOF
6463rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464if { (ac_try="$ac_compile"
6465case "(($ac_try" in
6466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6467 *) ac_try_echo=$ac_try;;
6468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471 ac_status=$?
6472 grep -v '^ *+' conftest.er1 >conftest.err
6473 rm -f conftest.er1
6474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006476 (exit $ac_status); } && {
6477 test -z "$ac_c_werror_flag" ||
6478 test ! -s conftest.err
6479 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480 eval "$as_ac_Header=yes"
6481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006482 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006483sed 's/^/| /' conftest.$ac_ext >&5
6484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487
6488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006490ac_res=`eval echo '${'$as_ac_Header'}'`
6491 { echo "$as_me:$LINENO: result: $ac_res" >&5
6492echo "${ECHO_T}$ac_res" >&6; }
6493if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006494 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496_ACEOF
6497
6498fi
6499
6500done
6501
6502
Guido van Rossum627b2d71993-12-24 10:39:16 +00006503# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006504was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006505{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6506echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006508/* confdefs.h. */
6509_ACEOF
6510cat confdefs.h >>conftest.$ac_ext
6511cat >>conftest.$ac_ext <<_ACEOF
6512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006513#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006514
6515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006517 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006518 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521
6522cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006524_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006526
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00006528rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006530{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6531echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006532
Neal Norwitz11690112002-07-30 01:08:28 +00006533# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006534{ echo "$as_me:$LINENO: checking for makedev" >&5
6535echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* confdefs.h. */
6538_ACEOF
6539cat confdefs.h >>conftest.$ac_ext
6540cat >>conftest.$ac_ext <<_ACEOF
6541/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006542#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006543int
6544main ()
6545{
6546 makedev(0, 0)
6547 ;
6548 return 0;
6549}
6550_ACEOF
6551rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552if { (ac_try="$ac_link"
6553case "(($ac_try" in
6554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6555 *) ac_try_echo=$ac_try;;
6556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006558 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006560 grep -v '^ *+' conftest.er1 >conftest.err
6561 rm -f conftest.er1
6562 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564 (exit $ac_status); } && {
6565 test -z "$ac_c_werror_flag" ||
6566 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006567 } && test -s conftest$ac_exeext &&
6568 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006569 ac_cv_has_makedev=yes
6570else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006572sed 's/^/| /' conftest.$ac_ext >&5
6573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576
6577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006578 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006579if test "$ac_cv_has_makedev" = "no"; then
6580 # we didn't link, try if _OSF_SOURCE will allow us to link
6581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006587
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006588#define _OSF_SOURCE 1
6589#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006590
Neal Norwitz11690112002-07-30 01:08:28 +00006591int
6592main ()
6593{
6594 makedev(0, 0)
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006600if { (ac_try="$ac_link"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 (exit $ac_status); } && {
6613 test -z "$ac_c_werror_flag" ||
6614 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006615 } && test -s conftest$ac_exeext &&
6616 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006617 ac_cv_has_makedev=yes
6618else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006620sed 's/^/| /' conftest.$ac_ext >&5
6621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624
6625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006626 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006627 if test "$ac_cv_has_makedev" = "yes"; then
6628
6629cat >>confdefs.h <<\_ACEOF
6630#define _OSF_SOURCE 1
6631_ACEOF
6632
6633 fi
6634fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006635{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6636echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006637if test "$ac_cv_has_makedev" = "yes"; then
6638
6639cat >>confdefs.h <<\_ACEOF
6640#define HAVE_MAKEDEV 1
6641_ACEOF
6642
6643fi
6644
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6646# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6647# defined, but the compiler does not support pragma redefine_extname,
6648# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6649# structures (such as rlimit64) without declaring them. As a
6650# work-around, disable LFS on such configurations
6651
6652use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006653{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6654echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661
6662#define _LARGEFILE_SOURCE 1
6663#define _FILE_OFFSET_BITS 64
6664#include <sys/resource.h>
6665
Martin v. Löwis399a6892002-10-04 10:22:02 +00006666int
6667main ()
6668{
6669struct rlimit foo;
6670 ;
6671 return 0;
6672}
6673_ACEOF
6674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675if { (ac_try="$ac_compile"
6676case "(($ac_try" in
6677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6678 *) ac_try_echo=$ac_try;;
6679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006683 grep -v '^ *+' conftest.er1 >conftest.err
6684 rm -f conftest.er1
6685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687 (exit $ac_status); } && {
6688 test -z "$ac_c_werror_flag" ||
6689 test ! -s conftest.err
6690 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006691 sol_lfs_bug=no
6692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006694sed 's/^/| /' conftest.$ac_ext >&5
6695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698
6699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006700{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6701echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006702if test "$sol_lfs_bug" = "yes"; then
6703 use_lfs=no
6704fi
6705
6706if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006707# Two defines needed to enable largefile support on various platforms
6708# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710cat >>confdefs.h <<\_ACEOF
6711#define _LARGEFILE_SOURCE 1
6712_ACEOF
6713
6714
6715cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006716#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006717_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006718
Martin v. Löwis399a6892002-10-04 10:22:02 +00006719fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006720
Guido van Rossum84e7b241996-08-19 21:59:00 +00006721# Add some code to confdefs.h so that the test for off_t works on SCO
6722cat >> confdefs.h <<\EOF
6723#if defined(SCO_DS)
6724#undef _OFF_T
6725#endif
6726EOF
6727
Guido van Rossumef2255b2000-03-10 22:30:29 +00006728# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006729{ echo "$as_me:$LINENO: checking for mode_t" >&5
6730echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006731if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006733else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006734 cat >conftest.$ac_ext <<_ACEOF
6735/* confdefs.h. */
6736_ACEOF
6737cat confdefs.h >>conftest.$ac_ext
6738cat >>conftest.$ac_ext <<_ACEOF
6739/* end confdefs.h. */
6740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006741typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006742int
6743main ()
6744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006745if ((ac__type_new_ *) 0)
6746 return 0;
6747if (sizeof (ac__type_new_))
6748 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006749 ;
6750 return 0;
6751}
6752_ACEOF
6753rm -f conftest.$ac_objext
6754if { (ac_try="$ac_compile"
6755case "(($ac_try" in
6756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6757 *) ac_try_echo=$ac_try;;
6758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006760 (eval "$ac_compile") 2>conftest.er1
6761 ac_status=$?
6762 grep -v '^ *+' conftest.er1 >conftest.err
6763 rm -f conftest.er1
6764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006766 (exit $ac_status); } && {
6767 test -z "$ac_c_werror_flag" ||
6768 test ! -s conftest.err
6769 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006773sed 's/^/| /' conftest.$ac_ext >&5
6774
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006775 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777
6778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006779fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006780{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6781echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6782if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006784else
Martin v. Löwis11437992002-04-12 09:54:03 +00006785
6786cat >>confdefs.h <<_ACEOF
6787#define mode_t int
6788_ACEOF
6789
6790fi
6791
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006792{ echo "$as_me:$LINENO: checking for off_t" >&5
6793echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006794if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006796else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006797 cat >conftest.$ac_ext <<_ACEOF
6798/* confdefs.h. */
6799_ACEOF
6800cat confdefs.h >>conftest.$ac_ext
6801cat >>conftest.$ac_ext <<_ACEOF
6802/* end confdefs.h. */
6803$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006804typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006805int
6806main ()
6807{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006808if ((ac__type_new_ *) 0)
6809 return 0;
6810if (sizeof (ac__type_new_))
6811 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006812 ;
6813 return 0;
6814}
6815_ACEOF
6816rm -f conftest.$ac_objext
6817if { (ac_try="$ac_compile"
6818case "(($ac_try" in
6819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6820 *) ac_try_echo=$ac_try;;
6821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006823 (eval "$ac_compile") 2>conftest.er1
6824 ac_status=$?
6825 grep -v '^ *+' conftest.er1 >conftest.err
6826 rm -f conftest.er1
6827 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006829 (exit $ac_status); } && {
6830 test -z "$ac_c_werror_flag" ||
6831 test ! -s conftest.err
6832 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006836sed 's/^/| /' conftest.$ac_ext >&5
6837
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006838 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840
6841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006842fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006843{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6844echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6845if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006846 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847else
Martin v. Löwis11437992002-04-12 09:54:03 +00006848
6849cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006851_ACEOF
6852
6853fi
6854
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006855{ echo "$as_me:$LINENO: checking for pid_t" >&5
6856echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006857if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006860 cat >conftest.$ac_ext <<_ACEOF
6861/* confdefs.h. */
6862_ACEOF
6863cat confdefs.h >>conftest.$ac_ext
6864cat >>conftest.$ac_ext <<_ACEOF
6865/* end confdefs.h. */
6866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006867typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006868int
6869main ()
6870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006871if ((ac__type_new_ *) 0)
6872 return 0;
6873if (sizeof (ac__type_new_))
6874 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006875 ;
6876 return 0;
6877}
6878_ACEOF
6879rm -f conftest.$ac_objext
6880if { (ac_try="$ac_compile"
6881case "(($ac_try" in
6882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6883 *) ac_try_echo=$ac_try;;
6884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006886 (eval "$ac_compile") 2>conftest.er1
6887 ac_status=$?
6888 grep -v '^ *+' conftest.er1 >conftest.err
6889 rm -f conftest.er1
6890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006892 (exit $ac_status); } && {
6893 test -z "$ac_c_werror_flag" ||
6894 test ! -s conftest.err
6895 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006896 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006899sed 's/^/| /' conftest.$ac_ext >&5
6900
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006901 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006905fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6907echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6908if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006909 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910else
Martin v. Löwis11437992002-04-12 09:54:03 +00006911
6912cat >>confdefs.h <<_ACEOF
6913#define pid_t int
6914_ACEOF
6915
6916fi
6917
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006918{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6919echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006920if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006922else
6923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006924/* confdefs.h. */
6925_ACEOF
6926cat confdefs.h >>conftest.$ac_ext
6927cat >>conftest.$ac_ext <<_ACEOF
6928/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006929#include <sys/types.h>
6930#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941if { (ac_try="$ac_compile"
6942case "(($ac_try" in
6943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6944 *) ac_try_echo=$ac_try;;
6945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006949 grep -v '^ *+' conftest.er1 >conftest.err
6950 rm -f conftest.er1
6951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953 (exit $ac_status); } && {
6954 test -z "$ac_c_werror_flag" ||
6955 test ! -s conftest.err
6956 } && test -s conftest.$ac_objext; then
6957 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006960sed 's/^/| /' conftest.$ac_ext >&5
6961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964
6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006966fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006967{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6968echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006971#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006973
Michael W. Hudson54241132001-12-07 15:38:26 +00006974
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006975{ echo "$as_me:$LINENO: checking for size_t" >&5
6976echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006977if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006980 cat >conftest.$ac_ext <<_ACEOF
6981/* confdefs.h. */
6982_ACEOF
6983cat confdefs.h >>conftest.$ac_ext
6984cat >>conftest.$ac_ext <<_ACEOF
6985/* end confdefs.h. */
6986$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006987typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006988int
6989main ()
6990{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006991if ((ac__type_new_ *) 0)
6992 return 0;
6993if (sizeof (ac__type_new_))
6994 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006995 ;
6996 return 0;
6997}
6998_ACEOF
6999rm -f conftest.$ac_objext
7000if { (ac_try="$ac_compile"
7001case "(($ac_try" in
7002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7003 *) ac_try_echo=$ac_try;;
7004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007006 (eval "$ac_compile") 2>conftest.er1
7007 ac_status=$?
7008 grep -v '^ *+' conftest.er1 >conftest.err
7009 rm -f conftest.er1
7010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007012 (exit $ac_status); } && {
7013 test -z "$ac_c_werror_flag" ||
7014 test ! -s conftest.err
7015 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007016 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007019sed 's/^/| /' conftest.$ac_ext >&5
7020
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007021 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023
7024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007026{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7027echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7028if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007029 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007030else
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
7032cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007034_ACEOF
7035
7036fi
7037
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007038{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7039echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007040if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007042else
7043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007044/* confdefs.h. */
7045_ACEOF
7046cat confdefs.h >>conftest.$ac_ext
7047cat >>conftest.$ac_ext <<_ACEOF
7048/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007049#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007050
7051_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007053 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054 ac_cv_type_uid_t=yes
7055else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056 ac_cv_type_uid_t=no
7057fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00007058rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007061{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7062echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007063if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065cat >>confdefs.h <<\_ACEOF
7066#define uid_t int
7067_ACEOF
7068
7069
7070cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073
7074fi
7075
Mark Dickinsonbd792642009-03-18 20:06:12 +00007076
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007077 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7078echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007079if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007080 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081else
7082 ac_cv_c_uint32_t=no
7083 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7084 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7085 cat >conftest.$ac_ext <<_ACEOF
7086/* confdefs.h. */
7087_ACEOF
7088cat confdefs.h >>conftest.$ac_ext
7089cat >>conftest.$ac_ext <<_ACEOF
7090/* end confdefs.h. */
7091$ac_includes_default
7092int
7093main ()
7094{
7095static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7096test_array [0] = 0
7097
7098 ;
7099 return 0;
7100}
7101_ACEOF
7102rm -f conftest.$ac_objext
7103if { (ac_try="$ac_compile"
7104case "(($ac_try" in
7105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7106 *) ac_try_echo=$ac_try;;
7107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007109 (eval "$ac_compile") 2>conftest.er1
7110 ac_status=$?
7111 grep -v '^ *+' conftest.er1 >conftest.err
7112 rm -f conftest.er1
7113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007115 (exit $ac_status); } && {
7116 test -z "$ac_c_werror_flag" ||
7117 test ! -s conftest.err
7118 } && test -s conftest.$ac_objext; then
7119 case $ac_type in
7120 uint32_t) ac_cv_c_uint32_t=yes ;;
7121 *) ac_cv_c_uint32_t=$ac_type ;;
7122esac
7123
7124else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007125 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007126sed 's/^/| /' conftest.$ac_ext >&5
7127
7128
7129fi
7130
7131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7132 test "$ac_cv_c_uint32_t" != no && break
7133 done
7134fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007135{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7136echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007137 case $ac_cv_c_uint32_t in #(
7138 no|yes) ;; #(
7139 *)
7140
7141cat >>confdefs.h <<\_ACEOF
7142#define _UINT32_T 1
7143_ACEOF
7144
7145
7146cat >>confdefs.h <<_ACEOF
7147#define uint32_t $ac_cv_c_uint32_t
7148_ACEOF
7149;;
7150 esac
7151
7152
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007153 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7154echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007155if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007156 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157else
7158 ac_cv_c_uint64_t=no
7159 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7160 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7161 cat >conftest.$ac_ext <<_ACEOF
7162/* confdefs.h. */
7163_ACEOF
7164cat confdefs.h >>conftest.$ac_ext
7165cat >>conftest.$ac_ext <<_ACEOF
7166/* end confdefs.h. */
7167$ac_includes_default
7168int
7169main ()
7170{
7171static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7172test_array [0] = 0
7173
7174 ;
7175 return 0;
7176}
7177_ACEOF
7178rm -f conftest.$ac_objext
7179if { (ac_try="$ac_compile"
7180case "(($ac_try" in
7181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7182 *) ac_try_echo=$ac_try;;
7183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007185 (eval "$ac_compile") 2>conftest.er1
7186 ac_status=$?
7187 grep -v '^ *+' conftest.er1 >conftest.err
7188 rm -f conftest.er1
7189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007191 (exit $ac_status); } && {
7192 test -z "$ac_c_werror_flag" ||
7193 test ! -s conftest.err
7194 } && test -s conftest.$ac_objext; then
7195 case $ac_type in
7196 uint64_t) ac_cv_c_uint64_t=yes ;;
7197 *) ac_cv_c_uint64_t=$ac_type ;;
7198esac
7199
7200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007201 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007202sed 's/^/| /' conftest.$ac_ext >&5
7203
7204
7205fi
7206
7207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7208 test "$ac_cv_c_uint64_t" != no && break
7209 done
7210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007211{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7212echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007213 case $ac_cv_c_uint64_t in #(
7214 no|yes) ;; #(
7215 *)
7216
7217cat >>confdefs.h <<\_ACEOF
7218#define _UINT64_T 1
7219_ACEOF
7220
7221
7222cat >>confdefs.h <<_ACEOF
7223#define uint64_t $ac_cv_c_uint64_t
7224_ACEOF
7225;;
7226 esac
7227
7228
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007229 { echo "$as_me:$LINENO: checking for int32_t" >&5
7230echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007231if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007232 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233else
7234 ac_cv_c_int32_t=no
7235 for ac_type in 'int32_t' 'int' 'long int' \
7236 'long long int' 'short int' 'signed char'; do
7237 cat >conftest.$ac_ext <<_ACEOF
7238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
7243$ac_includes_default
7244int
7245main ()
7246{
7247static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7248test_array [0] = 0
7249
7250 ;
7251 return 0;
7252}
7253_ACEOF
7254rm -f conftest.$ac_objext
7255if { (ac_try="$ac_compile"
7256case "(($ac_try" in
7257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7258 *) ac_try_echo=$ac_try;;
7259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007261 (eval "$ac_compile") 2>conftest.er1
7262 ac_status=$?
7263 grep -v '^ *+' conftest.er1 >conftest.err
7264 rm -f conftest.er1
7265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007267 (exit $ac_status); } && {
7268 test -z "$ac_c_werror_flag" ||
7269 test ! -s conftest.err
7270 } && test -s conftest.$ac_objext; then
7271 cat >conftest.$ac_ext <<_ACEOF
7272/* confdefs.h. */
7273_ACEOF
7274cat confdefs.h >>conftest.$ac_ext
7275cat >>conftest.$ac_ext <<_ACEOF
7276/* end confdefs.h. */
7277$ac_includes_default
7278int
7279main ()
7280{
7281static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007282 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007283test_array [0] = 0
7284
7285 ;
7286 return 0;
7287}
7288_ACEOF
7289rm -f conftest.$ac_objext
7290if { (ac_try="$ac_compile"
7291case "(($ac_try" in
7292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7293 *) ac_try_echo=$ac_try;;
7294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007296 (eval "$ac_compile") 2>conftest.er1
7297 ac_status=$?
7298 grep -v '^ *+' conftest.er1 >conftest.err
7299 rm -f conftest.er1
7300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007302 (exit $ac_status); } && {
7303 test -z "$ac_c_werror_flag" ||
7304 test ! -s conftest.err
7305 } && test -s conftest.$ac_objext; then
7306 :
7307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007308 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007309sed 's/^/| /' conftest.$ac_ext >&5
7310
7311 case $ac_type in
7312 int32_t) ac_cv_c_int32_t=yes ;;
7313 *) ac_cv_c_int32_t=$ac_type ;;
7314esac
7315
7316fi
7317
7318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007320 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007321sed 's/^/| /' conftest.$ac_ext >&5
7322
7323
7324fi
7325
7326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7327 test "$ac_cv_c_int32_t" != no && break
7328 done
7329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007330{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7331echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007332 case $ac_cv_c_int32_t in #(
7333 no|yes) ;; #(
7334 *)
7335
7336cat >>confdefs.h <<_ACEOF
7337#define int32_t $ac_cv_c_int32_t
7338_ACEOF
7339;;
7340 esac
7341
7342
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007343 { echo "$as_me:$LINENO: checking for int64_t" >&5
7344echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007345if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007346 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347else
7348 ac_cv_c_int64_t=no
7349 for ac_type in 'int64_t' 'int' 'long int' \
7350 'long long int' 'short int' 'signed char'; do
7351 cat >conftest.$ac_ext <<_ACEOF
7352/* confdefs.h. */
7353_ACEOF
7354cat confdefs.h >>conftest.$ac_ext
7355cat >>conftest.$ac_ext <<_ACEOF
7356/* end confdefs.h. */
7357$ac_includes_default
7358int
7359main ()
7360{
7361static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7362test_array [0] = 0
7363
7364 ;
7365 return 0;
7366}
7367_ACEOF
7368rm -f conftest.$ac_objext
7369if { (ac_try="$ac_compile"
7370case "(($ac_try" in
7371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7372 *) ac_try_echo=$ac_try;;
7373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007375 (eval "$ac_compile") 2>conftest.er1
7376 ac_status=$?
7377 grep -v '^ *+' conftest.er1 >conftest.err
7378 rm -f conftest.er1
7379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007381 (exit $ac_status); } && {
7382 test -z "$ac_c_werror_flag" ||
7383 test ! -s conftest.err
7384 } && test -s conftest.$ac_objext; then
7385 cat >conftest.$ac_ext <<_ACEOF
7386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
7391$ac_includes_default
7392int
7393main ()
7394{
7395static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007396 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007397test_array [0] = 0
7398
7399 ;
7400 return 0;
7401}
7402_ACEOF
7403rm -f conftest.$ac_objext
7404if { (ac_try="$ac_compile"
7405case "(($ac_try" in
7406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7407 *) ac_try_echo=$ac_try;;
7408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007410 (eval "$ac_compile") 2>conftest.er1
7411 ac_status=$?
7412 grep -v '^ *+' conftest.er1 >conftest.err
7413 rm -f conftest.er1
7414 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007416 (exit $ac_status); } && {
7417 test -z "$ac_c_werror_flag" ||
7418 test ! -s conftest.err
7419 } && test -s conftest.$ac_objext; then
7420 :
7421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007422 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007423sed 's/^/| /' conftest.$ac_ext >&5
7424
7425 case $ac_type in
7426 int64_t) ac_cv_c_int64_t=yes ;;
7427 *) ac_cv_c_int64_t=$ac_type ;;
7428esac
7429
7430fi
7431
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007434 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007435sed 's/^/| /' conftest.$ac_ext >&5
7436
7437
7438fi
7439
7440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7441 test "$ac_cv_c_int64_t" != no && break
7442 done
7443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007444{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7445echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007446 case $ac_cv_c_int64_t in #(
7447 no|yes) ;; #(
7448 *)
7449
7450cat >>confdefs.h <<_ACEOF
7451#define int64_t $ac_cv_c_int64_t
7452_ACEOF
7453;;
7454 esac
7455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007456{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7457echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007458if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007459 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007461 cat >conftest.$ac_ext <<_ACEOF
7462/* confdefs.h. */
7463_ACEOF
7464cat confdefs.h >>conftest.$ac_ext
7465cat >>conftest.$ac_ext <<_ACEOF
7466/* end confdefs.h. */
7467$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007468typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007469int
7470main ()
7471{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007472if ((ac__type_new_ *) 0)
7473 return 0;
7474if (sizeof (ac__type_new_))
7475 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007476 ;
7477 return 0;
7478}
7479_ACEOF
7480rm -f conftest.$ac_objext
7481if { (ac_try="$ac_compile"
7482case "(($ac_try" in
7483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7484 *) ac_try_echo=$ac_try;;
7485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007487 (eval "$ac_compile") 2>conftest.er1
7488 ac_status=$?
7489 grep -v '^ *+' conftest.er1 >conftest.err
7490 rm -f conftest.er1
7491 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007493 (exit $ac_status); } && {
7494 test -z "$ac_c_werror_flag" ||
7495 test ! -s conftest.err
7496 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007497 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007499 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500sed 's/^/| /' conftest.$ac_ext >&5
7501
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007502 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007504
7505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007507{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7508echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7509if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510
7511cat >>confdefs.h <<\_ACEOF
7512#define HAVE_SSIZE_T 1
7513_ACEOF
7514
7515fi
7516
Jack Jansendd19cf82001-12-06 22:36:17 +00007517
Michael W. Hudson54241132001-12-07 15:38:26 +00007518# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007519# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007520{ echo "$as_me:$LINENO: checking for int" >&5
7521echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7522if test "${ac_cv_type_int+set}" = set; then
7523 echo $ECHO_N "(cached) $ECHO_C" >&6
7524else
7525 cat >conftest.$ac_ext <<_ACEOF
7526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
7531$ac_includes_default
7532typedef int ac__type_new_;
7533int
7534main ()
7535{
7536if ((ac__type_new_ *) 0)
7537 return 0;
7538if (sizeof (ac__type_new_))
7539 return 0;
7540 ;
7541 return 0;
7542}
7543_ACEOF
7544rm -f conftest.$ac_objext
7545if { (ac_try="$ac_compile"
7546case "(($ac_try" in
7547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7548 *) ac_try_echo=$ac_try;;
7549esac
7550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7551 (eval "$ac_compile") 2>conftest.er1
7552 ac_status=$?
7553 grep -v '^ *+' conftest.er1 >conftest.err
7554 rm -f conftest.er1
7555 cat conftest.err >&5
7556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557 (exit $ac_status); } && {
7558 test -z "$ac_c_werror_flag" ||
7559 test ! -s conftest.err
7560 } && test -s conftest.$ac_objext; then
7561 ac_cv_type_int=yes
7562else
7563 echo "$as_me: failed program was:" >&5
7564sed 's/^/| /' conftest.$ac_ext >&5
7565
7566 ac_cv_type_int=no
7567fi
7568
7569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7570fi
7571{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7572echo "${ECHO_T}$ac_cv_type_int" >&6; }
7573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574# The cast to long int works around a bug in the HP C Compiler
7575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7577# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007578{ echo "$as_me:$LINENO: checking size of int" >&5
7579echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007580if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 if test "$cross_compiling" = yes; then
7584 # Depending upon the size, compute the lo and hi bounds.
7585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007592 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007593int
7594main ()
7595{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007597test_array [0] = 0
7598
7599 ;
7600 return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604if { (ac_try="$ac_compile"
7605case "(($ac_try" in
7606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7607 *) ac_try_echo=$ac_try;;
7608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007612 grep -v '^ *+' conftest.er1 >conftest.err
7613 rm -f conftest.er1
7614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616 (exit $ac_status); } && {
7617 test -z "$ac_c_werror_flag" ||
7618 test ! -s conftest.err
7619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_lo=0 ac_mid=0
7621 while :; do
7622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007623/* confdefs.h. */
7624_ACEOF
7625cat confdefs.h >>conftest.$ac_ext
7626cat >>conftest.$ac_ext <<_ACEOF
7627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007628$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007629 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007630int
7631main ()
7632{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007634test_array [0] = 0
7635
7636 ;
7637 return 0;
7638}
7639_ACEOF
7640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641if { (ac_try="$ac_compile"
7642case "(($ac_try" in
7643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7644 *) ac_try_echo=$ac_try;;
7645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007649 grep -v '^ *+' conftest.er1 >conftest.err
7650 rm -f conftest.er1
7651 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653 (exit $ac_status); } && {
7654 test -z "$ac_c_werror_flag" ||
7655 test ! -s conftest.err
7656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 ac_hi=$ac_mid; break
7658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007660sed 's/^/| /' conftest.$ac_ext >&5
7661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 ac_lo=`expr $ac_mid + 1`
7663 if test $ac_lo -le $ac_mid; then
7664 ac_lo= ac_hi=
7665 break
7666 fi
7667 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669
7670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 done
7672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007674sed 's/^/| /' conftest.$ac_ext >&5
7675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007677/* confdefs.h. */
7678_ACEOF
7679cat confdefs.h >>conftest.$ac_ext
7680cat >>conftest.$ac_ext <<_ACEOF
7681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007682$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007683 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007684int
7685main ()
7686{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007688test_array [0] = 0
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695if { (ac_try="$ac_compile"
7696case "(($ac_try" in
7697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7698 *) ac_try_echo=$ac_try;;
7699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007703 grep -v '^ *+' conftest.er1 >conftest.err
7704 rm -f conftest.er1
7705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707 (exit $ac_status); } && {
7708 test -z "$ac_c_werror_flag" ||
7709 test ! -s conftest.err
7710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_hi=-1 ac_mid=-1
7712 while :; do
7713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007714/* confdefs.h. */
7715_ACEOF
7716cat confdefs.h >>conftest.$ac_ext
7717cat >>conftest.$ac_ext <<_ACEOF
7718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007719$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007720 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007721int
7722main ()
7723{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007725test_array [0] = 0
7726
7727 ;
7728 return 0;
7729}
7730_ACEOF
7731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732if { (ac_try="$ac_compile"
7733case "(($ac_try" in
7734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7735 *) ac_try_echo=$ac_try;;
7736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007740 grep -v '^ *+' conftest.er1 >conftest.err
7741 rm -f conftest.er1
7742 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 (exit $ac_status); } && {
7745 test -z "$ac_c_werror_flag" ||
7746 test ! -s conftest.err
7747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 ac_lo=$ac_mid; break
7749else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007751sed 's/^/| /' conftest.$ac_ext >&5
7752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753 ac_hi=`expr '(' $ac_mid ')' - 1`
7754 if test $ac_mid -le $ac_hi; then
7755 ac_lo= ac_hi=
7756 break
7757 fi
7758 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760
7761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 done
7763else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007765sed 's/^/| /' conftest.$ac_ext >&5
7766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769
7770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772
7773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007774# Binary search between lo and hi bounds.
7775while test "x$ac_lo" != "x$ac_hi"; do
7776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007778/* confdefs.h. */
7779_ACEOF
7780cat confdefs.h >>conftest.$ac_ext
7781cat >>conftest.$ac_ext <<_ACEOF
7782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007783$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007784 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007785int
7786main ()
7787{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007789test_array [0] = 0
7790
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796if { (ac_try="$ac_compile"
7797case "(($ac_try" in
7798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7799 *) ac_try_echo=$ac_try;;
7800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007804 grep -v '^ *+' conftest.er1 >conftest.err
7805 rm -f conftest.er1
7806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 (exit $ac_status); } && {
7809 test -z "$ac_c_werror_flag" ||
7810 test ! -s conftest.err
7811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_hi=$ac_mid
7813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007815sed 's/^/| /' conftest.$ac_ext >&5
7816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819
7820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007821done
7822case $ac_lo in
7823?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007826See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007828See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 else
7831 ac_cv_sizeof_int=0
7832 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007833esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007834else
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* confdefs.h. */
7837_ACEOF
7838cat confdefs.h >>conftest.$ac_ext
7839cat >>conftest.$ac_ext <<_ACEOF
7840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007842 typedef int ac__type_sizeof_;
7843static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7844static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007845#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007846#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007847int
7848main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849{
Martin v. Löwis11437992002-04-12 09:54:03 +00007850
7851 FILE *f = fopen ("conftest.val", "w");
7852 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007854 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007859 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 }
7861 else
7862 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007866 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
7870 ;
7871 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007872}
Martin v. Löwis11437992002-04-12 09:54:03 +00007873_ACEOF
7874rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875if { (ac_try="$ac_link"
7876case "(($ac_try" in
7877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7878 *) ac_try_echo=$ac_try;;
7879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 { (case "(($ac_try" in
7886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7887 *) ac_try_echo=$ac_try;;
7888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 (exit $ac_status); }; }; then
7894 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007896 echo "$as_me: program exited with status $ac_status" >&5
7897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007898sed 's/^/| /' conftest.$ac_ext >&5
7899
Martin v. Löwis11437992002-04-12 09:54:03 +00007900( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007902 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007903See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007904echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007905See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 else
7908 ac_cv_sizeof_int=0
7909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911rm -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 +00007912fi
7913rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007914fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7916echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917
7918
7919
Martin v. Löwis11437992002-04-12 09:54:03 +00007920cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007922_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923
7924
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007925{ echo "$as_me:$LINENO: checking for long" >&5
7926echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7927if test "${ac_cv_type_long+set}" = set; then
7928 echo $ECHO_N "(cached) $ECHO_C" >&6
7929else
7930 cat >conftest.$ac_ext <<_ACEOF
7931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
7936$ac_includes_default
7937typedef long ac__type_new_;
7938int
7939main ()
7940{
7941if ((ac__type_new_ *) 0)
7942 return 0;
7943if (sizeof (ac__type_new_))
7944 return 0;
7945 ;
7946 return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext
7950if { (ac_try="$ac_compile"
7951case "(($ac_try" in
7952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7953 *) ac_try_echo=$ac_try;;
7954esac
7955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7956 (eval "$ac_compile") 2>conftest.er1
7957 ac_status=$?
7958 grep -v '^ *+' conftest.er1 >conftest.err
7959 rm -f conftest.er1
7960 cat conftest.err >&5
7961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7962 (exit $ac_status); } && {
7963 test -z "$ac_c_werror_flag" ||
7964 test ! -s conftest.err
7965 } && test -s conftest.$ac_objext; then
7966 ac_cv_type_long=yes
7967else
7968 echo "$as_me: failed program was:" >&5
7969sed 's/^/| /' conftest.$ac_ext >&5
7970
7971 ac_cv_type_long=no
7972fi
7973
7974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7975fi
7976{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7977echo "${ECHO_T}$ac_cv_type_long" >&6; }
7978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979# The cast to long int works around a bug in the HP C Compiler
7980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7982# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007983{ echo "$as_me:$LINENO: checking size of long" >&5
7984echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007985if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 if test "$cross_compiling" = yes; then
7989 # Depending upon the size, compute the lo and hi bounds.
7990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007997 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008002test_array [0] = 0
8003
8004 ;
8005 return 0;
8006}
8007_ACEOF
8008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009if { (ac_try="$ac_compile"
8010case "(($ac_try" in
8011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8012 *) ac_try_echo=$ac_try;;
8013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 (exit $ac_status); } && {
8022 test -z "$ac_c_werror_flag" ||
8023 test ! -s conftest.err
8024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_lo=0 ac_mid=0
8026 while :; do
8027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008028/* confdefs.h. */
8029_ACEOF
8030cat confdefs.h >>conftest.$ac_ext
8031cat >>conftest.$ac_ext <<_ACEOF
8032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008033$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008034 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008035int
8036main ()
8037{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008039test_array [0] = 0
8040
8041 ;
8042 return 0;
8043}
8044_ACEOF
8045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046if { (ac_try="$ac_compile"
8047case "(($ac_try" in
8048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8049 *) ac_try_echo=$ac_try;;
8050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008054 grep -v '^ *+' conftest.er1 >conftest.err
8055 rm -f conftest.er1
8056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 (exit $ac_status); } && {
8059 test -z "$ac_c_werror_flag" ||
8060 test ! -s conftest.err
8061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ac_hi=$ac_mid; break
8063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008065sed 's/^/| /' conftest.$ac_ext >&5
8066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067 ac_lo=`expr $ac_mid + 1`
8068 if test $ac_lo -le $ac_mid; then
8069 ac_lo= ac_hi=
8070 break
8071 fi
8072 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074
8075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 done
8077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008079sed 's/^/| /' conftest.$ac_ext >&5
8080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008087$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008088 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008089int
8090main ()
8091{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008093test_array [0] = 0
8094
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100if { (ac_try="$ac_compile"
8101case "(($ac_try" in
8102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8103 *) ac_try_echo=$ac_try;;
8104esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008108 grep -v '^ *+' conftest.er1 >conftest.err
8109 rm -f conftest.er1
8110 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112 (exit $ac_status); } && {
8113 test -z "$ac_c_werror_flag" ||
8114 test ! -s conftest.err
8115 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_hi=-1 ac_mid=-1
8117 while :; do
8118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* confdefs.h. */
8120_ACEOF
8121cat confdefs.h >>conftest.$ac_ext
8122cat >>conftest.$ac_ext <<_ACEOF
8123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008124$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008125 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008126int
8127main ()
8128{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008130test_array [0] = 0
8131
8132 ;
8133 return 0;
8134}
8135_ACEOF
8136rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137if { (ac_try="$ac_compile"
8138case "(($ac_try" in
8139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8140 *) ac_try_echo=$ac_try;;
8141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008145 grep -v '^ *+' conftest.er1 >conftest.err
8146 rm -f conftest.er1
8147 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 (exit $ac_status); } && {
8150 test -z "$ac_c_werror_flag" ||
8151 test ! -s conftest.err
8152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 ac_lo=$ac_mid; break
8154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008156sed 's/^/| /' conftest.$ac_ext >&5
8157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 ac_hi=`expr '(' $ac_mid ')' - 1`
8159 if test $ac_mid -le $ac_hi; then
8160 ac_lo= ac_hi=
8161 break
8162 fi
8163 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 done
8168else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008170sed 's/^/| /' conftest.$ac_ext >&5
8171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174
8175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177
8178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008179# Binary search between lo and hi bounds.
8180while test "x$ac_lo" != "x$ac_hi"; do
8181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008183/* confdefs.h. */
8184_ACEOF
8185cat confdefs.h >>conftest.$ac_ext
8186cat >>conftest.$ac_ext <<_ACEOF
8187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008188$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008189 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008190int
8191main ()
8192{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008194test_array [0] = 0
8195
8196 ;
8197 return 0;
8198}
8199_ACEOF
8200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201if { (ac_try="$ac_compile"
8202case "(($ac_try" in
8203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8204 *) ac_try_echo=$ac_try;;
8205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008209 grep -v '^ *+' conftest.er1 >conftest.err
8210 rm -f conftest.er1
8211 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 (exit $ac_status); } && {
8214 test -z "$ac_c_werror_flag" ||
8215 test ! -s conftest.err
8216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 ac_hi=$ac_mid
8218else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008220sed 's/^/| /' conftest.$ac_ext >&5
8221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224
8225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008226done
8227case $ac_lo in
8228?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008231See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008233See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 else
8236 ac_cv_sizeof_long=0
8237 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008238esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008239else
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* confdefs.h. */
8242_ACEOF
8243cat confdefs.h >>conftest.$ac_ext
8244cat >>conftest.$ac_ext <<_ACEOF
8245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008246$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008247 typedef long ac__type_sizeof_;
8248static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8249static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008250#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008251#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008252int
8253main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254{
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
8256 FILE *f = fopen ("conftest.val", "w");
8257 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008259 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008264 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 }
8266 else
8267 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008271 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
8275 ;
8276 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277}
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280if { (ac_try="$ac_link"
8281case "(($ac_try" in
8282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8283 *) ac_try_echo=$ac_try;;
8284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 { (case "(($ac_try" in
8291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8292 *) ac_try_echo=$ac_try;;
8293esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 (exit $ac_status); }; }; then
8299 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008301 echo "$as_me: program exited with status $ac_status" >&5
8302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008303sed 's/^/| /' conftest.$ac_ext >&5
8304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008307 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008308See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008309echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008310See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 else
8313 ac_cv_sizeof_long=0
8314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316rm -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 +00008317fi
8318rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008319fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8321echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322
8323
8324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328
8329
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008330{ echo "$as_me:$LINENO: checking for void *" >&5
8331echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8332if test "${ac_cv_type_void_p+set}" = set; then
8333 echo $ECHO_N "(cached) $ECHO_C" >&6
8334else
8335 cat >conftest.$ac_ext <<_ACEOF
8336/* confdefs.h. */
8337_ACEOF
8338cat confdefs.h >>conftest.$ac_ext
8339cat >>conftest.$ac_ext <<_ACEOF
8340/* end confdefs.h. */
8341$ac_includes_default
8342typedef void * ac__type_new_;
8343int
8344main ()
8345{
8346if ((ac__type_new_ *) 0)
8347 return 0;
8348if (sizeof (ac__type_new_))
8349 return 0;
8350 ;
8351 return 0;
8352}
8353_ACEOF
8354rm -f conftest.$ac_objext
8355if { (ac_try="$ac_compile"
8356case "(($ac_try" in
8357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8358 *) ac_try_echo=$ac_try;;
8359esac
8360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8361 (eval "$ac_compile") 2>conftest.er1
8362 ac_status=$?
8363 grep -v '^ *+' conftest.er1 >conftest.err
8364 rm -f conftest.er1
8365 cat conftest.err >&5
8366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8367 (exit $ac_status); } && {
8368 test -z "$ac_c_werror_flag" ||
8369 test ! -s conftest.err
8370 } && test -s conftest.$ac_objext; then
8371 ac_cv_type_void_p=yes
8372else
8373 echo "$as_me: failed program was:" >&5
8374sed 's/^/| /' conftest.$ac_ext >&5
8375
8376 ac_cv_type_void_p=no
8377fi
8378
8379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8380fi
8381{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8382echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384# The cast to long int works around a bug in the HP C Compiler
8385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8387# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008388{ echo "$as_me:$LINENO: checking size of void *" >&5
8389echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008390if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 if test "$cross_compiling" = yes; then
8394 # Depending upon the size, compute the lo and hi bounds.
8395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008396/* confdefs.h. */
8397_ACEOF
8398cat confdefs.h >>conftest.$ac_ext
8399cat >>conftest.$ac_ext <<_ACEOF
8400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008401$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008402 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008403int
8404main ()
8405{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008407test_array [0] = 0
8408
8409 ;
8410 return 0;
8411}
8412_ACEOF
8413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414if { (ac_try="$ac_compile"
8415case "(($ac_try" in
8416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8417 *) ac_try_echo=$ac_try;;
8418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008422 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1
8424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426 (exit $ac_status); } && {
8427 test -z "$ac_c_werror_flag" ||
8428 test ! -s conftest.err
8429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_lo=0 ac_mid=0
8431 while :; do
8432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008433/* confdefs.h. */
8434_ACEOF
8435cat confdefs.h >>conftest.$ac_ext
8436cat >>conftest.$ac_ext <<_ACEOF
8437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008438$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008439 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008440int
8441main ()
8442{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008444test_array [0] = 0
8445
8446 ;
8447 return 0;
8448}
8449_ACEOF
8450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451if { (ac_try="$ac_compile"
8452case "(($ac_try" in
8453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8454 *) ac_try_echo=$ac_try;;
8455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008459 grep -v '^ *+' conftest.er1 >conftest.err
8460 rm -f conftest.er1
8461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 (exit $ac_status); } && {
8464 test -z "$ac_c_werror_flag" ||
8465 test ! -s conftest.err
8466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ac_hi=$ac_mid; break
8468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008470sed 's/^/| /' conftest.$ac_ext >&5
8471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 ac_lo=`expr $ac_mid + 1`
8473 if test $ac_lo -le $ac_mid; then
8474 ac_lo= ac_hi=
8475 break
8476 fi
8477 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479
8480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 done
8482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008484sed 's/^/| /' conftest.$ac_ext >&5
8485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008487/* confdefs.h. */
8488_ACEOF
8489cat confdefs.h >>conftest.$ac_ext
8490cat >>conftest.$ac_ext <<_ACEOF
8491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008492$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008493 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008494int
8495main ()
8496{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008498test_array [0] = 0
8499
8500 ;
8501 return 0;
8502}
8503_ACEOF
8504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505if { (ac_try="$ac_compile"
8506case "(($ac_try" in
8507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8508 *) ac_try_echo=$ac_try;;
8509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008513 grep -v '^ *+' conftest.er1 >conftest.err
8514 rm -f conftest.er1
8515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517 (exit $ac_status); } && {
8518 test -z "$ac_c_werror_flag" ||
8519 test ! -s conftest.err
8520 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_hi=-1 ac_mid=-1
8522 while :; do
8523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008524/* confdefs.h. */
8525_ACEOF
8526cat confdefs.h >>conftest.$ac_ext
8527cat >>conftest.$ac_ext <<_ACEOF
8528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008529$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008530 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008531int
8532main ()
8533{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008534static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008535test_array [0] = 0
8536
8537 ;
8538 return 0;
8539}
8540_ACEOF
8541rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542if { (ac_try="$ac_compile"
8543case "(($ac_try" in
8544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8545 *) ac_try_echo=$ac_try;;
8546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008550 grep -v '^ *+' conftest.er1 >conftest.err
8551 rm -f conftest.er1
8552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 (exit $ac_status); } && {
8555 test -z "$ac_c_werror_flag" ||
8556 test ! -s conftest.err
8557 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ac_lo=$ac_mid; break
8559else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008561sed 's/^/| /' conftest.$ac_ext >&5
8562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 ac_hi=`expr '(' $ac_mid ')' - 1`
8564 if test $ac_mid -le $ac_hi; then
8565 ac_lo= ac_hi=
8566 break
8567 fi
8568 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570
8571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 done
8573else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008575sed 's/^/| /' conftest.$ac_ext >&5
8576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579
8580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582
8583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008584# Binary search between lo and hi bounds.
8585while test "x$ac_lo" != "x$ac_hi"; do
8586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008588/* confdefs.h. */
8589_ACEOF
8590cat confdefs.h >>conftest.$ac_ext
8591cat >>conftest.$ac_ext <<_ACEOF
8592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008593$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008594 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008595int
8596main ()
8597{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008599test_array [0] = 0
8600
8601 ;
8602 return 0;
8603}
8604_ACEOF
8605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606if { (ac_try="$ac_compile"
8607case "(($ac_try" in
8608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8609 *) ac_try_echo=$ac_try;;
8610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008614 grep -v '^ *+' conftest.er1 >conftest.err
8615 rm -f conftest.er1
8616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618 (exit $ac_status); } && {
8619 test -z "$ac_c_werror_flag" ||
8620 test ! -s conftest.err
8621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_hi=$ac_mid
8623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008625sed 's/^/| /' conftest.$ac_ext >&5
8626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629
8630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008631done
8632case $ac_lo in
8633?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008636See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008638See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 else
8641 ac_cv_sizeof_void_p=0
8642 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008643esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008644else
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* confdefs.h. */
8647_ACEOF
8648cat confdefs.h >>conftest.$ac_ext
8649cat >>conftest.$ac_ext <<_ACEOF
8650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008652 typedef void * ac__type_sizeof_;
8653static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8654static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008655#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008656#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008659{
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
8661 FILE *f = fopen ("conftest.val", "w");
8662 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008664 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008669 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 }
8671 else
8672 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008676 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008679
8680 ;
8681 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008682}
Martin v. Löwis11437992002-04-12 09:54:03 +00008683_ACEOF
8684rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685if { (ac_try="$ac_link"
8686case "(($ac_try" in
8687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8688 *) ac_try_echo=$ac_try;;
8689esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 { (case "(($ac_try" in
8696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8697 *) ac_try_echo=$ac_try;;
8698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 (exit $ac_status); }; }; then
8704 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008706 echo "$as_me: program exited with status $ac_status" >&5
8707echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008708sed 's/^/| /' conftest.$ac_ext >&5
8709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008712 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008713See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008714echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008715See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717 else
8718 ac_cv_sizeof_void_p=0
8719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721rm -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 +00008722fi
8723rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008724fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8726echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727
8728
8729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008731#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008732_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008733
8734
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008735{ echo "$as_me:$LINENO: checking for short" >&5
8736echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8737if test "${ac_cv_type_short+set}" = set; then
8738 echo $ECHO_N "(cached) $ECHO_C" >&6
8739else
8740 cat >conftest.$ac_ext <<_ACEOF
8741/* confdefs.h. */
8742_ACEOF
8743cat confdefs.h >>conftest.$ac_ext
8744cat >>conftest.$ac_ext <<_ACEOF
8745/* end confdefs.h. */
8746$ac_includes_default
8747typedef short ac__type_new_;
8748int
8749main ()
8750{
8751if ((ac__type_new_ *) 0)
8752 return 0;
8753if (sizeof (ac__type_new_))
8754 return 0;
8755 ;
8756 return 0;
8757}
8758_ACEOF
8759rm -f conftest.$ac_objext
8760if { (ac_try="$ac_compile"
8761case "(($ac_try" in
8762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8763 *) ac_try_echo=$ac_try;;
8764esac
8765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8766 (eval "$ac_compile") 2>conftest.er1
8767 ac_status=$?
8768 grep -v '^ *+' conftest.er1 >conftest.err
8769 rm -f conftest.er1
8770 cat conftest.err >&5
8771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8772 (exit $ac_status); } && {
8773 test -z "$ac_c_werror_flag" ||
8774 test ! -s conftest.err
8775 } && test -s conftest.$ac_objext; then
8776 ac_cv_type_short=yes
8777else
8778 echo "$as_me: failed program was:" >&5
8779sed 's/^/| /' conftest.$ac_ext >&5
8780
8781 ac_cv_type_short=no
8782fi
8783
8784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8785fi
8786{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8787echo "${ECHO_T}$ac_cv_type_short" >&6; }
8788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789# The cast to long int works around a bug in the HP C Compiler
8790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8792# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008793{ echo "$as_me:$LINENO: checking size of short" >&5
8794echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008795if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008797else
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 if test "$cross_compiling" = yes; then
8799 # Depending upon the size, compute the lo and hi bounds.
8800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* confdefs.h. */
8802_ACEOF
8803cat confdefs.h >>conftest.$ac_ext
8804cat >>conftest.$ac_ext <<_ACEOF
8805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008807 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819if { (ac_try="$ac_compile"
8820case "(($ac_try" in
8821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8822 *) ac_try_echo=$ac_try;;
8823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827 grep -v '^ *+' conftest.er1 >conftest.err
8828 rm -f conftest.er1
8829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 (exit $ac_status); } && {
8832 test -z "$ac_c_werror_flag" ||
8833 test ! -s conftest.err
8834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_lo=0 ac_mid=0
8836 while :; do
8837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008838/* confdefs.h. */
8839_ACEOF
8840cat confdefs.h >>conftest.$ac_ext
8841cat >>conftest.$ac_ext <<_ACEOF
8842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008843$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008844 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008849test_array [0] = 0
8850
8851 ;
8852 return 0;
8853}
8854_ACEOF
8855rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856if { (ac_try="$ac_compile"
8857case "(($ac_try" in
8858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8859 *) ac_try_echo=$ac_try;;
8860esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008864 grep -v '^ *+' conftest.er1 >conftest.err
8865 rm -f conftest.er1
8866 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868 (exit $ac_status); } && {
8869 test -z "$ac_c_werror_flag" ||
8870 test ! -s conftest.err
8871 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ac_hi=$ac_mid; break
8873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008875sed 's/^/| /' conftest.$ac_ext >&5
8876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877 ac_lo=`expr $ac_mid + 1`
8878 if test $ac_lo -le $ac_mid; then
8879 ac_lo= ac_hi=
8880 break
8881 fi
8882 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
8885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 done
8887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008889sed 's/^/| /' conftest.$ac_ext >&5
8890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008892/* confdefs.h. */
8893_ACEOF
8894cat confdefs.h >>conftest.$ac_ext
8895cat >>conftest.$ac_ext <<_ACEOF
8896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008897$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008898 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008899int
8900main ()
8901{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008903test_array [0] = 0
8904
8905 ;
8906 return 0;
8907}
8908_ACEOF
8909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910if { (ac_try="$ac_compile"
8911case "(($ac_try" in
8912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8913 *) ac_try_echo=$ac_try;;
8914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008918 grep -v '^ *+' conftest.er1 >conftest.err
8919 rm -f conftest.er1
8920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922 (exit $ac_status); } && {
8923 test -z "$ac_c_werror_flag" ||
8924 test ! -s conftest.err
8925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ac_hi=-1 ac_mid=-1
8927 while :; do
8928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008929/* confdefs.h. */
8930_ACEOF
8931cat confdefs.h >>conftest.$ac_ext
8932cat >>conftest.$ac_ext <<_ACEOF
8933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008934$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008935 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008936int
8937main ()
8938{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008939static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008940test_array [0] = 0
8941
8942 ;
8943 return 0;
8944}
8945_ACEOF
8946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947if { (ac_try="$ac_compile"
8948case "(($ac_try" in
8949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8950 *) ac_try_echo=$ac_try;;
8951esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008955 grep -v '^ *+' conftest.er1 >conftest.err
8956 rm -f conftest.er1
8957 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959 (exit $ac_status); } && {
8960 test -z "$ac_c_werror_flag" ||
8961 test ! -s conftest.err
8962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ac_lo=$ac_mid; break
8964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008966sed 's/^/| /' conftest.$ac_ext >&5
8967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968 ac_hi=`expr '(' $ac_mid ')' - 1`
8969 if test $ac_mid -le $ac_hi; then
8970 ac_lo= ac_hi=
8971 break
8972 fi
8973 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975
8976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 done
8978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008980sed 's/^/| /' conftest.$ac_ext >&5
8981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984
8985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008987
8988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008989# Binary search between lo and hi bounds.
8990while test "x$ac_lo" != "x$ac_hi"; do
8991 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* confdefs.h. */
8994_ACEOF
8995cat confdefs.h >>conftest.$ac_ext
8996cat >>conftest.$ac_ext <<_ACEOF
8997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008998$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008999 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009000int
9001main ()
9002{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009004test_array [0] = 0
9005
9006 ;
9007 return 0;
9008}
9009_ACEOF
9010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011if { (ac_try="$ac_compile"
9012case "(($ac_try" in
9013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9014 *) ac_try_echo=$ac_try;;
9015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009019 grep -v '^ *+' conftest.er1 >conftest.err
9020 rm -f conftest.er1
9021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023 (exit $ac_status); } && {
9024 test -z "$ac_c_werror_flag" ||
9025 test ! -s conftest.err
9026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 ac_hi=$ac_mid
9028else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009030sed 's/^/| /' conftest.$ac_ext >&5
9031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034
9035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009036done
9037case $ac_lo in
9038?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009039'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009041See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009043See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 else
9046 ac_cv_sizeof_short=0
9047 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009048esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009049else
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* confdefs.h. */
9052_ACEOF
9053cat confdefs.h >>conftest.$ac_ext
9054cat >>conftest.$ac_ext <<_ACEOF
9055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009057 typedef short ac__type_sizeof_;
9058static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9059static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009060#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009061#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009062int
9063main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064{
Martin v. Löwis11437992002-04-12 09:54:03 +00009065
9066 FILE *f = fopen ("conftest.val", "w");
9067 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009068 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009069 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009074 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 }
9076 else
9077 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009078 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009081 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084
9085 ;
9086 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009087}
Martin v. Löwis11437992002-04-12 09:54:03 +00009088_ACEOF
9089rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090if { (ac_try="$ac_link"
9091case "(($ac_try" in
9092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9093 *) ac_try_echo=$ac_try;;
9094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100 { (case "(($ac_try" in
9101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9102 *) ac_try_echo=$ac_try;;
9103esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 (exit $ac_status); }; }; then
9109 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009111 echo "$as_me: program exited with status $ac_status" >&5
9112echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009113sed 's/^/| /' conftest.$ac_ext >&5
9114
Martin v. Löwis11437992002-04-12 09:54:03 +00009115( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009117 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009118See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009119echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009120See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 else
9123 ac_cv_sizeof_short=0
9124 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126rm -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 +00009127fi
9128rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009129fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9131echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009132
9133
9134
Martin v. Löwis11437992002-04-12 09:54:03 +00009135cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138
9139
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009140{ echo "$as_me:$LINENO: checking for float" >&5
9141echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9142if test "${ac_cv_type_float+set}" = set; then
9143 echo $ECHO_N "(cached) $ECHO_C" >&6
9144else
9145 cat >conftest.$ac_ext <<_ACEOF
9146/* confdefs.h. */
9147_ACEOF
9148cat confdefs.h >>conftest.$ac_ext
9149cat >>conftest.$ac_ext <<_ACEOF
9150/* end confdefs.h. */
9151$ac_includes_default
9152typedef float ac__type_new_;
9153int
9154main ()
9155{
9156if ((ac__type_new_ *) 0)
9157 return 0;
9158if (sizeof (ac__type_new_))
9159 return 0;
9160 ;
9161 return 0;
9162}
9163_ACEOF
9164rm -f conftest.$ac_objext
9165if { (ac_try="$ac_compile"
9166case "(($ac_try" in
9167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9168 *) ac_try_echo=$ac_try;;
9169esac
9170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9171 (eval "$ac_compile") 2>conftest.er1
9172 ac_status=$?
9173 grep -v '^ *+' conftest.er1 >conftest.err
9174 rm -f conftest.er1
9175 cat conftest.err >&5
9176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9177 (exit $ac_status); } && {
9178 test -z "$ac_c_werror_flag" ||
9179 test ! -s conftest.err
9180 } && test -s conftest.$ac_objext; then
9181 ac_cv_type_float=yes
9182else
9183 echo "$as_me: failed program was:" >&5
9184sed 's/^/| /' conftest.$ac_ext >&5
9185
9186 ac_cv_type_float=no
9187fi
9188
9189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9190fi
9191{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9192echo "${ECHO_T}$ac_cv_type_float" >&6; }
9193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194# The cast to long int works around a bug in the HP C Compiler
9195# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9196# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9197# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009198{ echo "$as_me:$LINENO: checking size of float" >&5
9199echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009200if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009201 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009202else
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 if test "$cross_compiling" = yes; then
9204 # Depending upon the size, compute the lo and hi bounds.
9205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009212 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009217test_array [0] = 0
9218
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224if { (ac_try="$ac_compile"
9225case "(($ac_try" in
9226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9227 *) ac_try_echo=$ac_try;;
9228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009232 grep -v '^ *+' conftest.er1 >conftest.err
9233 rm -f conftest.er1
9234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236 (exit $ac_status); } && {
9237 test -z "$ac_c_werror_flag" ||
9238 test ! -s conftest.err
9239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_lo=0 ac_mid=0
9241 while :; do
9242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009243/* confdefs.h. */
9244_ACEOF
9245cat confdefs.h >>conftest.$ac_ext
9246cat >>conftest.$ac_ext <<_ACEOF
9247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009248$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009249 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009250int
9251main ()
9252{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009254test_array [0] = 0
9255
9256 ;
9257 return 0;
9258}
9259_ACEOF
9260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261if { (ac_try="$ac_compile"
9262case "(($ac_try" in
9263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9264 *) ac_try_echo=$ac_try;;
9265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009269 grep -v '^ *+' conftest.er1 >conftest.err
9270 rm -f conftest.er1
9271 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 (exit $ac_status); } && {
9274 test -z "$ac_c_werror_flag" ||
9275 test ! -s conftest.err
9276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 ac_hi=$ac_mid; break
9278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009280sed 's/^/| /' conftest.$ac_ext >&5
9281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 ac_lo=`expr $ac_mid + 1`
9283 if test $ac_lo -le $ac_mid; then
9284 ac_lo= ac_hi=
9285 break
9286 fi
9287 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289
9290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 done
9292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009294sed 's/^/| /' conftest.$ac_ext >&5
9295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* confdefs.h. */
9298_ACEOF
9299cat confdefs.h >>conftest.$ac_ext
9300cat >>conftest.$ac_ext <<_ACEOF
9301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009303 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009304int
9305main ()
9306{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009307static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009308test_array [0] = 0
9309
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315if { (ac_try="$ac_compile"
9316case "(($ac_try" in
9317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318 *) ac_try_echo=$ac_try;;
9319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009323 grep -v '^ *+' conftest.er1 >conftest.err
9324 rm -f conftest.er1
9325 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327 (exit $ac_status); } && {
9328 test -z "$ac_c_werror_flag" ||
9329 test ! -s conftest.err
9330 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ac_hi=-1 ac_mid=-1
9332 while :; do
9333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009334/* confdefs.h. */
9335_ACEOF
9336cat confdefs.h >>conftest.$ac_ext
9337cat >>conftest.$ac_ext <<_ACEOF
9338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009339$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009340 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009341int
9342main ()
9343{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009344static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009345test_array [0] = 0
9346
9347 ;
9348 return 0;
9349}
9350_ACEOF
9351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352if { (ac_try="$ac_compile"
9353case "(($ac_try" in
9354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9355 *) ac_try_echo=$ac_try;;
9356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009360 grep -v '^ *+' conftest.er1 >conftest.err
9361 rm -f conftest.er1
9362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364 (exit $ac_status); } && {
9365 test -z "$ac_c_werror_flag" ||
9366 test ! -s conftest.err
9367 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 ac_lo=$ac_mid; break
9369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009371sed 's/^/| /' conftest.$ac_ext >&5
9372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373 ac_hi=`expr '(' $ac_mid ')' - 1`
9374 if test $ac_mid -le $ac_hi; then
9375 ac_lo= ac_hi=
9376 break
9377 fi
9378 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380
9381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 done
9383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009385sed 's/^/| /' conftest.$ac_ext >&5
9386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389
9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392
9393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009394# Binary search between lo and hi bounds.
9395while test "x$ac_lo" != "x$ac_hi"; do
9396 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* confdefs.h. */
9399_ACEOF
9400cat confdefs.h >>conftest.$ac_ext
9401cat >>conftest.$ac_ext <<_ACEOF
9402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009403$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009404 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009405int
9406main ()
9407{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009409test_array [0] = 0
9410
9411 ;
9412 return 0;
9413}
9414_ACEOF
9415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416if { (ac_try="$ac_compile"
9417case "(($ac_try" in
9418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9419 *) ac_try_echo=$ac_try;;
9420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009424 grep -v '^ *+' conftest.er1 >conftest.err
9425 rm -f conftest.er1
9426 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 (exit $ac_status); } && {
9429 test -z "$ac_c_werror_flag" ||
9430 test ! -s conftest.err
9431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_hi=$ac_mid
9433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009435sed 's/^/| /' conftest.$ac_ext >&5
9436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439
9440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009441done
9442case $ac_lo in
9443?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009444'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009446See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009448See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 else
9451 ac_cv_sizeof_float=0
9452 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009453esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009454else
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009462 typedef float ac__type_sizeof_;
9463static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9464static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009465#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009466#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009467int
9468main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469{
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
9471 FILE *f = fopen ("conftest.val", "w");
9472 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009474 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009479 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 }
9481 else
9482 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009486 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009489
9490 ;
9491 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009492}
Martin v. Löwis11437992002-04-12 09:54:03 +00009493_ACEOF
9494rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495if { (ac_try="$ac_link"
9496case "(($ac_try" in
9497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9498 *) ac_try_echo=$ac_try;;
9499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505 { (case "(($ac_try" in
9506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9507 *) ac_try_echo=$ac_try;;
9508esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 (exit $ac_status); }; }; then
9514 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009516 echo "$as_me: program exited with status $ac_status" >&5
9517echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009518sed 's/^/| /' conftest.$ac_ext >&5
9519
Martin v. Löwis11437992002-04-12 09:54:03 +00009520( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009522 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009523See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009524echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009525See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527 else
9528 ac_cv_sizeof_float=0
9529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531rm -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 +00009532fi
9533rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9536echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537
9538
9539
Martin v. Löwis11437992002-04-12 09:54:03 +00009540cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009542_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543
9544
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009545{ echo "$as_me:$LINENO: checking for double" >&5
9546echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9547if test "${ac_cv_type_double+set}" = set; then
9548 echo $ECHO_N "(cached) $ECHO_C" >&6
9549else
9550 cat >conftest.$ac_ext <<_ACEOF
9551/* confdefs.h. */
9552_ACEOF
9553cat confdefs.h >>conftest.$ac_ext
9554cat >>conftest.$ac_ext <<_ACEOF
9555/* end confdefs.h. */
9556$ac_includes_default
9557typedef double ac__type_new_;
9558int
9559main ()
9560{
9561if ((ac__type_new_ *) 0)
9562 return 0;
9563if (sizeof (ac__type_new_))
9564 return 0;
9565 ;
9566 return 0;
9567}
9568_ACEOF
9569rm -f conftest.$ac_objext
9570if { (ac_try="$ac_compile"
9571case "(($ac_try" in
9572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9573 *) ac_try_echo=$ac_try;;
9574esac
9575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9576 (eval "$ac_compile") 2>conftest.er1
9577 ac_status=$?
9578 grep -v '^ *+' conftest.er1 >conftest.err
9579 rm -f conftest.er1
9580 cat conftest.err >&5
9581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9582 (exit $ac_status); } && {
9583 test -z "$ac_c_werror_flag" ||
9584 test ! -s conftest.err
9585 } && test -s conftest.$ac_objext; then
9586 ac_cv_type_double=yes
9587else
9588 echo "$as_me: failed program was:" >&5
9589sed 's/^/| /' conftest.$ac_ext >&5
9590
9591 ac_cv_type_double=no
9592fi
9593
9594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9595fi
9596{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9597echo "${ECHO_T}$ac_cv_type_double" >&6; }
9598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599# The cast to long int works around a bug in the HP C Compiler
9600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9602# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009603{ echo "$as_me:$LINENO: checking size of double" >&5
9604echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009605if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009607else
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 if test "$cross_compiling" = yes; then
9609 # Depending upon the size, compute the lo and hi bounds.
9610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009617 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009622test_array [0] = 0
9623
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629if { (ac_try="$ac_compile"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_lo=0 ac_mid=0
9646 while :; do
9647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009648/* confdefs.h. */
9649_ACEOF
9650cat confdefs.h >>conftest.$ac_ext
9651cat >>conftest.$ac_ext <<_ACEOF
9652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009654 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009655int
9656main ()
9657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009659test_array [0] = 0
9660
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666if { (ac_try="$ac_compile"
9667case "(($ac_try" in
9668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9669 *) ac_try_echo=$ac_try;;
9670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009674 grep -v '^ *+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678 (exit $ac_status); } && {
9679 test -z "$ac_c_werror_flag" ||
9680 test ! -s conftest.err
9681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ac_hi=$ac_mid; break
9683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009685sed 's/^/| /' conftest.$ac_ext >&5
9686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687 ac_lo=`expr $ac_mid + 1`
9688 if test $ac_lo -le $ac_mid; then
9689 ac_lo= ac_hi=
9690 break
9691 fi
9692 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694
9695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 done
9697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009699sed 's/^/| /' conftest.$ac_ext >&5
9700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* confdefs.h. */
9703_ACEOF
9704cat confdefs.h >>conftest.$ac_ext
9705cat >>conftest.$ac_ext <<_ACEOF
9706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009708 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009709int
9710main ()
9711{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009713test_array [0] = 0
9714
9715 ;
9716 return 0;
9717}
9718_ACEOF
9719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720if { (ac_try="$ac_compile"
9721case "(($ac_try" in
9722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9723 *) ac_try_echo=$ac_try;;
9724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009728 grep -v '^ *+' conftest.er1 >conftest.err
9729 rm -f conftest.er1
9730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732 (exit $ac_status); } && {
9733 test -z "$ac_c_werror_flag" ||
9734 test ! -s conftest.err
9735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_hi=-1 ac_mid=-1
9737 while :; do
9738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009739/* confdefs.h. */
9740_ACEOF
9741cat confdefs.h >>conftest.$ac_ext
9742cat >>conftest.$ac_ext <<_ACEOF
9743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009745 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009746int
9747main ()
9748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009750test_array [0] = 0
9751
9752 ;
9753 return 0;
9754}
9755_ACEOF
9756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757if { (ac_try="$ac_compile"
9758case "(($ac_try" in
9759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9760 *) ac_try_echo=$ac_try;;
9761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009765 grep -v '^ *+' conftest.er1 >conftest.err
9766 rm -f conftest.er1
9767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 (exit $ac_status); } && {
9770 test -z "$ac_c_werror_flag" ||
9771 test ! -s conftest.err
9772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_lo=$ac_mid; break
9774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009776sed 's/^/| /' conftest.$ac_ext >&5
9777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 ac_hi=`expr '(' $ac_mid ')' - 1`
9779 if test $ac_mid -le $ac_hi; then
9780 ac_lo= ac_hi=
9781 break
9782 fi
9783 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 done
9788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009790sed 's/^/| /' conftest.$ac_ext >&5
9791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797
9798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009799# Binary search between lo and hi bounds.
9800while test "x$ac_lo" != "x$ac_hi"; do
9801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* confdefs.h. */
9804_ACEOF
9805cat confdefs.h >>conftest.$ac_ext
9806cat >>conftest.$ac_ext <<_ACEOF
9807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009809 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009810int
9811main ()
9812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009814test_array [0] = 0
9815
9816 ;
9817 return 0;
9818}
9819_ACEOF
9820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821if { (ac_try="$ac_compile"
9822case "(($ac_try" in
9823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9824 *) ac_try_echo=$ac_try;;
9825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009829 grep -v '^ *+' conftest.er1 >conftest.err
9830 rm -f conftest.er1
9831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 (exit $ac_status); } && {
9834 test -z "$ac_c_werror_flag" ||
9835 test ! -s conftest.err
9836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ac_hi=$ac_mid
9838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009840sed 's/^/| /' conftest.$ac_ext >&5
9841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844
9845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009846done
9847case $ac_lo in
9848?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 else
9856 ac_cv_sizeof_double=0
9857 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009858esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009859else
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009861/* confdefs.h. */
9862_ACEOF
9863cat confdefs.h >>conftest.$ac_ext
9864cat >>conftest.$ac_ext <<_ACEOF
9865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009867 typedef double ac__type_sizeof_;
9868static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9869static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009871#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009872int
9873main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874{
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
9876 FILE *f = fopen ("conftest.val", "w");
9877 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009879 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009884 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 }
9886 else
9887 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009891 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
9895 ;
9896 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009897}
Martin v. Löwis11437992002-04-12 09:54:03 +00009898_ACEOF
9899rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900if { (ac_try="$ac_link"
9901case "(($ac_try" in
9902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9903 *) ac_try_echo=$ac_try;;
9904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 { (case "(($ac_try" in
9911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9912 *) ac_try_echo=$ac_try;;
9913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 (exit $ac_status); }; }; then
9919 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009921 echo "$as_me: program exited with status $ac_status" >&5
9922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009923sed 's/^/| /' conftest.$ac_ext >&5
9924
Martin v. Löwis11437992002-04-12 09:54:03 +00009925( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009927 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009928See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009929echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009930See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932 else
9933 ac_cv_sizeof_double=0
9934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936rm -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 +00009937fi
9938rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9941echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942
9943
9944
Martin v. Löwis11437992002-04-12 09:54:03 +00009945cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009947_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948
9949
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009950{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9951echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9952if test "${ac_cv_type_fpos_t+set}" = set; then
9953 echo $ECHO_N "(cached) $ECHO_C" >&6
9954else
9955 cat >conftest.$ac_ext <<_ACEOF
9956/* confdefs.h. */
9957_ACEOF
9958cat confdefs.h >>conftest.$ac_ext
9959cat >>conftest.$ac_ext <<_ACEOF
9960/* end confdefs.h. */
9961$ac_includes_default
9962typedef fpos_t ac__type_new_;
9963int
9964main ()
9965{
9966if ((ac__type_new_ *) 0)
9967 return 0;
9968if (sizeof (ac__type_new_))
9969 return 0;
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext
9975if { (ac_try="$ac_compile"
9976case "(($ac_try" in
9977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978 *) ac_try_echo=$ac_try;;
9979esac
9980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9981 (eval "$ac_compile") 2>conftest.er1
9982 ac_status=$?
9983 grep -v '^ *+' conftest.er1 >conftest.err
9984 rm -f conftest.er1
9985 cat conftest.err >&5
9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987 (exit $ac_status); } && {
9988 test -z "$ac_c_werror_flag" ||
9989 test ! -s conftest.err
9990 } && test -s conftest.$ac_objext; then
9991 ac_cv_type_fpos_t=yes
9992else
9993 echo "$as_me: failed program was:" >&5
9994sed 's/^/| /' conftest.$ac_ext >&5
9995
9996 ac_cv_type_fpos_t=no
9997fi
9998
9999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10000fi
10001{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10002echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004# The cast to long int works around a bug in the HP C Compiler
10005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10007# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010008{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10009echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010010if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010011 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010012else
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 if test "$cross_compiling" = yes; then
10014 # Depending upon the size, compute the lo and hi bounds.
10015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010016/* confdefs.h. */
10017_ACEOF
10018cat confdefs.h >>conftest.$ac_ext
10019cat >>conftest.$ac_ext <<_ACEOF
10020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010021$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010022 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010023int
10024main ()
10025{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010027test_array [0] = 0
10028
10029 ;
10030 return 0;
10031}
10032_ACEOF
10033rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034if { (ac_try="$ac_compile"
10035case "(($ac_try" in
10036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10037 *) ac_try_echo=$ac_try;;
10038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010042 grep -v '^ *+' conftest.er1 >conftest.err
10043 rm -f conftest.er1
10044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046 (exit $ac_status); } && {
10047 test -z "$ac_c_werror_flag" ||
10048 test ! -s conftest.err
10049 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_lo=0 ac_mid=0
10051 while :; do
10052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* confdefs.h. */
10054_ACEOF
10055cat confdefs.h >>conftest.$ac_ext
10056cat >>conftest.$ac_ext <<_ACEOF
10057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010058$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010059 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010064test_array [0] = 0
10065
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071if { (ac_try="$ac_compile"
10072case "(($ac_try" in
10073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10074 *) ac_try_echo=$ac_try;;
10075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010079 grep -v '^ *+' conftest.er1 >conftest.err
10080 rm -f conftest.er1
10081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083 (exit $ac_status); } && {
10084 test -z "$ac_c_werror_flag" ||
10085 test ! -s conftest.err
10086 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 ac_hi=$ac_mid; break
10088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010090sed 's/^/| /' conftest.$ac_ext >&5
10091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 ac_lo=`expr $ac_mid + 1`
10093 if test $ac_lo -le $ac_mid; then
10094 ac_lo= ac_hi=
10095 break
10096 fi
10097 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099
10100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 done
10102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010104sed 's/^/| /' conftest.$ac_ext >&5
10105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010107/* confdefs.h. */
10108_ACEOF
10109cat confdefs.h >>conftest.$ac_ext
10110cat >>conftest.$ac_ext <<_ACEOF
10111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010112$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010113 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010114int
10115main ()
10116{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010117static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010118test_array [0] = 0
10119
10120 ;
10121 return 0;
10122}
10123_ACEOF
10124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125if { (ac_try="$ac_compile"
10126case "(($ac_try" in
10127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10128 *) ac_try_echo=$ac_try;;
10129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010133 grep -v '^ *+' conftest.er1 >conftest.err
10134 rm -f conftest.er1
10135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137 (exit $ac_status); } && {
10138 test -z "$ac_c_werror_flag" ||
10139 test ! -s conftest.err
10140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_hi=-1 ac_mid=-1
10142 while :; do
10143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010144/* confdefs.h. */
10145_ACEOF
10146cat confdefs.h >>conftest.$ac_ext
10147cat >>conftest.$ac_ext <<_ACEOF
10148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010149$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010150 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010155test_array [0] = 0
10156
10157 ;
10158 return 0;
10159}
10160_ACEOF
10161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162if { (ac_try="$ac_compile"
10163case "(($ac_try" in
10164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10165 *) ac_try_echo=$ac_try;;
10166esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010170 grep -v '^ *+' conftest.er1 >conftest.err
10171 rm -f conftest.er1
10172 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 (exit $ac_status); } && {
10175 test -z "$ac_c_werror_flag" ||
10176 test ! -s conftest.err
10177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ac_lo=$ac_mid; break
10179else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010181sed 's/^/| /' conftest.$ac_ext >&5
10182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183 ac_hi=`expr '(' $ac_mid ')' - 1`
10184 if test $ac_mid -le $ac_hi; then
10185 ac_lo= ac_hi=
10186 break
10187 fi
10188 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190
10191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 done
10193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010195sed 's/^/| /' conftest.$ac_ext >&5
10196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199
10200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202
10203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010204# Binary search between lo and hi bounds.
10205while test "x$ac_lo" != "x$ac_hi"; do
10206 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* confdefs.h. */
10209_ACEOF
10210cat confdefs.h >>conftest.$ac_ext
10211cat >>conftest.$ac_ext <<_ACEOF
10212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010213$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010214 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010215int
10216main ()
10217{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010219test_array [0] = 0
10220
10221 ;
10222 return 0;
10223}
10224_ACEOF
10225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226if { (ac_try="$ac_compile"
10227case "(($ac_try" in
10228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10229 *) ac_try_echo=$ac_try;;
10230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010234 grep -v '^ *+' conftest.er1 >conftest.err
10235 rm -f conftest.er1
10236 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 (exit $ac_status); } && {
10239 test -z "$ac_c_werror_flag" ||
10240 test ! -s conftest.err
10241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ac_hi=$ac_mid
10243else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010245sed 's/^/| /' conftest.$ac_ext >&5
10246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249
10250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010251done
10252case $ac_lo in
10253?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010256See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 else
10261 ac_cv_sizeof_fpos_t=0
10262 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010263esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010266/* confdefs.h. */
10267_ACEOF
10268cat confdefs.h >>conftest.$ac_ext
10269cat >>conftest.$ac_ext <<_ACEOF
10270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010272 typedef fpos_t ac__type_sizeof_;
10273static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10274static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010275#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010276#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279{
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
10281 FILE *f = fopen ("conftest.val", "w");
10282 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010284 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010289 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 }
10291 else
10292 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010294 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010296 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010299
10300 ;
10301 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302}
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
10304rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305if { (ac_try="$ac_link"
10306case "(($ac_try" in
10307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10308 *) ac_try_echo=$ac_try;;
10309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315 { (case "(($ac_try" in
10316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10317 *) ac_try_echo=$ac_try;;
10318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 (exit $ac_status); }; }; then
10324 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010326 echo "$as_me: program exited with status $ac_status" >&5
10327echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010328sed 's/^/| /' conftest.$ac_ext >&5
10329
Martin v. Löwis11437992002-04-12 09:54:03 +000010330( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010332 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010333See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010334echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010335See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337 else
10338 ac_cv_sizeof_fpos_t=0
10339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341rm -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 +000010342fi
10343rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010344fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10346echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347
10348
10349
Martin v. Löwis11437992002-04-12 09:54:03 +000010350cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010352_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353
Michael W. Hudson54241132001-12-07 15:38:26 +000010354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010355{ echo "$as_me:$LINENO: checking for size_t" >&5
10356echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10357if test "${ac_cv_type_size_t+set}" = set; then
10358 echo $ECHO_N "(cached) $ECHO_C" >&6
10359else
10360 cat >conftest.$ac_ext <<_ACEOF
10361/* confdefs.h. */
10362_ACEOF
10363cat confdefs.h >>conftest.$ac_ext
10364cat >>conftest.$ac_ext <<_ACEOF
10365/* end confdefs.h. */
10366$ac_includes_default
10367typedef size_t ac__type_new_;
10368int
10369main ()
10370{
10371if ((ac__type_new_ *) 0)
10372 return 0;
10373if (sizeof (ac__type_new_))
10374 return 0;
10375 ;
10376 return 0;
10377}
10378_ACEOF
10379rm -f conftest.$ac_objext
10380if { (ac_try="$ac_compile"
10381case "(($ac_try" in
10382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10383 *) ac_try_echo=$ac_try;;
10384esac
10385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10386 (eval "$ac_compile") 2>conftest.er1
10387 ac_status=$?
10388 grep -v '^ *+' conftest.er1 >conftest.err
10389 rm -f conftest.er1
10390 cat conftest.err >&5
10391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10392 (exit $ac_status); } && {
10393 test -z "$ac_c_werror_flag" ||
10394 test ! -s conftest.err
10395 } && test -s conftest.$ac_objext; then
10396 ac_cv_type_size_t=yes
10397else
10398 echo "$as_me: failed program was:" >&5
10399sed 's/^/| /' conftest.$ac_ext >&5
10400
10401 ac_cv_type_size_t=no
10402fi
10403
10404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10405fi
10406{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10407echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409# The cast to long int works around a bug in the HP C Compiler
10410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10412# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010413{ echo "$as_me:$LINENO: checking size of size_t" >&5
10414echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010416 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010418 if test "$cross_compiling" = yes; then
10419 # Depending upon the size, compute the lo and hi bounds.
10420cat >conftest.$ac_ext <<_ACEOF
10421/* confdefs.h. */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h. */
10426$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010427 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010428int
10429main ()
10430{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432test_array [0] = 0
10433
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439if { (ac_try="$ac_compile"
10440case "(($ac_try" in
10441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442 *) ac_try_echo=$ac_try;;
10443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 ac_status=$?
10447 grep -v '^ *+' conftest.er1 >conftest.err
10448 rm -f conftest.er1
10449 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451 (exit $ac_status); } && {
10452 test -z "$ac_c_werror_flag" ||
10453 test ! -s conftest.err
10454 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455 ac_lo=0 ac_mid=0
10456 while :; do
10457 cat >conftest.$ac_ext <<_ACEOF
10458/* confdefs.h. */
10459_ACEOF
10460cat confdefs.h >>conftest.$ac_ext
10461cat >>conftest.$ac_ext <<_ACEOF
10462/* end confdefs.h. */
10463$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010464 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010465int
10466main ()
10467{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010468static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469test_array [0] = 0
10470
10471 ;
10472 return 0;
10473}
10474_ACEOF
10475rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476if { (ac_try="$ac_compile"
10477case "(($ac_try" in
10478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10479 *) ac_try_echo=$ac_try;;
10480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010483 ac_status=$?
10484 grep -v '^ *+' conftest.er1 >conftest.err
10485 rm -f conftest.er1
10486 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488 (exit $ac_status); } && {
10489 test -z "$ac_c_werror_flag" ||
10490 test ! -s conftest.err
10491 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492 ac_hi=$ac_mid; break
10493else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010494 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495sed 's/^/| /' conftest.$ac_ext >&5
10496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497 ac_lo=`expr $ac_mid + 1`
10498 if test $ac_lo -le $ac_mid; then
10499 ac_lo= ac_hi=
10500 break
10501 fi
10502 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504
10505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506 done
10507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010508 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509sed 's/^/| /' conftest.$ac_ext >&5
10510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512/* confdefs.h. */
10513_ACEOF
10514cat confdefs.h >>conftest.$ac_ext
10515cat >>conftest.$ac_ext <<_ACEOF
10516/* end confdefs.h. */
10517$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010518 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519int
10520main ()
10521{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010522static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523test_array [0] = 0
10524
10525 ;
10526 return 0;
10527}
10528_ACEOF
10529rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530if { (ac_try="$ac_compile"
10531case "(($ac_try" in
10532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10533 *) ac_try_echo=$ac_try;;
10534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537 ac_status=$?
10538 grep -v '^ *+' conftest.er1 >conftest.err
10539 rm -f conftest.er1
10540 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542 (exit $ac_status); } && {
10543 test -z "$ac_c_werror_flag" ||
10544 test ! -s conftest.err
10545 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546 ac_hi=-1 ac_mid=-1
10547 while :; do
10548 cat >conftest.$ac_ext <<_ACEOF
10549/* confdefs.h. */
10550_ACEOF
10551cat confdefs.h >>conftest.$ac_ext
10552cat >>conftest.$ac_ext <<_ACEOF
10553/* end confdefs.h. */
10554$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010555 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556int
10557main ()
10558{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010559static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560test_array [0] = 0
10561
10562 ;
10563 return 0;
10564}
10565_ACEOF
10566rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567if { (ac_try="$ac_compile"
10568case "(($ac_try" in
10569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10570 *) ac_try_echo=$ac_try;;
10571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574 ac_status=$?
10575 grep -v '^ *+' conftest.er1 >conftest.err
10576 rm -f conftest.er1
10577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579 (exit $ac_status); } && {
10580 test -z "$ac_c_werror_flag" ||
10581 test ! -s conftest.err
10582 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583 ac_lo=$ac_mid; break
10584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010585 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586sed 's/^/| /' conftest.$ac_ext >&5
10587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588 ac_hi=`expr '(' $ac_mid ')' - 1`
10589 if test $ac_mid -le $ac_hi; then
10590 ac_lo= ac_hi=
10591 break
10592 fi
10593 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595
10596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597 done
10598else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010599 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600sed 's/^/| /' conftest.$ac_ext >&5
10601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604
10605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607
10608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609# Binary search between lo and hi bounds.
10610while test "x$ac_lo" != "x$ac_hi"; do
10611 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10612 cat >conftest.$ac_ext <<_ACEOF
10613/* confdefs.h. */
10614_ACEOF
10615cat confdefs.h >>conftest.$ac_ext
10616cat >>conftest.$ac_ext <<_ACEOF
10617/* end confdefs.h. */
10618$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010619 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620int
10621main ()
10622{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624test_array [0] = 0
10625
10626 ;
10627 return 0;
10628}
10629_ACEOF
10630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631if { (ac_try="$ac_compile"
10632case "(($ac_try" in
10633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10634 *) ac_try_echo=$ac_try;;
10635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638 ac_status=$?
10639 grep -v '^ *+' conftest.er1 >conftest.err
10640 rm -f conftest.er1
10641 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643 (exit $ac_status); } && {
10644 test -z "$ac_c_werror_flag" ||
10645 test ! -s conftest.err
10646 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647 ac_hi=$ac_mid
10648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010649 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650sed 's/^/| /' conftest.$ac_ext >&5
10651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654
10655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656done
10657case $ac_lo in
10658?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 else
10666 ac_cv_sizeof_size_t=0
10667 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668esac
10669else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 cat >conftest.$ac_ext <<_ACEOF
10671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
10676$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010677 typedef size_t ac__type_sizeof_;
10678static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10679static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680#include <stdio.h>
10681#include <stdlib.h>
10682int
10683main ()
10684{
10685
10686 FILE *f = fopen ("conftest.val", "w");
10687 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010689 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010694 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695 }
10696 else
10697 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010699 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010701 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704
10705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710if { (ac_try="$ac_link"
10711case "(($ac_try" in
10712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713 *) ac_try_echo=$ac_try;;
10714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720 { (case "(($ac_try" in
10721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10722 *) ac_try_echo=$ac_try;;
10723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 (exit $ac_status); }; }; then
10729 ac_cv_sizeof_size_t=`cat conftest.val`
10730else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010731 echo "$as_me: program exited with status $ac_status" >&5
10732echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733sed 's/^/| /' conftest.$ac_ext >&5
10734
10735( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010737 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010738See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010739echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 else
10743 ac_cv_sizeof_size_t=0
10744 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746rm -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 +000010747fi
10748rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10751echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752
10753
10754
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755cat >>confdefs.h <<_ACEOF
10756#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10757_ACEOF
10758
10759
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010760{ echo "$as_me:$LINENO: checking for pid_t" >&5
10761echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10762if test "${ac_cv_type_pid_t+set}" = set; then
10763 echo $ECHO_N "(cached) $ECHO_C" >&6
10764else
10765 cat >conftest.$ac_ext <<_ACEOF
10766/* confdefs.h. */
10767_ACEOF
10768cat confdefs.h >>conftest.$ac_ext
10769cat >>conftest.$ac_ext <<_ACEOF
10770/* end confdefs.h. */
10771$ac_includes_default
10772typedef pid_t ac__type_new_;
10773int
10774main ()
10775{
10776if ((ac__type_new_ *) 0)
10777 return 0;
10778if (sizeof (ac__type_new_))
10779 return 0;
10780 ;
10781 return 0;
10782}
10783_ACEOF
10784rm -f conftest.$ac_objext
10785if { (ac_try="$ac_compile"
10786case "(($ac_try" in
10787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10788 *) ac_try_echo=$ac_try;;
10789esac
10790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10791 (eval "$ac_compile") 2>conftest.er1
10792 ac_status=$?
10793 grep -v '^ *+' conftest.er1 >conftest.err
10794 rm -f conftest.er1
10795 cat conftest.err >&5
10796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10797 (exit $ac_status); } && {
10798 test -z "$ac_c_werror_flag" ||
10799 test ! -s conftest.err
10800 } && test -s conftest.$ac_objext; then
10801 ac_cv_type_pid_t=yes
10802else
10803 echo "$as_me: failed program was:" >&5
10804sed 's/^/| /' conftest.$ac_ext >&5
10805
10806 ac_cv_type_pid_t=no
10807fi
10808
10809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810fi
10811{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10812echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10813
Christian Heimes400adb02008-02-01 08:12:03 +000010814# The cast to long int works around a bug in the HP C Compiler
10815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10817# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010818{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10819echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010820if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010821 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010822else
10823 if test "$cross_compiling" = yes; then
10824 # Depending upon the size, compute the lo and hi bounds.
10825cat >conftest.$ac_ext <<_ACEOF
10826/* confdefs.h. */
10827_ACEOF
10828cat confdefs.h >>conftest.$ac_ext
10829cat >>conftest.$ac_ext <<_ACEOF
10830/* end confdefs.h. */
10831$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010832 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010833int
10834main ()
10835{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010836static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010837test_array [0] = 0
10838
10839 ;
10840 return 0;
10841}
10842_ACEOF
10843rm -f conftest.$ac_objext
10844if { (ac_try="$ac_compile"
10845case "(($ac_try" in
10846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10847 *) ac_try_echo=$ac_try;;
10848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010850 (eval "$ac_compile") 2>conftest.er1
10851 ac_status=$?
10852 grep -v '^ *+' conftest.er1 >conftest.err
10853 rm -f conftest.er1
10854 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010856 (exit $ac_status); } && {
10857 test -z "$ac_c_werror_flag" ||
10858 test ! -s conftest.err
10859 } && test -s conftest.$ac_objext; then
10860 ac_lo=0 ac_mid=0
10861 while :; do
10862 cat >conftest.$ac_ext <<_ACEOF
10863/* confdefs.h. */
10864_ACEOF
10865cat confdefs.h >>conftest.$ac_ext
10866cat >>conftest.$ac_ext <<_ACEOF
10867/* end confdefs.h. */
10868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010869 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010870int
10871main ()
10872{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010873static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010874test_array [0] = 0
10875
10876 ;
10877 return 0;
10878}
10879_ACEOF
10880rm -f conftest.$ac_objext
10881if { (ac_try="$ac_compile"
10882case "(($ac_try" in
10883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10884 *) ac_try_echo=$ac_try;;
10885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010887 (eval "$ac_compile") 2>conftest.er1
10888 ac_status=$?
10889 grep -v '^ *+' conftest.er1 >conftest.err
10890 rm -f conftest.er1
10891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010893 (exit $ac_status); } && {
10894 test -z "$ac_c_werror_flag" ||
10895 test ! -s conftest.err
10896 } && test -s conftest.$ac_objext; then
10897 ac_hi=$ac_mid; break
10898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010899 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010900sed 's/^/| /' conftest.$ac_ext >&5
10901
10902 ac_lo=`expr $ac_mid + 1`
10903 if test $ac_lo -le $ac_mid; then
10904 ac_lo= ac_hi=
10905 break
10906 fi
10907 ac_mid=`expr 2 '*' $ac_mid + 1`
10908fi
10909
10910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10911 done
10912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010913 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010914sed 's/^/| /' conftest.$ac_ext >&5
10915
10916 cat >conftest.$ac_ext <<_ACEOF
10917/* confdefs.h. */
10918_ACEOF
10919cat confdefs.h >>conftest.$ac_ext
10920cat >>conftest.$ac_ext <<_ACEOF
10921/* end confdefs.h. */
10922$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010923 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010924int
10925main ()
10926{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010927static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010928test_array [0] = 0
10929
10930 ;
10931 return 0;
10932}
10933_ACEOF
10934rm -f conftest.$ac_objext
10935if { (ac_try="$ac_compile"
10936case "(($ac_try" in
10937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10938 *) ac_try_echo=$ac_try;;
10939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010941 (eval "$ac_compile") 2>conftest.er1
10942 ac_status=$?
10943 grep -v '^ *+' conftest.er1 >conftest.err
10944 rm -f conftest.er1
10945 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010947 (exit $ac_status); } && {
10948 test -z "$ac_c_werror_flag" ||
10949 test ! -s conftest.err
10950 } && test -s conftest.$ac_objext; then
10951 ac_hi=-1 ac_mid=-1
10952 while :; do
10953 cat >conftest.$ac_ext <<_ACEOF
10954/* confdefs.h. */
10955_ACEOF
10956cat confdefs.h >>conftest.$ac_ext
10957cat >>conftest.$ac_ext <<_ACEOF
10958/* end confdefs.h. */
10959$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010960 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010961int
10962main ()
10963{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010964static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010965test_array [0] = 0
10966
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971rm -f conftest.$ac_objext
10972if { (ac_try="$ac_compile"
10973case "(($ac_try" in
10974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10975 *) ac_try_echo=$ac_try;;
10976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010978 (eval "$ac_compile") 2>conftest.er1
10979 ac_status=$?
10980 grep -v '^ *+' conftest.er1 >conftest.err
10981 rm -f conftest.er1
10982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010984 (exit $ac_status); } && {
10985 test -z "$ac_c_werror_flag" ||
10986 test ! -s conftest.err
10987 } && test -s conftest.$ac_objext; then
10988 ac_lo=$ac_mid; break
10989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010990 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010991sed 's/^/| /' conftest.$ac_ext >&5
10992
10993 ac_hi=`expr '(' $ac_mid ')' - 1`
10994 if test $ac_mid -le $ac_hi; then
10995 ac_lo= ac_hi=
10996 break
10997 fi
10998 ac_mid=`expr 2 '*' $ac_mid`
10999fi
11000
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002 done
11003else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011004 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011005sed 's/^/| /' conftest.$ac_ext >&5
11006
11007 ac_lo= ac_hi=
11008fi
11009
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011fi
11012
11013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11014# Binary search between lo and hi bounds.
11015while test "x$ac_lo" != "x$ac_hi"; do
11016 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11017 cat >conftest.$ac_ext <<_ACEOF
11018/* confdefs.h. */
11019_ACEOF
11020cat confdefs.h >>conftest.$ac_ext
11021cat >>conftest.$ac_ext <<_ACEOF
11022/* end confdefs.h. */
11023$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011024 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011025int
11026main ()
11027{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011029test_array [0] = 0
11030
11031 ;
11032 return 0;
11033}
11034_ACEOF
11035rm -f conftest.$ac_objext
11036if { (ac_try="$ac_compile"
11037case "(($ac_try" in
11038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11039 *) ac_try_echo=$ac_try;;
11040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011042 (eval "$ac_compile") 2>conftest.er1
11043 ac_status=$?
11044 grep -v '^ *+' conftest.er1 >conftest.err
11045 rm -f conftest.er1
11046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011048 (exit $ac_status); } && {
11049 test -z "$ac_c_werror_flag" ||
11050 test ! -s conftest.err
11051 } && test -s conftest.$ac_objext; then
11052 ac_hi=$ac_mid
11053else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011054 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011055sed 's/^/| /' conftest.$ac_ext >&5
11056
11057 ac_lo=`expr '(' $ac_mid ')' + 1`
11058fi
11059
11060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11061done
11062case $ac_lo in
11063?*) ac_cv_sizeof_pid_t=$ac_lo;;
11064'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011066See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011068See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011070 else
11071 ac_cv_sizeof_pid_t=0
11072 fi ;;
11073esac
11074else
11075 cat >conftest.$ac_ext <<_ACEOF
11076/* confdefs.h. */
11077_ACEOF
11078cat confdefs.h >>conftest.$ac_ext
11079cat >>conftest.$ac_ext <<_ACEOF
11080/* end confdefs.h. */
11081$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011082 typedef pid_t ac__type_sizeof_;
11083static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11084static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011085#include <stdio.h>
11086#include <stdlib.h>
11087int
11088main ()
11089{
11090
11091 FILE *f = fopen ("conftest.val", "w");
11092 if (! f)
11093 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011094 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011095 {
11096 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011097 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011098 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011100 }
11101 else
11102 {
11103 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011104 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011105 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011106 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011107 }
11108 return ferror (f) || fclose (f) != 0;
11109
11110 ;
11111 return 0;
11112}
11113_ACEOF
11114rm -f conftest$ac_exeext
11115if { (ac_try="$ac_link"
11116case "(($ac_try" in
11117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11118 *) ac_try_echo=$ac_try;;
11119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011121 (eval "$ac_link") 2>&5
11122 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11125 { (case "(($ac_try" in
11126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11127 *) ac_try_echo=$ac_try;;
11128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011130 (eval "$ac_try") 2>&5
11131 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011133 (exit $ac_status); }; }; then
11134 ac_cv_sizeof_pid_t=`cat conftest.val`
11135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011136 echo "$as_me: program exited with status $ac_status" >&5
11137echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011138sed 's/^/| /' conftest.$ac_ext >&5
11139
11140( exit $ac_status )
11141if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011142 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011143See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011144echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011145See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011147 else
11148 ac_cv_sizeof_pid_t=0
11149 fi
11150fi
11151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11152fi
11153rm -f conftest.val
11154fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011155{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11156echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011157
11158
11159
11160cat >>confdefs.h <<_ACEOF
11161#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11162_ACEOF
11163
11164
Michael W. Hudson54241132001-12-07 15:38:26 +000011165
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011166{ echo "$as_me:$LINENO: checking for long long support" >&5
11167echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011168have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175
Martin v. Löwis11437992002-04-12 09:54:03 +000011176int
11177main ()
11178{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 ;
11181 return 0;
11182}
11183_ACEOF
11184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185if { (ac_try="$ac_compile"
11186case "(($ac_try" in
11187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11188 *) ac_try_echo=$ac_try;;
11189esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011193 grep -v '^ *+' conftest.er1 >conftest.err
11194 rm -f conftest.er1
11195 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197 (exit $ac_status); } && {
11198 test -z "$ac_c_werror_flag" ||
11199 test ! -s conftest.err
11200 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011201
11202
11203cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011204#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011205_ACEOF
11206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011207 have_long_long=yes
11208
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011211sed 's/^/| /' conftest.$ac_ext >&5
11212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215
11216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011217{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11218echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011219if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011220{ echo "$as_me:$LINENO: checking for long long" >&5
11221echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11222if test "${ac_cv_type_long_long+set}" = set; then
11223 echo $ECHO_N "(cached) $ECHO_C" >&6
11224else
11225 cat >conftest.$ac_ext <<_ACEOF
11226/* confdefs.h. */
11227_ACEOF
11228cat confdefs.h >>conftest.$ac_ext
11229cat >>conftest.$ac_ext <<_ACEOF
11230/* end confdefs.h. */
11231$ac_includes_default
11232typedef long long ac__type_new_;
11233int
11234main ()
11235{
11236if ((ac__type_new_ *) 0)
11237 return 0;
11238if (sizeof (ac__type_new_))
11239 return 0;
11240 ;
11241 return 0;
11242}
11243_ACEOF
11244rm -f conftest.$ac_objext
11245if { (ac_try="$ac_compile"
11246case "(($ac_try" in
11247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11248 *) ac_try_echo=$ac_try;;
11249esac
11250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11251 (eval "$ac_compile") 2>conftest.er1
11252 ac_status=$?
11253 grep -v '^ *+' conftest.er1 >conftest.err
11254 rm -f conftest.er1
11255 cat conftest.err >&5
11256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257 (exit $ac_status); } && {
11258 test -z "$ac_c_werror_flag" ||
11259 test ! -s conftest.err
11260 } && test -s conftest.$ac_objext; then
11261 ac_cv_type_long_long=yes
11262else
11263 echo "$as_me: failed program was:" >&5
11264sed 's/^/| /' conftest.$ac_ext >&5
11265
11266 ac_cv_type_long_long=no
11267fi
11268
11269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11270fi
11271{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11272echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274# The cast to long int works around a bug in the HP C Compiler
11275# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11276# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11277# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011278{ echo "$as_me:$LINENO: checking size of long long" >&5
11279echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011280if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011281 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011282else
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 if test "$cross_compiling" = yes; then
11284 # Depending upon the size, compute the lo and hi bounds.
11285cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* confdefs.h. */
11287_ACEOF
11288cat confdefs.h >>conftest.$ac_ext
11289cat >>conftest.$ac_ext <<_ACEOF
11290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011291$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011292 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011293int
11294main ()
11295{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011296static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011297test_array [0] = 0
11298
11299 ;
11300 return 0;
11301}
11302_ACEOF
11303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304if { (ac_try="$ac_compile"
11305case "(($ac_try" in
11306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11307 *) ac_try_echo=$ac_try;;
11308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011312 grep -v '^ *+' conftest.er1 >conftest.err
11313 rm -f conftest.er1
11314 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316 (exit $ac_status); } && {
11317 test -z "$ac_c_werror_flag" ||
11318 test ! -s conftest.err
11319 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_lo=0 ac_mid=0
11321 while :; do
11322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* confdefs.h. */
11324_ACEOF
11325cat confdefs.h >>conftest.$ac_ext
11326cat >>conftest.$ac_ext <<_ACEOF
11327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011328$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011329 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011333static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011334test_array [0] = 0
11335
11336 ;
11337 return 0;
11338}
11339_ACEOF
11340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341if { (ac_try="$ac_compile"
11342case "(($ac_try" in
11343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11344 *) ac_try_echo=$ac_try;;
11345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011349 grep -v '^ *+' conftest.er1 >conftest.err
11350 rm -f conftest.er1
11351 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353 (exit $ac_status); } && {
11354 test -z "$ac_c_werror_flag" ||
11355 test ! -s conftest.err
11356 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ac_hi=$ac_mid; break
11358else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011360sed 's/^/| /' conftest.$ac_ext >&5
11361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362 ac_lo=`expr $ac_mid + 1`
11363 if test $ac_lo -le $ac_mid; then
11364 ac_lo= ac_hi=
11365 break
11366 fi
11367 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369
11370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 done
11372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011374sed 's/^/| /' conftest.$ac_ext >&5
11375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011377/* confdefs.h. */
11378_ACEOF
11379cat confdefs.h >>conftest.$ac_ext
11380cat >>conftest.$ac_ext <<_ACEOF
11381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011382$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011383 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011384int
11385main ()
11386{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011388test_array [0] = 0
11389
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395if { (ac_try="$ac_compile"
11396case "(($ac_try" in
11397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11398 *) ac_try_echo=$ac_try;;
11399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011403 grep -v '^ *+' conftest.er1 >conftest.err
11404 rm -f conftest.er1
11405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407 (exit $ac_status); } && {
11408 test -z "$ac_c_werror_flag" ||
11409 test ! -s conftest.err
11410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 ac_hi=-1 ac_mid=-1
11412 while :; do
11413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* confdefs.h. */
11415_ACEOF
11416cat confdefs.h >>conftest.$ac_ext
11417cat >>conftest.$ac_ext <<_ACEOF
11418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011419$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011420 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011421int
11422main ()
11423{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011425test_array [0] = 0
11426
11427 ;
11428 return 0;
11429}
11430_ACEOF
11431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432if { (ac_try="$ac_compile"
11433case "(($ac_try" in
11434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11435 *) ac_try_echo=$ac_try;;
11436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011440 grep -v '^ *+' conftest.er1 >conftest.err
11441 rm -f conftest.er1
11442 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444 (exit $ac_status); } && {
11445 test -z "$ac_c_werror_flag" ||
11446 test ! -s conftest.err
11447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ac_lo=$ac_mid; break
11449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011451sed 's/^/| /' conftest.$ac_ext >&5
11452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453 ac_hi=`expr '(' $ac_mid ')' - 1`
11454 if test $ac_mid -le $ac_hi; then
11455 ac_lo= ac_hi=
11456 break
11457 fi
11458 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 done
11463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011465sed 's/^/| /' conftest.$ac_ext >&5
11466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469
11470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472
11473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011474# Binary search between lo and hi bounds.
11475while test "x$ac_lo" != "x$ac_hi"; do
11476 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011478/* confdefs.h. */
11479_ACEOF
11480cat confdefs.h >>conftest.$ac_ext
11481cat >>conftest.$ac_ext <<_ACEOF
11482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011483$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011484 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011485int
11486main ()
11487{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011489test_array [0] = 0
11490
11491 ;
11492 return 0;
11493}
11494_ACEOF
11495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496if { (ac_try="$ac_compile"
11497case "(($ac_try" in
11498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11499 *) ac_try_echo=$ac_try;;
11500esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011504 grep -v '^ *+' conftest.er1 >conftest.err
11505 rm -f conftest.er1
11506 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508 (exit $ac_status); } && {
11509 test -z "$ac_c_werror_flag" ||
11510 test ! -s conftest.err
11511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ac_hi=$ac_mid
11513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011515sed 's/^/| /' conftest.$ac_ext >&5
11516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519
11520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011521done
11522case $ac_lo in
11523?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011526See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011528See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 else
11531 ac_cv_sizeof_long_long=0
11532 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011533esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011534else
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011536/* confdefs.h. */
11537_ACEOF
11538cat confdefs.h >>conftest.$ac_ext
11539cat >>conftest.$ac_ext <<_ACEOF
11540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011541$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011542 typedef long long ac__type_sizeof_;
11543static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11544static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011546#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011547int
11548main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549{
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
11551 FILE *f = fopen ("conftest.val", "w");
11552 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011554 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011557 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 }
11561 else
11562 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011564 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011566 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
11570 ;
11571 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572}
Martin v. Löwis11437992002-04-12 09:54:03 +000011573_ACEOF
11574rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575if { (ac_try="$ac_link"
11576case "(($ac_try" in
11577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11578 *) ac_try_echo=$ac_try;;
11579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585 { (case "(($ac_try" in
11586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11587 *) ac_try_echo=$ac_try;;
11588esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 (exit $ac_status); }; }; then
11594 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011596 echo "$as_me: program exited with status $ac_status" >&5
11597echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011598sed 's/^/| /' conftest.$ac_ext >&5
11599
Martin v. Löwis11437992002-04-12 09:54:03 +000011600( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011602 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011603See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011605See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607 else
11608 ac_cv_sizeof_long_long=0
11609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611rm -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 +000011612fi
11613rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011614fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011615{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11616echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617
11618
11619
Martin v. Löwis11437992002-04-12 09:54:03 +000011620cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623
Michael W. Hudson54241132001-12-07 15:38:26 +000011624
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625fi
11626
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011627{ echo "$as_me:$LINENO: checking for long double support" >&5
11628echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011629have_long_double=no
11630cat >conftest.$ac_ext <<_ACEOF
11631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
11636
11637int
11638main ()
11639{
11640long double x; x = (long double)0;
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext
11646if { (ac_try="$ac_compile"
11647case "(($ac_try" in
11648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11649 *) ac_try_echo=$ac_try;;
11650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011652 (eval "$ac_compile") 2>conftest.er1
11653 ac_status=$?
11654 grep -v '^ *+' conftest.er1 >conftest.err
11655 rm -f conftest.er1
11656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011658 (exit $ac_status); } && {
11659 test -z "$ac_c_werror_flag" ||
11660 test ! -s conftest.err
11661 } && test -s conftest.$ac_objext; then
11662
11663
11664cat >>confdefs.h <<\_ACEOF
11665#define HAVE_LONG_DOUBLE 1
11666_ACEOF
11667
11668 have_long_double=yes
11669
11670else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011671 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011672sed 's/^/| /' conftest.$ac_ext >&5
11673
11674
11675fi
11676
11677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011678{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11679echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011680if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011681{ echo "$as_me:$LINENO: checking for long double" >&5
11682echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11683if test "${ac_cv_type_long_double+set}" = set; then
11684 echo $ECHO_N "(cached) $ECHO_C" >&6
11685else
11686 cat >conftest.$ac_ext <<_ACEOF
11687/* confdefs.h. */
11688_ACEOF
11689cat confdefs.h >>conftest.$ac_ext
11690cat >>conftest.$ac_ext <<_ACEOF
11691/* end confdefs.h. */
11692$ac_includes_default
11693typedef long double ac__type_new_;
11694int
11695main ()
11696{
11697if ((ac__type_new_ *) 0)
11698 return 0;
11699if (sizeof (ac__type_new_))
11700 return 0;
11701 ;
11702 return 0;
11703}
11704_ACEOF
11705rm -f conftest.$ac_objext
11706if { (ac_try="$ac_compile"
11707case "(($ac_try" in
11708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11709 *) ac_try_echo=$ac_try;;
11710esac
11711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11712 (eval "$ac_compile") 2>conftest.er1
11713 ac_status=$?
11714 grep -v '^ *+' conftest.er1 >conftest.err
11715 rm -f conftest.er1
11716 cat conftest.err >&5
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); } && {
11719 test -z "$ac_c_werror_flag" ||
11720 test ! -s conftest.err
11721 } && test -s conftest.$ac_objext; then
11722 ac_cv_type_long_double=yes
11723else
11724 echo "$as_me: failed program was:" >&5
11725sed 's/^/| /' conftest.$ac_ext >&5
11726
11727 ac_cv_type_long_double=no
11728fi
11729
11730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11731fi
11732{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11733echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11734
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735# The cast to long int works around a bug in the HP C Compiler
11736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11738# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011739{ echo "$as_me:$LINENO: checking size of long double" >&5
11740echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011742 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011743else
11744 if test "$cross_compiling" = yes; then
11745 # Depending upon the size, compute the lo and hi bounds.
11746cat >conftest.$ac_ext <<_ACEOF
11747/* confdefs.h. */
11748_ACEOF
11749cat confdefs.h >>conftest.$ac_ext
11750cat >>conftest.$ac_ext <<_ACEOF
11751/* end confdefs.h. */
11752$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011753 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754int
11755main ()
11756{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758test_array [0] = 0
11759
11760 ;
11761 return 0;
11762}
11763_ACEOF
11764rm -f conftest.$ac_objext
11765if { (ac_try="$ac_compile"
11766case "(($ac_try" in
11767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11768 *) ac_try_echo=$ac_try;;
11769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011771 (eval "$ac_compile") 2>conftest.er1
11772 ac_status=$?
11773 grep -v '^ *+' conftest.er1 >conftest.err
11774 rm -f conftest.er1
11775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777 (exit $ac_status); } && {
11778 test -z "$ac_c_werror_flag" ||
11779 test ! -s conftest.err
11780 } && test -s conftest.$ac_objext; then
11781 ac_lo=0 ac_mid=0
11782 while :; do
11783 cat >conftest.$ac_ext <<_ACEOF
11784/* confdefs.h. */
11785_ACEOF
11786cat confdefs.h >>conftest.$ac_ext
11787cat >>conftest.$ac_ext <<_ACEOF
11788/* end confdefs.h. */
11789$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011790 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011791int
11792main ()
11793{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795test_array [0] = 0
11796
11797 ;
11798 return 0;
11799}
11800_ACEOF
11801rm -f conftest.$ac_objext
11802if { (ac_try="$ac_compile"
11803case "(($ac_try" in
11804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11805 *) ac_try_echo=$ac_try;;
11806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011808 (eval "$ac_compile") 2>conftest.er1
11809 ac_status=$?
11810 grep -v '^ *+' conftest.er1 >conftest.err
11811 rm -f conftest.er1
11812 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814 (exit $ac_status); } && {
11815 test -z "$ac_c_werror_flag" ||
11816 test ! -s conftest.err
11817 } && test -s conftest.$ac_objext; then
11818 ac_hi=$ac_mid; break
11819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011820 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011821sed 's/^/| /' conftest.$ac_ext >&5
11822
11823 ac_lo=`expr $ac_mid + 1`
11824 if test $ac_lo -le $ac_mid; then
11825 ac_lo= ac_hi=
11826 break
11827 fi
11828 ac_mid=`expr 2 '*' $ac_mid + 1`
11829fi
11830
11831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11832 done
11833else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011834 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011835sed 's/^/| /' conftest.$ac_ext >&5
11836
11837 cat >conftest.$ac_ext <<_ACEOF
11838/* confdefs.h. */
11839_ACEOF
11840cat confdefs.h >>conftest.$ac_ext
11841cat >>conftest.$ac_ext <<_ACEOF
11842/* end confdefs.h. */
11843$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011844 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845int
11846main ()
11847{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849test_array [0] = 0
11850
11851 ;
11852 return 0;
11853}
11854_ACEOF
11855rm -f conftest.$ac_objext
11856if { (ac_try="$ac_compile"
11857case "(($ac_try" in
11858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11859 *) ac_try_echo=$ac_try;;
11860esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011862 (eval "$ac_compile") 2>conftest.er1
11863 ac_status=$?
11864 grep -v '^ *+' conftest.er1 >conftest.err
11865 rm -f conftest.er1
11866 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011868 (exit $ac_status); } && {
11869 test -z "$ac_c_werror_flag" ||
11870 test ! -s conftest.err
11871 } && test -s conftest.$ac_objext; then
11872 ac_hi=-1 ac_mid=-1
11873 while :; do
11874 cat >conftest.$ac_ext <<_ACEOF
11875/* confdefs.h. */
11876_ACEOF
11877cat confdefs.h >>conftest.$ac_ext
11878cat >>conftest.$ac_ext <<_ACEOF
11879/* end confdefs.h. */
11880$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011881 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011882int
11883main ()
11884{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011886test_array [0] = 0
11887
11888 ;
11889 return 0;
11890}
11891_ACEOF
11892rm -f conftest.$ac_objext
11893if { (ac_try="$ac_compile"
11894case "(($ac_try" in
11895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11896 *) ac_try_echo=$ac_try;;
11897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011899 (eval "$ac_compile") 2>conftest.er1
11900 ac_status=$?
11901 grep -v '^ *+' conftest.er1 >conftest.err
11902 rm -f conftest.er1
11903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011905 (exit $ac_status); } && {
11906 test -z "$ac_c_werror_flag" ||
11907 test ! -s conftest.err
11908 } && test -s conftest.$ac_objext; then
11909 ac_lo=$ac_mid; break
11910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011911 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011912sed 's/^/| /' conftest.$ac_ext >&5
11913
11914 ac_hi=`expr '(' $ac_mid ')' - 1`
11915 if test $ac_mid -le $ac_hi; then
11916 ac_lo= ac_hi=
11917 break
11918 fi
11919 ac_mid=`expr 2 '*' $ac_mid`
11920fi
11921
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923 done
11924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011925 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011926sed 's/^/| /' conftest.$ac_ext >&5
11927
11928 ac_lo= ac_hi=
11929fi
11930
11931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932fi
11933
11934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11935# Binary search between lo and hi bounds.
11936while test "x$ac_lo" != "x$ac_hi"; do
11937 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11938 cat >conftest.$ac_ext <<_ACEOF
11939/* confdefs.h. */
11940_ACEOF
11941cat confdefs.h >>conftest.$ac_ext
11942cat >>conftest.$ac_ext <<_ACEOF
11943/* end confdefs.h. */
11944$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011945 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011946int
11947main ()
11948{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011949static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950test_array [0] = 0
11951
11952 ;
11953 return 0;
11954}
11955_ACEOF
11956rm -f conftest.$ac_objext
11957if { (ac_try="$ac_compile"
11958case "(($ac_try" in
11959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11960 *) ac_try_echo=$ac_try;;
11961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 (eval "$ac_compile") 2>conftest.er1
11964 ac_status=$?
11965 grep -v '^ *+' conftest.er1 >conftest.err
11966 rm -f conftest.er1
11967 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011969 (exit $ac_status); } && {
11970 test -z "$ac_c_werror_flag" ||
11971 test ! -s conftest.err
11972 } && test -s conftest.$ac_objext; then
11973 ac_hi=$ac_mid
11974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011975 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011976sed 's/^/| /' conftest.$ac_ext >&5
11977
11978 ac_lo=`expr '(' $ac_mid ')' + 1`
11979fi
11980
11981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11982done
11983case $ac_lo in
11984?*) ac_cv_sizeof_long_double=$ac_lo;;
11985'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991 else
11992 ac_cv_sizeof_long_double=0
11993 fi ;;
11994esac
11995else
11996 cat >conftest.$ac_ext <<_ACEOF
11997/* confdefs.h. */
11998_ACEOF
11999cat confdefs.h >>conftest.$ac_ext
12000cat >>conftest.$ac_ext <<_ACEOF
12001/* end confdefs.h. */
12002$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012003 typedef long double ac__type_sizeof_;
12004static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12005static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012006#include <stdio.h>
12007#include <stdlib.h>
12008int
12009main ()
12010{
12011
12012 FILE *f = fopen ("conftest.val", "w");
12013 if (! f)
12014 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012015 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016 {
12017 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012018 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021 }
12022 else
12023 {
12024 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012025 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012026 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012027 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028 }
12029 return ferror (f) || fclose (f) != 0;
12030
12031 ;
12032 return 0;
12033}
12034_ACEOF
12035rm -f conftest$ac_exeext
12036if { (ac_try="$ac_link"
12037case "(($ac_try" in
12038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12039 *) ac_try_echo=$ac_try;;
12040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012042 (eval "$ac_link") 2>&5
12043 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12046 { (case "(($ac_try" in
12047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12048 *) ac_try_echo=$ac_try;;
12049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012051 (eval "$ac_try") 2>&5
12052 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012054 (exit $ac_status); }; }; then
12055 ac_cv_sizeof_long_double=`cat conftest.val`
12056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012057 echo "$as_me: program exited with status $ac_status" >&5
12058echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012059sed 's/^/| /' conftest.$ac_ext >&5
12060
12061( exit $ac_status )
12062if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012063 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012064See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068 else
12069 ac_cv_sizeof_long_double=0
12070 fi
12071fi
12072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12073fi
12074rm -f conftest.val
12075fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12077echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012078
12079
12080
12081cat >>confdefs.h <<_ACEOF
12082#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12083_ACEOF
12084
12085
12086fi
12087
12088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012089{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12090echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012091have_c99_bool=no
12092cat >conftest.$ac_ext <<_ACEOF
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
12098
12099int
12100main ()
12101{
12102_Bool x; x = (_Bool)0;
12103 ;
12104 return 0;
12105}
12106_ACEOF
12107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108if { (ac_try="$ac_compile"
12109case "(($ac_try" in
12110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12111 *) ac_try_echo=$ac_try;;
12112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012115 ac_status=$?
12116 grep -v '^ *+' conftest.er1 >conftest.err
12117 rm -f conftest.er1
12118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120 (exit $ac_status); } && {
12121 test -z "$ac_c_werror_flag" ||
12122 test ! -s conftest.err
12123 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012124
12125
12126cat >>confdefs.h <<\_ACEOF
12127#define HAVE_C99_BOOL 1
12128_ACEOF
12129
12130 have_c99_bool=yes
12131
12132else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012133 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012134sed 's/^/| /' conftest.$ac_ext >&5
12135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136
Thomas Woutersb2137042007-02-01 18:02:27 +000012137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138
12139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012140{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12141echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012142if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012143{ echo "$as_me:$LINENO: checking for _Bool" >&5
12144echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12145if test "${ac_cv_type__Bool+set}" = set; then
12146 echo $ECHO_N "(cached) $ECHO_C" >&6
12147else
12148 cat >conftest.$ac_ext <<_ACEOF
12149/* confdefs.h. */
12150_ACEOF
12151cat confdefs.h >>conftest.$ac_ext
12152cat >>conftest.$ac_ext <<_ACEOF
12153/* end confdefs.h. */
12154$ac_includes_default
12155typedef _Bool ac__type_new_;
12156int
12157main ()
12158{
12159if ((ac__type_new_ *) 0)
12160 return 0;
12161if (sizeof (ac__type_new_))
12162 return 0;
12163 ;
12164 return 0;
12165}
12166_ACEOF
12167rm -f conftest.$ac_objext
12168if { (ac_try="$ac_compile"
12169case "(($ac_try" in
12170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12171 *) ac_try_echo=$ac_try;;
12172esac
12173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12174 (eval "$ac_compile") 2>conftest.er1
12175 ac_status=$?
12176 grep -v '^ *+' conftest.er1 >conftest.err
12177 rm -f conftest.er1
12178 cat conftest.err >&5
12179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12180 (exit $ac_status); } && {
12181 test -z "$ac_c_werror_flag" ||
12182 test ! -s conftest.err
12183 } && test -s conftest.$ac_objext; then
12184 ac_cv_type__Bool=yes
12185else
12186 echo "$as_me: failed program was:" >&5
12187sed 's/^/| /' conftest.$ac_ext >&5
12188
12189 ac_cv_type__Bool=no
12190fi
12191
12192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12193fi
12194{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12195echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197# The cast to long int works around a bug in the HP C Compiler
12198# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12199# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12200# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012201{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12202echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012203if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012204 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012205else
12206 if test "$cross_compiling" = yes; then
12207 # Depending upon the size, compute the lo and hi bounds.
12208cat >conftest.$ac_ext <<_ACEOF
12209/* confdefs.h. */
12210_ACEOF
12211cat confdefs.h >>conftest.$ac_ext
12212cat >>conftest.$ac_ext <<_ACEOF
12213/* end confdefs.h. */
12214$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012215 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012216int
12217main ()
12218{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012220test_array [0] = 0
12221
12222 ;
12223 return 0;
12224}
12225_ACEOF
12226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227if { (ac_try="$ac_compile"
12228case "(($ac_try" in
12229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12230 *) ac_try_echo=$ac_try;;
12231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012234 ac_status=$?
12235 grep -v '^ *+' conftest.er1 >conftest.err
12236 rm -f conftest.er1
12237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239 (exit $ac_status); } && {
12240 test -z "$ac_c_werror_flag" ||
12241 test ! -s conftest.err
12242 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012243 ac_lo=0 ac_mid=0
12244 while :; do
12245 cat >conftest.$ac_ext <<_ACEOF
12246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
12251$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012252 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012253int
12254main ()
12255{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012257test_array [0] = 0
12258
12259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264if { (ac_try="$ac_compile"
12265case "(($ac_try" in
12266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12267 *) ac_try_echo=$ac_try;;
12268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012271 ac_status=$?
12272 grep -v '^ *+' conftest.er1 >conftest.err
12273 rm -f conftest.er1
12274 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276 (exit $ac_status); } && {
12277 test -z "$ac_c_werror_flag" ||
12278 test ! -s conftest.err
12279 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012280 ac_hi=$ac_mid; break
12281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012282 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012283sed 's/^/| /' conftest.$ac_ext >&5
12284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285 ac_lo=`expr $ac_mid + 1`
12286 if test $ac_lo -le $ac_mid; then
12287 ac_lo= ac_hi=
12288 break
12289 fi
12290 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292
12293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012294 done
12295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012296 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012297sed 's/^/| /' conftest.$ac_ext >&5
12298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012300/* confdefs.h. */
12301_ACEOF
12302cat confdefs.h >>conftest.$ac_ext
12303cat >>conftest.$ac_ext <<_ACEOF
12304/* end confdefs.h. */
12305$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012306 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012307int
12308main ()
12309{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012311test_array [0] = 0
12312
12313 ;
12314 return 0;
12315}
12316_ACEOF
12317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318if { (ac_try="$ac_compile"
12319case "(($ac_try" in
12320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12321 *) ac_try_echo=$ac_try;;
12322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012325 ac_status=$?
12326 grep -v '^ *+' conftest.er1 >conftest.err
12327 rm -f conftest.er1
12328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330 (exit $ac_status); } && {
12331 test -z "$ac_c_werror_flag" ||
12332 test ! -s conftest.err
12333 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012334 ac_hi=-1 ac_mid=-1
12335 while :; do
12336 cat >conftest.$ac_ext <<_ACEOF
12337/* confdefs.h. */
12338_ACEOF
12339cat confdefs.h >>conftest.$ac_ext
12340cat >>conftest.$ac_ext <<_ACEOF
12341/* end confdefs.h. */
12342$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012343 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012344int
12345main ()
12346{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012348test_array [0] = 0
12349
12350 ;
12351 return 0;
12352}
12353_ACEOF
12354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355if { (ac_try="$ac_compile"
12356case "(($ac_try" in
12357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12358 *) ac_try_echo=$ac_try;;
12359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012362 ac_status=$?
12363 grep -v '^ *+' conftest.er1 >conftest.err
12364 rm -f conftest.er1
12365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 (exit $ac_status); } && {
12368 test -z "$ac_c_werror_flag" ||
12369 test ! -s conftest.err
12370 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012371 ac_lo=$ac_mid; break
12372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012373 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012374sed 's/^/| /' conftest.$ac_ext >&5
12375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376 ac_hi=`expr '(' $ac_mid ')' - 1`
12377 if test $ac_mid -le $ac_hi; then
12378 ac_lo= ac_hi=
12379 break
12380 fi
12381 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012385 done
12386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012387 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012388sed 's/^/| /' conftest.$ac_ext >&5
12389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
12393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395
12396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012397# Binary search between lo and hi bounds.
12398while test "x$ac_lo" != "x$ac_hi"; do
12399 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12400 cat >conftest.$ac_ext <<_ACEOF
12401/* confdefs.h. */
12402_ACEOF
12403cat confdefs.h >>conftest.$ac_ext
12404cat >>conftest.$ac_ext <<_ACEOF
12405/* end confdefs.h. */
12406$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012407 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012408int
12409main ()
12410{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012412test_array [0] = 0
12413
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419if { (ac_try="$ac_compile"
12420case "(($ac_try" in
12421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12422 *) ac_try_echo=$ac_try;;
12423esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012426 ac_status=$?
12427 grep -v '^ *+' conftest.er1 >conftest.err
12428 rm -f conftest.er1
12429 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431 (exit $ac_status); } && {
12432 test -z "$ac_c_werror_flag" ||
12433 test ! -s conftest.err
12434 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012435 ac_hi=$ac_mid
12436else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012437 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438sed 's/^/| /' conftest.$ac_ext >&5
12439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442
12443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012444done
12445case $ac_lo in
12446?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012449See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012451See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 else
12454 ac_cv_sizeof__Bool=0
12455 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012456esac
12457else
12458 cat >conftest.$ac_ext <<_ACEOF
12459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
12464$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012465 typedef _Bool ac__type_sizeof_;
12466static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12467static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012468#include <stdio.h>
12469#include <stdlib.h>
12470int
12471main ()
12472{
12473
12474 FILE *f = fopen ("conftest.val", "w");
12475 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012477 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012478 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012480 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012483 }
12484 else
12485 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012489 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012490 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012492
12493 ;
12494 return 0;
12495}
12496_ACEOF
12497rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498if { (ac_try="$ac_link"
12499case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012505 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508 { (case "(($ac_try" in
12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12510 *) ac_try_echo=$ac_try;;
12511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012516 (exit $ac_status); }; }; then
12517 ac_cv_sizeof__Bool=`cat conftest.val`
12518else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012519 echo "$as_me: program exited with status $ac_status" >&5
12520echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012521sed 's/^/| /' conftest.$ac_ext >&5
12522
12523( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012526See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012528See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530 else
12531 ac_cv_sizeof__Bool=0
12532 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534rm -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 +000012535fi
12536rm -f conftest.val
12537fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12539echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540
12541
12542
Thomas Woutersb2137042007-02-01 18:02:27 +000012543cat >>confdefs.h <<_ACEOF
12544#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12545_ACEOF
12546
12547
12548fi
12549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012550{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12551echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012552if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012553 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012554else
12555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012556/* confdefs.h. */
12557_ACEOF
12558cat confdefs.h >>conftest.$ac_ext
12559cat >>conftest.$ac_ext <<_ACEOF
12560/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012561#ifdef HAVE_STDINT_H
12562 #include <stdint.h>
12563 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012564
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012565typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012566int
12567main ()
12568{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012569if ((ac__type_new_ *) 0)
12570 return 0;
12571if (sizeof (ac__type_new_))
12572 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 ;
12574 return 0;
12575}
12576_ACEOF
12577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578if { (ac_try="$ac_compile"
12579case "(($ac_try" in
12580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12581 *) ac_try_echo=$ac_try;;
12582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012586 grep -v '^ *+' conftest.er1 >conftest.err
12587 rm -f conftest.er1
12588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590 (exit $ac_status); } && {
12591 test -z "$ac_c_werror_flag" ||
12592 test ! -s conftest.err
12593 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012594 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012597sed 's/^/| /' conftest.$ac_ext >&5
12598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012599 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601
12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012603fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012604{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12605echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12606if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012607
12608cat >>confdefs.h <<_ACEOF
12609#define HAVE_UINTPTR_T 1
12610_ACEOF
12611
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012612{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12613echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12614if test "${ac_cv_type_uintptr_t+set}" = set; then
12615 echo $ECHO_N "(cached) $ECHO_C" >&6
12616else
12617 cat >conftest.$ac_ext <<_ACEOF
12618/* confdefs.h. */
12619_ACEOF
12620cat confdefs.h >>conftest.$ac_ext
12621cat >>conftest.$ac_ext <<_ACEOF
12622/* end confdefs.h. */
12623$ac_includes_default
12624typedef uintptr_t ac__type_new_;
12625int
12626main ()
12627{
12628if ((ac__type_new_ *) 0)
12629 return 0;
12630if (sizeof (ac__type_new_))
12631 return 0;
12632 ;
12633 return 0;
12634}
12635_ACEOF
12636rm -f conftest.$ac_objext
12637if { (ac_try="$ac_compile"
12638case "(($ac_try" in
12639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12640 *) ac_try_echo=$ac_try;;
12641esac
12642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12643 (eval "$ac_compile") 2>conftest.er1
12644 ac_status=$?
12645 grep -v '^ *+' conftest.er1 >conftest.err
12646 rm -f conftest.er1
12647 cat conftest.err >&5
12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649 (exit $ac_status); } && {
12650 test -z "$ac_c_werror_flag" ||
12651 test ! -s conftest.err
12652 } && test -s conftest.$ac_objext; then
12653 ac_cv_type_uintptr_t=yes
12654else
12655 echo "$as_me: failed program was:" >&5
12656sed 's/^/| /' conftest.$ac_ext >&5
12657
12658 ac_cv_type_uintptr_t=no
12659fi
12660
12661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12662fi
12663{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12664echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666# The cast to long int works around a bug in the HP C Compiler
12667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12669# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012670{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12671echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012672if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012674else
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 if test "$cross_compiling" = yes; then
12676 # Depending upon the size, compute the lo and hi bounds.
12677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* confdefs.h. */
12679_ACEOF
12680cat confdefs.h >>conftest.$ac_ext
12681cat >>conftest.$ac_ext <<_ACEOF
12682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012683$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012684 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012685int
12686main ()
12687{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012688static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012689test_array [0] = 0
12690
12691 ;
12692 return 0;
12693}
12694_ACEOF
12695rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696if { (ac_try="$ac_compile"
12697case "(($ac_try" in
12698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12699 *) ac_try_echo=$ac_try;;
12700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012704 grep -v '^ *+' conftest.er1 >conftest.err
12705 rm -f conftest.er1
12706 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708 (exit $ac_status); } && {
12709 test -z "$ac_c_werror_flag" ||
12710 test ! -s conftest.err
12711 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ac_lo=0 ac_mid=0
12713 while :; do
12714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* confdefs.h. */
12716_ACEOF
12717cat confdefs.h >>conftest.$ac_ext
12718cat >>conftest.$ac_ext <<_ACEOF
12719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012720$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012721 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012726test_array [0] = 0
12727
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733if { (ac_try="$ac_compile"
12734case "(($ac_try" in
12735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12736 *) ac_try_echo=$ac_try;;
12737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012741 grep -v '^ *+' conftest.er1 >conftest.err
12742 rm -f conftest.er1
12743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745 (exit $ac_status); } && {
12746 test -z "$ac_c_werror_flag" ||
12747 test ! -s conftest.err
12748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_hi=$ac_mid; break
12750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012752sed 's/^/| /' conftest.$ac_ext >&5
12753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754 ac_lo=`expr $ac_mid + 1`
12755 if test $ac_lo -le $ac_mid; then
12756 ac_lo= ac_hi=
12757 break
12758 fi
12759 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012761
12762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 done
12764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012766sed 's/^/| /' conftest.$ac_ext >&5
12767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012769/* confdefs.h. */
12770_ACEOF
12771cat confdefs.h >>conftest.$ac_ext
12772cat >>conftest.$ac_ext <<_ACEOF
12773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012775 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012776int
12777main ()
12778{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012780test_array [0] = 0
12781
12782 ;
12783 return 0;
12784}
12785_ACEOF
12786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787if { (ac_try="$ac_compile"
12788case "(($ac_try" in
12789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12790 *) ac_try_echo=$ac_try;;
12791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012795 grep -v '^ *+' conftest.er1 >conftest.err
12796 rm -f conftest.er1
12797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799 (exit $ac_status); } && {
12800 test -z "$ac_c_werror_flag" ||
12801 test ! -s conftest.err
12802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ac_hi=-1 ac_mid=-1
12804 while :; do
12805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* confdefs.h. */
12807_ACEOF
12808cat confdefs.h >>conftest.$ac_ext
12809cat >>conftest.$ac_ext <<_ACEOF
12810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012811$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012812 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012813int
12814main ()
12815{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012817test_array [0] = 0
12818
12819 ;
12820 return 0;
12821}
12822_ACEOF
12823rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824if { (ac_try="$ac_compile"
12825case "(($ac_try" in
12826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12827 *) ac_try_echo=$ac_try;;
12828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012832 grep -v '^ *+' conftest.er1 >conftest.err
12833 rm -f conftest.er1
12834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836 (exit $ac_status); } && {
12837 test -z "$ac_c_werror_flag" ||
12838 test ! -s conftest.err
12839 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 ac_lo=$ac_mid; break
12841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012843sed 's/^/| /' conftest.$ac_ext >&5
12844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845 ac_hi=`expr '(' $ac_mid ')' - 1`
12846 if test $ac_mid -le $ac_hi; then
12847 ac_lo= ac_hi=
12848 break
12849 fi
12850 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 done
12855else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012857sed 's/^/| /' conftest.$ac_ext >&5
12858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861
12862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012864
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012866# Binary search between lo and hi bounds.
12867while test "x$ac_lo" != "x$ac_hi"; do
12868 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* confdefs.h. */
12871_ACEOF
12872cat confdefs.h >>conftest.$ac_ext
12873cat >>conftest.$ac_ext <<_ACEOF
12874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012875$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012876 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012877int
12878main ()
12879{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012881test_array [0] = 0
12882
12883 ;
12884 return 0;
12885}
12886_ACEOF
12887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888if { (ac_try="$ac_compile"
12889case "(($ac_try" in
12890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12891 *) ac_try_echo=$ac_try;;
12892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012896 grep -v '^ *+' conftest.er1 >conftest.err
12897 rm -f conftest.er1
12898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900 (exit $ac_status); } && {
12901 test -z "$ac_c_werror_flag" ||
12902 test ! -s conftest.err
12903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ac_hi=$ac_mid
12905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012907sed 's/^/| /' conftest.$ac_ext >&5
12908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911
12912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012913done
12914case $ac_lo in
12915?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012918See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012920See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 else
12923 ac_cv_sizeof_uintptr_t=0
12924 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012925esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012928/* confdefs.h. */
12929_ACEOF
12930cat confdefs.h >>conftest.$ac_ext
12931cat >>conftest.$ac_ext <<_ACEOF
12932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012933$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012934 typedef uintptr_t ac__type_sizeof_;
12935static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12936static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012937#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012938#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012939int
12940main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012941{
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
12943 FILE *f = fopen ("conftest.val", "w");
12944 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012946 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 }
12953 else
12954 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012958 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
12962 ;
12963 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012964}
Martin v. Löwis11437992002-04-12 09:54:03 +000012965_ACEOF
12966rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967if { (ac_try="$ac_link"
12968case "(($ac_try" in
12969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12970 *) ac_try_echo=$ac_try;;
12971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977 { (case "(($ac_try" in
12978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12979 *) ac_try_echo=$ac_try;;
12980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 (exit $ac_status); }; }; then
12986 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012988 echo "$as_me: program exited with status $ac_status" >&5
12989echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012990sed 's/^/| /' conftest.$ac_ext >&5
12991
Martin v. Löwis11437992002-04-12 09:54:03 +000012992( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012995See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012996echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012997See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999 else
13000 ac_cv_sizeof_uintptr_t=0
13001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003rm -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 +000013004fi
13005rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013006fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013007{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13008echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009
13010
13011
Martin v. Löwis11437992002-04-12 09:54:03 +000013012cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013013#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013014_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013015
Michael W. Hudson54241132001-12-07 15:38:26 +000013016
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013017fi
13018
Thomas Wouters89f507f2006-12-13 04:49:30 +000013019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013020{ echo "$as_me:$LINENO: checking for off_t" >&5
13021echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13022if test "${ac_cv_type_off_t+set}" = set; then
13023 echo $ECHO_N "(cached) $ECHO_C" >&6
13024else
13025 cat >conftest.$ac_ext <<_ACEOF
13026/* confdefs.h. */
13027_ACEOF
13028cat confdefs.h >>conftest.$ac_ext
13029cat >>conftest.$ac_ext <<_ACEOF
13030/* end confdefs.h. */
13031
13032#ifdef HAVE_SYS_TYPES_H
13033#include <sys/types.h>
13034#endif
13035
13036
13037typedef off_t ac__type_new_;
13038int
13039main ()
13040{
13041if ((ac__type_new_ *) 0)
13042 return 0;
13043if (sizeof (ac__type_new_))
13044 return 0;
13045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext
13050if { (ac_try="$ac_compile"
13051case "(($ac_try" in
13052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13053 *) ac_try_echo=$ac_try;;
13054esac
13055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13056 (eval "$ac_compile") 2>conftest.er1
13057 ac_status=$?
13058 grep -v '^ *+' conftest.er1 >conftest.err
13059 rm -f conftest.er1
13060 cat conftest.err >&5
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); } && {
13063 test -z "$ac_c_werror_flag" ||
13064 test ! -s conftest.err
13065 } && test -s conftest.$ac_objext; then
13066 ac_cv_type_off_t=yes
13067else
13068 echo "$as_me: failed program was:" >&5
13069sed 's/^/| /' conftest.$ac_ext >&5
13070
13071 ac_cv_type_off_t=no
13072fi
13073
13074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13075fi
13076{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13077echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013079# The cast to long int works around a bug in the HP C Compiler
13080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13082# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013083{ echo "$as_me:$LINENO: checking size of off_t" >&5
13084echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013085if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013086 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087else
13088 if test "$cross_compiling" = yes; then
13089 # Depending upon the size, compute the lo and hi bounds.
13090cat >conftest.$ac_ext <<_ACEOF
13091/* confdefs.h. */
13092_ACEOF
13093cat confdefs.h >>conftest.$ac_ext
13094cat >>conftest.$ac_ext <<_ACEOF
13095/* end confdefs.h. */
13096
13097#ifdef HAVE_SYS_TYPES_H
13098#include <sys/types.h>
13099#endif
13100
13101
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013102 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013103int
13104main ()
13105{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013106static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107test_array [0] = 0
13108
13109 ;
13110 return 0;
13111}
13112_ACEOF
13113rm -f conftest.$ac_objext
13114if { (ac_try="$ac_compile"
13115case "(($ac_try" in
13116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13117 *) ac_try_echo=$ac_try;;
13118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120 (eval "$ac_compile") 2>conftest.er1
13121 ac_status=$?
13122 grep -v '^ *+' conftest.er1 >conftest.err
13123 rm -f conftest.er1
13124 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013126 (exit $ac_status); } && {
13127 test -z "$ac_c_werror_flag" ||
13128 test ! -s conftest.err
13129 } && test -s conftest.$ac_objext; then
13130 ac_lo=0 ac_mid=0
13131 while :; do
13132 cat >conftest.$ac_ext <<_ACEOF
13133/* confdefs.h. */
13134_ACEOF
13135cat confdefs.h >>conftest.$ac_ext
13136cat >>conftest.$ac_ext <<_ACEOF
13137/* end confdefs.h. */
13138
13139#ifdef HAVE_SYS_TYPES_H
13140#include <sys/types.h>
13141#endif
13142
13143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013144 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145int
13146main ()
13147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149test_array [0] = 0
13150
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155rm -f conftest.$ac_objext
13156if { (ac_try="$ac_compile"
13157case "(($ac_try" in
13158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13159 *) ac_try_echo=$ac_try;;
13160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162 (eval "$ac_compile") 2>conftest.er1
13163 ac_status=$?
13164 grep -v '^ *+' conftest.er1 >conftest.err
13165 rm -f conftest.er1
13166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013168 (exit $ac_status); } && {
13169 test -z "$ac_c_werror_flag" ||
13170 test ! -s conftest.err
13171 } && test -s conftest.$ac_objext; then
13172 ac_hi=$ac_mid; break
13173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013174 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175sed 's/^/| /' conftest.$ac_ext >&5
13176
13177 ac_lo=`expr $ac_mid + 1`
13178 if test $ac_lo -le $ac_mid; then
13179 ac_lo= ac_hi=
13180 break
13181 fi
13182 ac_mid=`expr 2 '*' $ac_mid + 1`
13183fi
13184
13185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13186 done
13187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013188 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013189sed 's/^/| /' conftest.$ac_ext >&5
13190
13191 cat >conftest.$ac_ext <<_ACEOF
13192/* confdefs.h. */
13193_ACEOF
13194cat confdefs.h >>conftest.$ac_ext
13195cat >>conftest.$ac_ext <<_ACEOF
13196/* end confdefs.h. */
13197
13198#ifdef HAVE_SYS_TYPES_H
13199#include <sys/types.h>
13200#endif
13201
13202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013203 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013204int
13205main ()
13206{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208test_array [0] = 0
13209
13210 ;
13211 return 0;
13212}
13213_ACEOF
13214rm -f conftest.$ac_objext
13215if { (ac_try="$ac_compile"
13216case "(($ac_try" in
13217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13218 *) ac_try_echo=$ac_try;;
13219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221 (eval "$ac_compile") 2>conftest.er1
13222 ac_status=$?
13223 grep -v '^ *+' conftest.er1 >conftest.err
13224 rm -f conftest.er1
13225 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013227 (exit $ac_status); } && {
13228 test -z "$ac_c_werror_flag" ||
13229 test ! -s conftest.err
13230 } && test -s conftest.$ac_objext; then
13231 ac_hi=-1 ac_mid=-1
13232 while :; do
13233 cat >conftest.$ac_ext <<_ACEOF
13234/* confdefs.h. */
13235_ACEOF
13236cat confdefs.h >>conftest.$ac_ext
13237cat >>conftest.$ac_ext <<_ACEOF
13238/* end confdefs.h. */
13239
13240#ifdef HAVE_SYS_TYPES_H
13241#include <sys/types.h>
13242#endif
13243
13244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013245 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246int
13247main ()
13248{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013249static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250test_array [0] = 0
13251
13252 ;
13253 return 0;
13254}
13255_ACEOF
13256rm -f conftest.$ac_objext
13257if { (ac_try="$ac_compile"
13258case "(($ac_try" in
13259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13260 *) ac_try_echo=$ac_try;;
13261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263 (eval "$ac_compile") 2>conftest.er1
13264 ac_status=$?
13265 grep -v '^ *+' conftest.er1 >conftest.err
13266 rm -f conftest.er1
13267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269 (exit $ac_status); } && {
13270 test -z "$ac_c_werror_flag" ||
13271 test ! -s conftest.err
13272 } && test -s conftest.$ac_objext; then
13273 ac_lo=$ac_mid; break
13274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013275 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276sed 's/^/| /' conftest.$ac_ext >&5
13277
13278 ac_hi=`expr '(' $ac_mid ')' - 1`
13279 if test $ac_mid -le $ac_hi; then
13280 ac_lo= ac_hi=
13281 break
13282 fi
13283 ac_mid=`expr 2 '*' $ac_mid`
13284fi
13285
13286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13287 done
13288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013289 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290sed 's/^/| /' conftest.$ac_ext >&5
13291
13292 ac_lo= ac_hi=
13293fi
13294
13295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13296fi
13297
13298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299# Binary search between lo and hi bounds.
13300while test "x$ac_lo" != "x$ac_hi"; do
13301 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13302 cat >conftest.$ac_ext <<_ACEOF
13303/* confdefs.h. */
13304_ACEOF
13305cat confdefs.h >>conftest.$ac_ext
13306cat >>conftest.$ac_ext <<_ACEOF
13307/* end confdefs.h. */
13308
13309#ifdef HAVE_SYS_TYPES_H
13310#include <sys/types.h>
13311#endif
13312
13313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013314 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013315int
13316main ()
13317{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013319test_array [0] = 0
13320
13321 ;
13322 return 0;
13323}
13324_ACEOF
13325rm -f conftest.$ac_objext
13326if { (ac_try="$ac_compile"
13327case "(($ac_try" in
13328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13329 *) ac_try_echo=$ac_try;;
13330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 (eval "$ac_compile") 2>conftest.er1
13333 ac_status=$?
13334 grep -v '^ *+' conftest.er1 >conftest.err
13335 rm -f conftest.er1
13336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013338 (exit $ac_status); } && {
13339 test -z "$ac_c_werror_flag" ||
13340 test ! -s conftest.err
13341 } && test -s conftest.$ac_objext; then
13342 ac_hi=$ac_mid
13343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013344 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013345sed 's/^/| /' conftest.$ac_ext >&5
13346
13347 ac_lo=`expr '(' $ac_mid ')' + 1`
13348fi
13349
13350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13351done
13352case $ac_lo in
13353?*) ac_cv_sizeof_off_t=$ac_lo;;
13354'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013355 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360 else
13361 ac_cv_sizeof_off_t=0
13362 fi ;;
13363esac
13364else
13365 cat >conftest.$ac_ext <<_ACEOF
13366/* confdefs.h. */
13367_ACEOF
13368cat confdefs.h >>conftest.$ac_ext
13369cat >>conftest.$ac_ext <<_ACEOF
13370/* end confdefs.h. */
13371
13372#ifdef HAVE_SYS_TYPES_H
13373#include <sys/types.h>
13374#endif
13375
13376
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013377 typedef off_t ac__type_sizeof_;
13378static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13379static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380#include <stdio.h>
13381#include <stdlib.h>
13382int
13383main ()
13384{
13385
13386 FILE *f = fopen ("conftest.val", "w");
13387 if (! f)
13388 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013389 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013390 {
13391 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013395 }
13396 else
13397 {
13398 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013399 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013400 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013401 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 }
13403 return ferror (f) || fclose (f) != 0;
13404
13405 ;
13406 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407}
Martin v. Löwis11437992002-04-12 09:54:03 +000013408_ACEOF
13409rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410if { (ac_try="$ac_link"
13411case "(($ac_try" in
13412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13413 *) ac_try_echo=$ac_try;;
13414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 { (case "(($ac_try" in
13421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13422 *) ac_try_echo=$ac_try;;
13423esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013429 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013431 echo "$as_me: program exited with status $ac_status" >&5
13432echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013433sed 's/^/| /' conftest.$ac_ext >&5
13434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013436if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013437 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013438See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013439echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442 else
13443 ac_cv_sizeof_off_t=0
13444 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446rm -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 +000013447fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013448rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013450{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13451echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453
13454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013456#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013458
Michael W. Hudson54241132001-12-07 15:38:26 +000013459
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013461{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13462echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013463if test "$have_long_long" = yes
13464then
13465if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013466 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468cat >>confdefs.h <<\_ACEOF
13469#define HAVE_LARGEFILE_SUPPORT 1
13470_ACEOF
13471
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013472 { echo "$as_me:$LINENO: result: yes" >&5
13473echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013474else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013475 { echo "$as_me:$LINENO: result: no" >&5
13476echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013477fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013478else
13479 { echo "$as_me:$LINENO: result: no" >&5
13480echo "${ECHO_T}no" >&6; }
13481fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013483{ echo "$as_me:$LINENO: checking for time_t" >&5
13484echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13485if test "${ac_cv_type_time_t+set}" = set; then
13486 echo $ECHO_N "(cached) $ECHO_C" >&6
13487else
13488 cat >conftest.$ac_ext <<_ACEOF
13489/* confdefs.h. */
13490_ACEOF
13491cat confdefs.h >>conftest.$ac_ext
13492cat >>conftest.$ac_ext <<_ACEOF
13493/* end confdefs.h. */
13494
13495#ifdef HAVE_SYS_TYPES_H
13496#include <sys/types.h>
13497#endif
13498#ifdef HAVE_TIME_H
13499#include <time.h>
13500#endif
13501
13502
13503typedef time_t ac__type_new_;
13504int
13505main ()
13506{
13507if ((ac__type_new_ *) 0)
13508 return 0;
13509if (sizeof (ac__type_new_))
13510 return 0;
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext
13516if { (ac_try="$ac_compile"
13517case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
13521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13522 (eval "$ac_compile") 2>conftest.er1
13523 ac_status=$?
13524 grep -v '^ *+' conftest.er1 >conftest.err
13525 rm -f conftest.er1
13526 cat conftest.err >&5
13527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13528 (exit $ac_status); } && {
13529 test -z "$ac_c_werror_flag" ||
13530 test ! -s conftest.err
13531 } && test -s conftest.$ac_objext; then
13532 ac_cv_type_time_t=yes
13533else
13534 echo "$as_me: failed program was:" >&5
13535sed 's/^/| /' conftest.$ac_ext >&5
13536
13537 ac_cv_type_time_t=no
13538fi
13539
13540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13541fi
13542{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13543echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545# The cast to long int works around a bug in the HP C Compiler
13546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13548# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013549{ echo "$as_me:$LINENO: checking size of time_t" >&5
13550echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013551if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013552 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013553else
13554 if test "$cross_compiling" = yes; then
13555 # Depending upon the size, compute the lo and hi bounds.
13556cat >conftest.$ac_ext <<_ACEOF
13557/* confdefs.h. */
13558_ACEOF
13559cat confdefs.h >>conftest.$ac_ext
13560cat >>conftest.$ac_ext <<_ACEOF
13561/* end confdefs.h. */
13562
13563#ifdef HAVE_SYS_TYPES_H
13564#include <sys/types.h>
13565#endif
13566#ifdef HAVE_TIME_H
13567#include <time.h>
13568#endif
13569
13570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013571 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013572int
13573main ()
13574{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013576test_array [0] = 0
13577
13578 ;
13579 return 0;
13580}
13581_ACEOF
13582rm -f conftest.$ac_objext
13583if { (ac_try="$ac_compile"
13584case "(($ac_try" in
13585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13586 *) ac_try_echo=$ac_try;;
13587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589 (eval "$ac_compile") 2>conftest.er1
13590 ac_status=$?
13591 grep -v '^ *+' conftest.er1 >conftest.err
13592 rm -f conftest.er1
13593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013595 (exit $ac_status); } && {
13596 test -z "$ac_c_werror_flag" ||
13597 test ! -s conftest.err
13598 } && test -s conftest.$ac_objext; then
13599 ac_lo=0 ac_mid=0
13600 while :; do
13601 cat >conftest.$ac_ext <<_ACEOF
13602/* confdefs.h. */
13603_ACEOF
13604cat confdefs.h >>conftest.$ac_ext
13605cat >>conftest.$ac_ext <<_ACEOF
13606/* end confdefs.h. */
13607
13608#ifdef HAVE_SYS_TYPES_H
13609#include <sys/types.h>
13610#endif
13611#ifdef HAVE_TIME_H
13612#include <time.h>
13613#endif
13614
13615
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013616 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013617int
13618main ()
13619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013621test_array [0] = 0
13622
13623 ;
13624 return 0;
13625}
13626_ACEOF
13627rm -f conftest.$ac_objext
13628if { (ac_try="$ac_compile"
13629case "(($ac_try" in
13630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13631 *) ac_try_echo=$ac_try;;
13632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013634 (eval "$ac_compile") 2>conftest.er1
13635 ac_status=$?
13636 grep -v '^ *+' conftest.er1 >conftest.err
13637 rm -f conftest.er1
13638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013640 (exit $ac_status); } && {
13641 test -z "$ac_c_werror_flag" ||
13642 test ! -s conftest.err
13643 } && test -s conftest.$ac_objext; then
13644 ac_hi=$ac_mid; break
13645else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013646 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013647sed 's/^/| /' conftest.$ac_ext >&5
13648
13649 ac_lo=`expr $ac_mid + 1`
13650 if test $ac_lo -le $ac_mid; then
13651 ac_lo= ac_hi=
13652 break
13653 fi
13654 ac_mid=`expr 2 '*' $ac_mid + 1`
13655fi
13656
13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13658 done
13659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013660 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661sed 's/^/| /' conftest.$ac_ext >&5
13662
13663 cat >conftest.$ac_ext <<_ACEOF
13664/* confdefs.h. */
13665_ACEOF
13666cat confdefs.h >>conftest.$ac_ext
13667cat >>conftest.$ac_ext <<_ACEOF
13668/* end confdefs.h. */
13669
13670#ifdef HAVE_SYS_TYPES_H
13671#include <sys/types.h>
13672#endif
13673#ifdef HAVE_TIME_H
13674#include <time.h>
13675#endif
13676
13677
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013678 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013679int
13680main ()
13681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013683test_array [0] = 0
13684
13685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext
13690if { (ac_try="$ac_compile"
13691case "(($ac_try" in
13692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13693 *) ac_try_echo=$ac_try;;
13694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696 (eval "$ac_compile") 2>conftest.er1
13697 ac_status=$?
13698 grep -v '^ *+' conftest.er1 >conftest.err
13699 rm -f conftest.er1
13700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702 (exit $ac_status); } && {
13703 test -z "$ac_c_werror_flag" ||
13704 test ! -s conftest.err
13705 } && test -s conftest.$ac_objext; then
13706 ac_hi=-1 ac_mid=-1
13707 while :; do
13708 cat >conftest.$ac_ext <<_ACEOF
13709/* confdefs.h. */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h. */
13714
13715#ifdef HAVE_SYS_TYPES_H
13716#include <sys/types.h>
13717#endif
13718#ifdef HAVE_TIME_H
13719#include <time.h>
13720#endif
13721
13722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013723 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013724int
13725main ()
13726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728test_array [0] = 0
13729
13730 ;
13731 return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext
13735if { (ac_try="$ac_compile"
13736case "(($ac_try" in
13737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13738 *) ac_try_echo=$ac_try;;
13739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741 (eval "$ac_compile") 2>conftest.er1
13742 ac_status=$?
13743 grep -v '^ *+' conftest.er1 >conftest.err
13744 rm -f conftest.er1
13745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013747 (exit $ac_status); } && {
13748 test -z "$ac_c_werror_flag" ||
13749 test ! -s conftest.err
13750 } && test -s conftest.$ac_objext; then
13751 ac_lo=$ac_mid; break
13752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013753 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013754sed 's/^/| /' conftest.$ac_ext >&5
13755
13756 ac_hi=`expr '(' $ac_mid ')' - 1`
13757 if test $ac_mid -le $ac_hi; then
13758 ac_lo= ac_hi=
13759 break
13760 fi
13761 ac_mid=`expr 2 '*' $ac_mid`
13762fi
13763
13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13765 done
13766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013767 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768sed 's/^/| /' conftest.$ac_ext >&5
13769
13770 ac_lo= ac_hi=
13771fi
13772
13773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13774fi
13775
13776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777# Binary search between lo and hi bounds.
13778while test "x$ac_lo" != "x$ac_hi"; do
13779 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13780 cat >conftest.$ac_ext <<_ACEOF
13781/* confdefs.h. */
13782_ACEOF
13783cat confdefs.h >>conftest.$ac_ext
13784cat >>conftest.$ac_ext <<_ACEOF
13785/* end confdefs.h. */
13786
13787#ifdef HAVE_SYS_TYPES_H
13788#include <sys/types.h>
13789#endif
13790#ifdef HAVE_TIME_H
13791#include <time.h>
13792#endif
13793
13794
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013795 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013796int
13797main ()
13798{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013799static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013800test_array [0] = 0
13801
13802 ;
13803 return 0;
13804}
13805_ACEOF
13806rm -f conftest.$ac_objext
13807if { (ac_try="$ac_compile"
13808case "(($ac_try" in
13809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13810 *) ac_try_echo=$ac_try;;
13811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813 (eval "$ac_compile") 2>conftest.er1
13814 ac_status=$?
13815 grep -v '^ *+' conftest.er1 >conftest.err
13816 rm -f conftest.er1
13817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013819 (exit $ac_status); } && {
13820 test -z "$ac_c_werror_flag" ||
13821 test ! -s conftest.err
13822 } && test -s conftest.$ac_objext; then
13823 ac_hi=$ac_mid
13824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013825 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013826sed 's/^/| /' conftest.$ac_ext >&5
13827
13828 ac_lo=`expr '(' $ac_mid ')' + 1`
13829fi
13830
13831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13832done
13833case $ac_lo in
13834?*) ac_cv_sizeof_time_t=$ac_lo;;
13835'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013836 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013837See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013839See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013840 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841 else
13842 ac_cv_sizeof_time_t=0
13843 fi ;;
13844esac
13845else
13846 cat >conftest.$ac_ext <<_ACEOF
13847/* confdefs.h. */
13848_ACEOF
13849cat confdefs.h >>conftest.$ac_ext
13850cat >>conftest.$ac_ext <<_ACEOF
13851/* end confdefs.h. */
13852
13853#ifdef HAVE_SYS_TYPES_H
13854#include <sys/types.h>
13855#endif
13856#ifdef HAVE_TIME_H
13857#include <time.h>
13858#endif
13859
13860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861 typedef time_t ac__type_sizeof_;
13862static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13863static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013864#include <stdio.h>
13865#include <stdlib.h>
13866int
13867main ()
13868{
13869
13870 FILE *f = fopen ("conftest.val", "w");
13871 if (! f)
13872 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013873 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013874 {
13875 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013876 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013877 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013878 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013879 }
13880 else
13881 {
13882 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013883 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013884 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013885 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886 }
13887 return ferror (f) || fclose (f) != 0;
13888
13889 ;
13890 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013891}
Martin v. Löwis11437992002-04-12 09:54:03 +000013892_ACEOF
13893rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894if { (ac_try="$ac_link"
13895case "(($ac_try" in
13896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13897 *) ac_try_echo=$ac_try;;
13898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 { (case "(($ac_try" in
13905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13906 *) ac_try_echo=$ac_try;;
13907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013915 echo "$as_me: program exited with status $ac_status" >&5
13916echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013917sed 's/^/| /' conftest.$ac_ext >&5
13918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013920if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013921 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926 else
13927 ac_cv_sizeof_time_t=0
13928 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930rm -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 +000013931fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013932rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013933fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013934{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13935echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013937
13938
Martin v. Löwis11437992002-04-12 09:54:03 +000013939cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013941_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013942
Michael W. Hudson54241132001-12-07 15:38:26 +000013943
13944
Trent Mick635f6fb2000-08-23 21:33:05 +000013945# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013946ac_save_cc="$CC"
13947if test "$ac_cv_kpthread" = "yes"
13948then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013949elif test "$ac_cv_kthread" = "yes"
13950then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013951elif test "$ac_cv_pthread" = "yes"
13952then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013953fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013954
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013955{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13956echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013957have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013964#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossum12580492000-09-24 16:47:19 +000013968pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
13973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974if { (ac_try="$ac_compile"
13975case "(($ac_try" in
13976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13977 *) ac_try_echo=$ac_try;;
13978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 grep -v '^ *+' conftest.er1 >conftest.err
13983 rm -f conftest.er1
13984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986 (exit $ac_status); } && {
13987 test -z "$ac_c_werror_flag" ||
13988 test ! -s conftest.err
13989 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013990 have_pthread_t=yes
13991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013993sed 's/^/| /' conftest.$ac_ext >&5
13994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995
Trent Mick635f6fb2000-08-23 21:33:05 +000013996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997
13998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013999{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14000echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014001if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014002 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14003echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14004if test "${ac_cv_type_pthread_t+set}" = set; then
14005 echo $ECHO_N "(cached) $ECHO_C" >&6
14006else
14007 cat >conftest.$ac_ext <<_ACEOF
14008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
14013
14014#ifdef HAVE_PTHREAD_H
14015#include <pthread.h>
14016#endif
14017
14018
14019typedef pthread_t ac__type_new_;
14020int
14021main ()
14022{
14023if ((ac__type_new_ *) 0)
14024 return 0;
14025if (sizeof (ac__type_new_))
14026 return 0;
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext
14032if { (ac_try="$ac_compile"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_compile") 2>conftest.er1
14039 ac_status=$?
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest.$ac_objext; then
14048 ac_cv_type_pthread_t=yes
14049else
14050 echo "$as_me: failed program was:" >&5
14051sed 's/^/| /' conftest.$ac_ext >&5
14052
14053 ac_cv_type_pthread_t=no
14054fi
14055
14056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057fi
14058{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14059echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14060
14061# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14064# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014065{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014068 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014069else
14070 if test "$cross_compiling" = yes; then
14071 # Depending upon the size, compute the lo and hi bounds.
14072cat >conftest.$ac_ext <<_ACEOF
14073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
14078
14079#ifdef HAVE_PTHREAD_H
14080#include <pthread.h>
14081#endif
14082
14083
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014084 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014085int
14086main ()
14087{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014089test_array [0] = 0
14090
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (ac_try="$ac_compile"
14097case "(($ac_try" in
14098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099 *) ac_try_echo=$ac_try;;
14100esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102 (eval "$ac_compile") 2>conftest.er1
14103 ac_status=$?
14104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108 (exit $ac_status); } && {
14109 test -z "$ac_c_werror_flag" ||
14110 test ! -s conftest.err
14111 } && test -s conftest.$ac_objext; then
14112 ac_lo=0 ac_mid=0
14113 while :; do
14114 cat >conftest.$ac_ext <<_ACEOF
14115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
14120
14121#ifdef HAVE_PTHREAD_H
14122#include <pthread.h>
14123#endif
14124
14125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014126 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014127int
14128main ()
14129{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014131test_array [0] = 0
14132
14133 ;
14134 return 0;
14135}
14136_ACEOF
14137rm -f conftest.$ac_objext
14138if { (ac_try="$ac_compile"
14139case "(($ac_try" in
14140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14141 *) ac_try_echo=$ac_try;;
14142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014144 (eval "$ac_compile") 2>conftest.er1
14145 ac_status=$?
14146 grep -v '^ *+' conftest.er1 >conftest.err
14147 rm -f conftest.er1
14148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014150 (exit $ac_status); } && {
14151 test -z "$ac_c_werror_flag" ||
14152 test ! -s conftest.err
14153 } && test -s conftest.$ac_objext; then
14154 ac_hi=$ac_mid; break
14155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014156 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014157sed 's/^/| /' conftest.$ac_ext >&5
14158
14159 ac_lo=`expr $ac_mid + 1`
14160 if test $ac_lo -le $ac_mid; then
14161 ac_lo= ac_hi=
14162 break
14163 fi
14164 ac_mid=`expr 2 '*' $ac_mid + 1`
14165fi
14166
14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168 done
14169else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014170 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014171sed 's/^/| /' conftest.$ac_ext >&5
14172
14173 cat >conftest.$ac_ext <<_ACEOF
14174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
14179
14180#ifdef HAVE_PTHREAD_H
14181#include <pthread.h>
14182#endif
14183
14184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014185 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186int
14187main ()
14188{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190test_array [0] = 0
14191
14192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext
14197if { (ac_try="$ac_compile"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014203 (eval "$ac_compile") 2>conftest.er1
14204 ac_status=$?
14205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest.$ac_objext; then
14213 ac_hi=-1 ac_mid=-1
14214 while :; do
14215 cat >conftest.$ac_ext <<_ACEOF
14216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
14221
14222#ifdef HAVE_PTHREAD_H
14223#include <pthread.h>
14224#endif
14225
14226
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014227 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014228int
14229main ()
14230{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232test_array [0] = 0
14233
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (ac_try="$ac_compile"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245 (eval "$ac_compile") 2>conftest.er1
14246 ac_status=$?
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest.$ac_objext; then
14255 ac_lo=$ac_mid; break
14256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014257 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_hi=`expr '(' $ac_mid ')' - 1`
14261 if test $ac_mid -le $ac_hi; then
14262 ac_lo= ac_hi=
14263 break
14264 fi
14265 ac_mid=`expr 2 '*' $ac_mid`
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269 done
14270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014271 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014272sed 's/^/| /' conftest.$ac_ext >&5
14273
14274 ac_lo= ac_hi=
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278fi
14279
14280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14281# Binary search between lo and hi bounds.
14282while test "x$ac_lo" != "x$ac_hi"; do
14283 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014296 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014297int
14298main ()
14299{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014301test_array [0] = 0
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307rm -f conftest.$ac_objext
14308if { (ac_try="$ac_compile"
14309case "(($ac_try" in
14310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14311 *) ac_try_echo=$ac_try;;
14312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014314 (eval "$ac_compile") 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014320 (exit $ac_status); } && {
14321 test -z "$ac_c_werror_flag" ||
14322 test ! -s conftest.err
14323 } && test -s conftest.$ac_objext; then
14324 ac_hi=$ac_mid
14325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014326 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014327sed 's/^/| /' conftest.$ac_ext >&5
14328
14329 ac_lo=`expr '(' $ac_mid ')' + 1`
14330fi
14331
14332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333done
14334case $ac_lo in
14335?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14336'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014340See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342 else
14343 ac_cv_sizeof_pthread_t=0
14344 fi ;;
14345esac
14346else
14347 cat >conftest.$ac_ext <<_ACEOF
14348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
14353
14354#ifdef HAVE_PTHREAD_H
14355#include <pthread.h>
14356#endif
14357
14358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359 typedef pthread_t ac__type_sizeof_;
14360static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14361static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362#include <stdio.h>
14363#include <stdlib.h>
14364int
14365main ()
14366{
14367
14368 FILE *f = fopen ("conftest.val", "w");
14369 if (! f)
14370 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014371 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014372 {
14373 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014374 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014375 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377 }
14378 else
14379 {
14380 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014381 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014382 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014383 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384 }
14385 return ferror (f) || fclose (f) != 0;
14386
14387 ;
14388 return 0;
14389}
Martin v. Löwis11437992002-04-12 09:54:03 +000014390_ACEOF
14391rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392if { (ac_try="$ac_link"
14393case "(($ac_try" in
14394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14395 *) ac_try_echo=$ac_try;;
14396esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402 { (case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014411 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014413 echo "$as_me: program exited with status $ac_status" >&5
14414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014415sed 's/^/| /' conftest.$ac_ext >&5
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014418if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014420See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014421echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424 else
14425 ac_cv_sizeof_pthread_t=0
14426 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428rm -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 +000014429fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014430rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14433echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014435
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014438#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014441
Trent Mick635f6fb2000-08-23 21:33:05 +000014442fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014443CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Michael W. Hudson54241132001-12-07 15:38:26 +000014445
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014446case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014447 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014448 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14449 ;;
14450 Darwin/*)
14451 OTHER_LIBTOOL_OPT=""
14452 ;;
14453esac
14454
14455
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014456ARCH_RUN_32BIT=""
14457
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014458case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014459 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014460 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14461 if test "${enable_universalsdk}"; then
14462 :
14463 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014464 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014465 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014466 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014467 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014468 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014469 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014470 if test ${gcc_version} '<' 4.0
14471 then
14472 LIBTOOL_CRUFT="-lcc_dynamic"
14473 else
14474 LIBTOOL_CRUFT=""
14475 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014476 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014477 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014478else
14479 cat >conftest.$ac_ext <<_ACEOF
14480/* confdefs.h. */
14481_ACEOF
14482cat confdefs.h >>conftest.$ac_ext
14483cat >>conftest.$ac_ext <<_ACEOF
14484/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014485
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014486 #include <unistd.h>
14487 int main(int argc, char*argv[])
14488 {
14489 if (sizeof(long) == 4) {
14490 return 0;
14491 } else {
14492 return 1;
14493 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014494 }
14495
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014496_ACEOF
14497rm -f conftest$ac_exeext
14498if { (ac_try="$ac_link"
14499case "(($ac_try" in
14500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14501 *) ac_try_echo=$ac_try;;
14502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014504 (eval "$ac_link") 2>&5
14505 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14508 { (case "(($ac_try" in
14509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14510 *) ac_try_echo=$ac_try;;
14511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014513 (eval "$ac_try") 2>&5
14514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014516 (exit $ac_status); }; }; then
14517 ac_osx_32bit=yes
14518else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014519 echo "$as_me: program exited with status $ac_status" >&5
14520echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014521sed 's/^/| /' conftest.$ac_ext >&5
14522
14523( exit $ac_status )
14524ac_osx_32bit=no
14525fi
14526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14527fi
14528
14529
14530
14531 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014532 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014533 i386)
14534 MACOSX_DEFAULT_ARCH="i386"
14535 ;;
14536 ppc)
14537 MACOSX_DEFAULT_ARCH="ppc"
14538 ;;
14539 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014540 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14541echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014542 { (exit 1); exit 1; }; }
14543 ;;
14544 esac
14545 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014546 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014547 i386)
14548 MACOSX_DEFAULT_ARCH="x86_64"
14549 ;;
14550 ppc)
14551 MACOSX_DEFAULT_ARCH="ppc64"
14552 ;;
14553 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014554 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14555echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014556 { (exit 1); exit 1; }; }
14557 ;;
14558 esac
14559
14560 #ARCH_RUN_32BIT="true"
14561 fi
14562
14563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014564 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014566esac
14567
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014568{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14569echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014570if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014571then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014572 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014574 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576cat >>confdefs.h <<\_ACEOF
14577#define WITH_NEXT_FRAMEWORK 1
14578_ACEOF
14579
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014580 { echo "$as_me:$LINENO: result: yes" >&5
14581echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014582 if test $enable_shared = "yes"
14583 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014584 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14585echo "$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 +000014586 { (exit 1); exit 1; }; }
14587 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014589 { echo "$as_me:$LINENO: result: no" >&5
14590echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014591fi
14592
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014593{ echo "$as_me:$LINENO: checking for dyld" >&5
14594echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014595case $ac_sys_system/$ac_sys_release in
14596 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598cat >>confdefs.h <<\_ACEOF
14599#define WITH_DYLD 1
14600_ACEOF
14601
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014602 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14603echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014604 ;;
14605 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014606 { echo "$as_me:$LINENO: result: no" >&5
14607echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014608 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014609esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610
Guido van Rossum0a516c91994-09-12 10:58:40 +000014611# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014612
Michael W. Hudson54241132001-12-07 15:38:26 +000014613
14614
14615
14616
Guido van Rossum0a516c91994-09-12 10:58:40 +000014617# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014618# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014619{ echo "$as_me:$LINENO: checking SO" >&5
14620echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014621if test -z "$SO"
14622then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014623 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014624 hp*|HP*)
14625 case `uname -m` in
14626 ia64) SO=.so;;
14627 *) SO=.sl;;
14628 esac
14629 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014630 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014631 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014632 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014633else
14634 # this might also be a termcap variable, see #610332
14635 echo
14636 echo '====================================================================='
14637 echo '+ +'
14638 echo '+ WARNING: You have set SO in your environment. +'
14639 echo '+ Do you really mean to change the extension for shared libraries? +'
14640 echo '+ Continuing in 10 seconds to let you to ponder. +'
14641 echo '+ +'
14642 echo '====================================================================='
14643 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014644fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014645{ echo "$as_me:$LINENO: result: $SO" >&5
14646echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014647
Georg Brandlb1441c72009-01-03 22:33:39 +000014648
Thomas Wouters477c8d52006-05-27 19:21:47 +000014649cat >>confdefs.h <<_ACEOF
14650#define SHLIB_EXT "$SO"
14651_ACEOF
14652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014654# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014655# (Shared libraries in this instance are shared modules to be loaded into
14656# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014657{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14658echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014659if test -z "$LDSHARED"
14660then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014661 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014662 AIX*)
14663 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014664 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014665 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014666 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014667 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014669 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014670 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014671 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014672 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014673 hp*|HP*)
14674 if test "$GCC" = "yes"
14675 then LDSHARED='$(CC) -shared'
14676 else LDSHARED='ld -b';
14677 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014678 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014679 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014680 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14681 if test "$enable_framework" ; then
14682 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014683 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14684 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014685 else
14686 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014687 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014688 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014689 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014690 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14691 if test "$enable_framework" ; then
14692 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014693 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14694 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014695 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014696 # No framework, use the Python app as bundle-loader
14697 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014698 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014699 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014700 Darwin/*)
14701 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14702 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014703
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014704 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014705 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014707 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014708 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014709 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14710 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014711 else
14712 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14713 if test "$enable_framework" ; then
14714 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014715 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14716 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014717 else
14718 # No framework, use the Python app as bundle-loader
14719 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14720 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14721 fi
14722 fi
14723 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014724 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014725 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014726 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014727 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014728 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014729 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014730 else
14731 LDSHARED="ld -Bshareable ${LDFLAGS}"
14732 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014733 OpenBSD*)
14734 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14735 then
14736 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14737 else
14738 case `uname -r` in
14739 [01].* | 2.[0-7] | 2.[0-7].*)
14740 LDSHARED="ld -Bshareable ${LDFLAGS}"
14741 ;;
14742 *)
14743 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14744 ;;
14745 esac
14746 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014747 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014748 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014749 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014750 then LDSHARED='$(CC) -shared'
14751 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014752 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014753 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014754 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014755 *) LDSHARED="ld";;
14756 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014757fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014758{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14759echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014760BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014761# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014762# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014763{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14764echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014765if test -z "$CCSHARED"
14766then
Guido van Rossum07397971997-04-29 21:49:50 +000014767 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014768 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014769 then CCSHARED="-fPIC";
14770 elif test `uname -p` = sparc;
14771 then CCSHARED="-xcode=pic32";
14772 else CCSHARED="-Kpic";
14773 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014774 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014775 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014776 else CCSHARED="+z";
14777 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014778 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014779 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014780 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014781 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014782 if test "$GCC" = "yes"
14783 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014784 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014785 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014786 SCO_SV*)
14787 if test "$GCC" = "yes"
14788 then CCSHARED="-fPIC"
14789 else CCSHARED="-Kpic -belf"
14790 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014791 IRIX*/6*) case $CC in
14792 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014793 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014794 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014795 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014797{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14798echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014799# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014800# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014801{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14802echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014803if test -z "$LINKFORSHARED"
14804then
Guido van Rossum07397971997-04-29 21:49:50 +000014805 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014806 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014807 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014808 LINKFORSHARED="-Wl,-E -Wl,+s";;
14809# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014810 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014811 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014812 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014814 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014815 if test "$enable_framework"
14816 then
Jack Jansenda49e192005-01-07 13:08:22 +000014817 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014818 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014819 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014820 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014821 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014822 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014823 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014824 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14825 then
14826 LINKFORSHARED="-Wl,--export-dynamic"
14827 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014828 SunOS/5*) case $CC in
14829 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014830 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014831 then
14832 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014833 fi;;
14834 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014835 CYGWIN*)
14836 if test $enable_shared = "no"
14837 then
14838 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14839 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014840 QNX*)
14841 # -Wl,-E causes the symbols to be added to the dynamic
14842 # symbol table so that they can be found when a module
14843 # is loaded. -N 2048K causes the stack size to be set
14844 # to 2048 kilobytes so that the stack doesn't overflow
14845 # when running test_compile.py.
14846 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014847 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014848fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014849{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14850echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014851
Michael W. Hudson54241132001-12-07 15:38:26 +000014852
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014853
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014854{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14855echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014856if test ! "$LIBRARY" = "$LDLIBRARY"
14857then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014858 case $ac_sys_system in
14859 CYGWIN*)
14860 # Cygwin needs CCSHARED when building extension DLLs
14861 # but not when building the interpreter DLL.
14862 CFLAGSFORSHARED='';;
14863 *)
14864 CFLAGSFORSHARED='$(CCSHARED)'
14865 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14868echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014869
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014870# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14871# library (with --enable-shared).
14872# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014873# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14874# if it is not required, since it creates a dependency of the shared library
14875# to LIBS. This, in turn, means that applications linking the shared libpython
14876# don't need to link LIBS explicitly. The default should be only changed
14877# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014879{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14880echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014881case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014882 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014883 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014885{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14886echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014887
14888
Guido van Rossum627b2d71993-12-24 10:39:16 +000014889# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014891{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14892echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014893if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014895else
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014897LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* confdefs.h. */
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905/* Override any GCC internal prototype to avoid an error.
14906 Use char because int might match the return type of a GCC
14907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908#ifdef __cplusplus
14909extern "C"
14910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014911char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014912int
14913main ()
14914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ;
14917 return 0;
14918}
14919_ACEOF
14920rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921if { (ac_try="$ac_link"
14922case "(($ac_try" in
14923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14924 *) ac_try_echo=$ac_try;;
14925esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014929 grep -v '^ *+' conftest.er1 >conftest.err
14930 rm -f conftest.er1
14931 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 (exit $ac_status); } && {
14934 test -z "$ac_c_werror_flag" ||
14935 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014936 } && test -s conftest$ac_exeext &&
14937 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014939else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014941sed 's/^/| /' conftest.$ac_ext >&5
14942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945
14946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014948LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014949fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014950{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14951echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14952if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 cat >>confdefs.h <<_ACEOF
14954#define HAVE_LIBDL 1
14955_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014956
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014957 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014958
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959fi
14960 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14963echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014964if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966else
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014968LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* confdefs.h. */
14971_ACEOF
14972cat confdefs.h >>conftest.$ac_ext
14973cat >>conftest.$ac_ext <<_ACEOF
14974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976/* Override any GCC internal prototype to avoid an error.
14977 Use char because int might match the return type of a GCC
14978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014979#ifdef __cplusplus
14980extern "C"
14981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014982char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014983int
14984main ()
14985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ;
14988 return 0;
14989}
14990_ACEOF
14991rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992if { (ac_try="$ac_link"
14993case "(($ac_try" in
14994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14995 *) ac_try_echo=$ac_try;;
14996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015000 grep -v '^ *+' conftest.er1 >conftest.err
15001 rm -f conftest.er1
15002 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 (exit $ac_status); } && {
15005 test -z "$ac_c_werror_flag" ||
15006 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015007 } && test -s conftest$ac_exeext &&
15008 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015010else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015012sed 's/^/| /' conftest.$ac_ext >&5
15013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016
15017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015019LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015020fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015021{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15022echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15023if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 cat >>confdefs.h <<_ACEOF
15025#define HAVE_LIBDLD 1
15026_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015028 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015030fi
15031 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015032
Georg Brandlb1441c72009-01-03 22:33:39 +000015033# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015034if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015035 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15036echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015037if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015038 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015039else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015040 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048/* Override any GCC internal prototype to avoid an error.
15049 Use char because int might match the return type of a GCC
15050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015051#ifdef __cplusplus
15052extern "C"
15053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015054char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015055int
15056main ()
15057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ;
15060 return 0;
15061}
15062_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063for ac_lib in '' pthread rt posix4; do
15064 if test -z "$ac_lib"; then
15065 ac_res="none required"
15066 else
15067 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015068 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069 fi
15070 rm -f conftest.$ac_objext conftest$ac_exeext
15071if { (ac_try="$ac_link"
15072case "(($ac_try" in
15073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15074 *) ac_try_echo=$ac_try;;
15075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015078 ac_status=$?
15079 grep -v '^ *+' conftest.er1 >conftest.err
15080 rm -f conftest.er1
15081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083 (exit $ac_status); } && {
15084 test -z "$ac_c_werror_flag" ||
15085 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015086 } && test -s conftest$ac_exeext &&
15087 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015090 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015091sed 's/^/| /' conftest.$ac_ext >&5
15092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093
Thomas Wouters477c8d52006-05-27 19:21:47 +000015094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
15096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15097 conftest$ac_exeext
15098 if test "${ac_cv_search_sem_init+set}" = set; then
15099 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101done
15102if test "${ac_cv_search_sem_init+set}" = set; then
15103 :
15104else
15105 ac_cv_search_sem_init=no
15106fi
15107rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015108LIBS=$ac_func_search_save_LIBS
15109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015110{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15111echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112ac_res=$ac_cv_search_sem_init
15113if test "$ac_res" != no; then
15114 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015115
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015116fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015117 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015118 # posix4 on Solaris 2.6
15119 # pthread (first!) on Linux
15120fi
15121
Martin v. Löwis19d17342003-06-14 21:03:05 +000015122# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015123{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15124echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015125if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015126 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015127else
15128 ac_check_lib_save_LIBS=$LIBS
15129LIBS="-lintl $LIBS"
15130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015131/* confdefs.h. */
15132_ACEOF
15133cat confdefs.h >>conftest.$ac_ext
15134cat >>conftest.$ac_ext <<_ACEOF
15135/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137/* Override any GCC internal prototype to avoid an error.
15138 Use char because int might match the return type of a GCC
15139 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015140#ifdef __cplusplus
15141extern "C"
15142#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015143char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015144int
15145main ()
15146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015148 ;
15149 return 0;
15150}
15151_ACEOF
15152rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153if { (ac_try="$ac_link"
15154case "(($ac_try" in
15155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15156 *) ac_try_echo=$ac_try;;
15157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015161 grep -v '^ *+' conftest.er1 >conftest.err
15162 rm -f conftest.er1
15163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 (exit $ac_status); } && {
15166 test -z "$ac_c_werror_flag" ||
15167 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015168 } && test -s conftest$ac_exeext &&
15169 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015170 ac_cv_lib_intl_textdomain=yes
15171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015173sed 's/^/| /' conftest.$ac_ext >&5
15174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177
15178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015180LIBS=$ac_check_lib_save_LIBS
15181fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15183echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15184if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015185
15186cat >>confdefs.h <<\_ACEOF
15187#define WITH_LIBINTL 1
15188_ACEOF
15189
Brett Cannonc6d936e2009-06-07 20:09:53 +000015190 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015191fi
15192
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015193
15194# checks for system dependent C++ extensions support
15195case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015196 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15197echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015199/* confdefs.h. */
15200_ACEOF
15201cat confdefs.h >>conftest.$ac_ext
15202cat >>conftest.$ac_ext <<_ACEOF
15203/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015204#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015205int
15206main ()
15207{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015208loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 ;
15210 return 0;
15211}
15212_ACEOF
15213rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214if { (ac_try="$ac_link"
15215case "(($ac_try" in
15216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15217 *) ac_try_echo=$ac_try;;
15218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015222 grep -v '^ *+' conftest.er1 >conftest.err
15223 rm -f conftest.er1
15224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226 (exit $ac_status); } && {
15227 test -z "$ac_c_werror_flag" ||
15228 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015229 } && test -s conftest$ac_exeext &&
15230 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232cat >>confdefs.h <<\_ACEOF
15233#define AIX_GENUINE_CPLUSPLUS 1
15234_ACEOF
15235
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015236 { echo "$as_me:$LINENO: result: yes" >&5
15237echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015240sed 's/^/| /' conftest.$ac_ext >&5
15241
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015242 { echo "$as_me:$LINENO: result: no" >&5
15243echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245
15246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015247 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015248 *) ;;
15249esac
15250
Guido van Rossum70c7f481998-03-26 18:44:10 +000015251# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015252{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15253echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015254if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015255 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015256else
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015258LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015260/* confdefs.h. */
15261_ACEOF
15262cat confdefs.h >>conftest.$ac_ext
15263cat >>conftest.$ac_ext <<_ACEOF
15264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266/* Override any GCC internal prototype to avoid an error.
15267 Use char because int might match the return type of a GCC
15268 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015269#ifdef __cplusplus
15270extern "C"
15271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015272char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015273int
15274main ()
15275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 ;
15278 return 0;
15279}
15280_ACEOF
15281rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282if { (ac_try="$ac_link"
15283case "(($ac_try" in
15284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15285 *) ac_try_echo=$ac_try;;
15286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015290 grep -v '^ *+' conftest.er1 >conftest.err
15291 rm -f conftest.er1
15292 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294 (exit $ac_status); } && {
15295 test -z "$ac_c_werror_flag" ||
15296 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015297 } && test -s conftest$ac_exeext &&
15298 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015302sed 's/^/| /' conftest.$ac_ext >&5
15303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306
15307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015309LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015310fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015311{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15312echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15313if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015314 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015315fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015316 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015317{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15318echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015319if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015321else
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015323LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015325/* confdefs.h. */
15326_ACEOF
15327cat confdefs.h >>conftest.$ac_ext
15328cat >>conftest.$ac_ext <<_ACEOF
15329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331/* Override any GCC internal prototype to avoid an error.
15332 Use char because int might match the return type of a GCC
15333 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015334#ifdef __cplusplus
15335extern "C"
15336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015337char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015338int
15339main ()
15340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 ;
15343 return 0;
15344}
15345_ACEOF
15346rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347if { (ac_try="$ac_link"
15348case "(($ac_try" in
15349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15350 *) ac_try_echo=$ac_try;;
15351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015355 grep -v '^ *+' conftest.er1 >conftest.err
15356 rm -f conftest.er1
15357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359 (exit $ac_status); } && {
15360 test -z "$ac_c_werror_flag" ||
15361 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015362 } && test -s conftest$ac_exeext &&
15363 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015367sed 's/^/| /' conftest.$ac_ext >&5
15368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371
15372rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015373 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015374LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015376{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15377echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15378if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015379 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015380fi
15381 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015382
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015383{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15384echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015387if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015389{ echo "$as_me:$LINENO: result: $withval" >&5
15390echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015391LIBS="$withval $LIBS"
15392
15393else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015394 { echo "$as_me:$LINENO: result: no" >&5
15395echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396fi
15397
Guido van Rossum7f43da71994-08-01 12:15:30 +000015398
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015399# Check for use of the system expat library
15400{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15401echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15402
15403# Check whether --with-system_expat was given.
15404if test "${with_system_expat+set}" = set; then
15405 withval=$with_system_expat;
15406fi
15407
15408
15409{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15410echo "${ECHO_T}$with_system_expat" >&6; }
15411
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015412# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015413{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15414echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015417if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418 withval=$with_system_ffi;
15419fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015420
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015421
Benjamin Petersond78735d2010-01-01 16:04:23 +000015422if test "$with_system_ffi" = "yes"; then
15423 if test -n "$ac_tool_prefix"; then
15424 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15425set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15426{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15428if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15429 echo $ECHO_N "(cached) $ECHO_C" >&6
15430else
15431 case $PKG_CONFIG in
15432 [\\/]* | ?:[\\/]*)
15433 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15434 ;;
15435 *)
15436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15437for as_dir in $PATH
15438do
15439 IFS=$as_save_IFS
15440 test -z "$as_dir" && as_dir=.
15441 for ac_exec_ext in '' $ac_executable_extensions; do
15442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15443 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15445 break 2
15446 fi
15447done
15448done
15449IFS=$as_save_IFS
15450
15451 ;;
15452esac
15453fi
15454PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15455if test -n "$PKG_CONFIG"; then
15456 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15457echo "${ECHO_T}$PKG_CONFIG" >&6; }
15458else
15459 { echo "$as_me:$LINENO: result: no" >&5
15460echo "${ECHO_T}no" >&6; }
15461fi
15462
15463
15464fi
15465if test -z "$ac_cv_path_PKG_CONFIG"; then
15466 ac_pt_PKG_CONFIG=$PKG_CONFIG
15467 # Extract the first word of "pkg-config", so it can be a program name with args.
15468set dummy pkg-config; ac_word=$2
15469{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15471if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15472 echo $ECHO_N "(cached) $ECHO_C" >&6
15473else
15474 case $ac_pt_PKG_CONFIG in
15475 [\\/]* | ?:[\\/]*)
15476 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15477 ;;
15478 *)
15479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15480for as_dir in $PATH
15481do
15482 IFS=$as_save_IFS
15483 test -z "$as_dir" && as_dir=.
15484 for ac_exec_ext in '' $ac_executable_extensions; do
15485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15486 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15487 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15488 break 2
15489 fi
15490done
15491done
15492IFS=$as_save_IFS
15493
15494 ;;
15495esac
15496fi
15497ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15498if test -n "$ac_pt_PKG_CONFIG"; then
15499 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15500echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15501else
15502 { echo "$as_me:$LINENO: result: no" >&5
15503echo "${ECHO_T}no" >&6; }
15504fi
15505
15506 if test "x$ac_pt_PKG_CONFIG" = x; then
15507 PKG_CONFIG=""
15508 else
15509 case $cross_compiling:$ac_tool_warned in
15510yes:)
15511{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15512whose name does not start with the host triplet. If you think this
15513configuration is useful to you, please write to autoconf@gnu.org." >&5
15514echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15515whose name does not start with the host triplet. If you think this
15516configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15517ac_tool_warned=yes ;;
15518esac
15519 PKG_CONFIG=$ac_pt_PKG_CONFIG
15520 fi
15521else
15522 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15523fi
15524
15525 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15526else
15527 LIBFFI_INCLUDEDIR=""
15528fi
15529
15530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15532echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015533
Matthias Klose55708cc2009-04-30 08:06:49 +000015534# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015535{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15536echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015537
15538# Check whether --with-dbmliborder was given.
15539if test "${with_dbmliborder+set}" = set; then
15540 withval=$with_dbmliborder;
15541if test x$with_dbmliborder = xyes
15542then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015543{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15544echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015545 { (exit 1); exit 1; }; }
15546else
15547 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15548 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15549 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015550 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15551echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015552 { (exit 1); exit 1; }; }
15553 fi
15554 done
15555fi
15556fi
15557
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015558{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15559echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015560
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015561# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015562
15563
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015564{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15565echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015568if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 withval=$with_signal_module;
15570fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015571
15572
15573if test -z "$with_signal_module"
15574then with_signal_module="yes"
15575fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015576{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15577echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015578
15579if test "${with_signal_module}" = "yes"; then
15580 USE_SIGNAL_MODULE=""
15581 SIGNAL_OBJS=""
15582else
15583 USE_SIGNAL_MODULE="#"
15584 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15585fi
15586
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015587# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015588
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015589USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015590
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015591{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15592echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015596if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015598{ echo "$as_me:$LINENO: result: $withval" >&5
15599echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015601if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015603fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015605 { echo "$as_me:$LINENO: result: no" >&5
15606echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607fi
15608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
15610# Templates for things AC_DEFINEd more than once.
15611# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015612
15613
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615
15616
15617
15618
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015619{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15620echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015623if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624 withval=$with_threads;
15625fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015626
15627
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015628# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015631if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632 withval=$with_thread; with_threads=$with_thread
15633fi
15634
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015635
15636if test -z "$with_threads"
15637then with_threads="yes"
15638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015639{ echo "$as_me:$LINENO: result: $with_threads" >&5
15640echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015641
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015642
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015643if test "$with_threads" = "no"
15644then
15645 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015646elif test "$ac_cv_pthread_is_default" = yes
15647then
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015650_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015651
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015656
15657 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015659elif test "$ac_cv_kpthread" = "yes"
15660then
15661 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015662 if test "$ac_cv_cxx_thread" = "yes"; then
15663 CXX="$CXX -Kpthread"
15664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015666#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015668
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015669 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015670 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015671elif test "$ac_cv_kthread" = "yes"
15672then
15673 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015674 if test "$ac_cv_cxx_thread" = "yes"; then
15675 CXX="$CXX -Kthread"
15676 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015677 cat >>confdefs.h <<\_ACEOF
15678#define WITH_THREAD 1
15679_ACEOF
15680
15681 posix_threads=yes
15682 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015683elif test "$ac_cv_pthread" = "yes"
15684then
15685 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015686 if test "$ac_cv_cxx_thread" = "yes"; then
15687 CXX="$CXX -pthread"
15688 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015689 cat >>confdefs.h <<\_ACEOF
15690#define WITH_THREAD 1
15691_ACEOF
15692
15693 posix_threads=yes
15694 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015695else
15696 if test ! -z "$with_threads" -a -d "$with_threads"
15697 then LDFLAGS="$LDFLAGS -L$with_threads"
15698 fi
15699 if test ! -z "$withval" -a -d "$withval"
15700 then LDFLAGS="$LDFLAGS -L$withval"
15701 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015702
15703 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015704 # define _POSIX_THREADS in unistd.h. Some apparently don't
15705 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015706 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15707echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015709/* confdefs.h. */
15710_ACEOF
15711cat confdefs.h >>conftest.$ac_ext
15712cat >>conftest.$ac_ext <<_ACEOF
15713/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015714
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015715#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015716#ifdef _POSIX_THREADS
15717yes
15718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015722 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723 unistd_defines_pthreads=yes
15724else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015725 unistd_defines_pthreads=no
15726fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000015727rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015728
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015729 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15730echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015731
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015733#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015734_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015735
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015737 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15738echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015739if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015741fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015742{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15743echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015744else
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015746{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15747echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015749/* confdefs.h. */
15750_ACEOF
15751cat confdefs.h >>conftest.$ac_ext
15752cat >>conftest.$ac_ext <<_ACEOF
15753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015754$ac_includes_default
15755#include <cthreads.h>
15756_ACEOF
15757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758if { (ac_try="$ac_compile"
15759case "(($ac_try" in
15760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15761 *) ac_try_echo=$ac_try;;
15762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015766 grep -v '^ *+' conftest.er1 >conftest.err
15767 rm -f conftest.er1
15768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770 (exit $ac_status); } && {
15771 test -z "$ac_c_werror_flag" ||
15772 test ! -s conftest.err
15773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ac_header_compiler=yes
15775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015777sed 's/^/| /' conftest.$ac_ext >&5
15778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781
15782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015783{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15784echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015785
15786# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015787{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15788echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015790/* confdefs.h. */
15791_ACEOF
15792cat confdefs.h >>conftest.$ac_ext
15793cat >>conftest.$ac_ext <<_ACEOF
15794/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015795#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015796_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797if { (ac_try="$ac_cpp conftest.$ac_ext"
15798case "(($ac_try" in
15799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15800 *) ac_try_echo=$ac_try;;
15801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015805 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 rm -f conftest.er1
15807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 (exit $ac_status); } >/dev/null && {
15810 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15811 test ! -s conftest.err
15812 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 ac_header_preproc=yes
15814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015816sed 's/^/| /' conftest.$ac_ext >&5
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015822{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15823echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
15825# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015826case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15827 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015828 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15829echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15830 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15831echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015833 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015834 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015835 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15836echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15838echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15840echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15842echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15844echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15845 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15846echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015848## -------------------------------------- ##
15849## Report this to http://bugs.python.org/ ##
15850## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015851_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015853 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015855{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15856echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015857if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015859else
15860 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015861fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015862{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15863echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015864
15865fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015866if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
15876cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015879
15880 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015881 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015882else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015885 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15886echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015887if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015888 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015890{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15891echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015892else
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15895echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015897/* confdefs.h. */
15898_ACEOF
15899cat confdefs.h >>conftest.$ac_ext
15900cat >>conftest.$ac_ext <<_ACEOF
15901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015902$ac_includes_default
15903#include <mach/cthreads.h>
15904_ACEOF
15905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906if { (ac_try="$ac_compile"
15907case "(($ac_try" in
15908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15909 *) ac_try_echo=$ac_try;;
15910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015914 grep -v '^ *+' conftest.er1 >conftest.err
15915 rm -f conftest.er1
15916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918 (exit $ac_status); } && {
15919 test -z "$ac_c_werror_flag" ||
15920 test ! -s conftest.err
15921 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 ac_header_compiler=yes
15923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015925sed 's/^/| /' conftest.$ac_ext >&5
15926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929
15930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015931{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15932echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
15934# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015935{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15936echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015938/* confdefs.h. */
15939_ACEOF
15940cat confdefs.h >>conftest.$ac_ext
15941cat >>conftest.$ac_ext <<_ACEOF
15942/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015943#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015953 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 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); } >/dev/null && {
15958 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15959 test ! -s conftest.err
15960 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 ac_header_preproc=yes
15962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015964sed 's/^/| /' conftest.$ac_ext >&5
15965
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968
Martin v. Löwis11437992002-04-12 09:54:03 +000015969rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015970{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15971echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
15973# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015974case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15975 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15978 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15979echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015981 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015982 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15993 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15994echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015996## -------------------------------------- ##
15997## Report this to http://bugs.python.org/ ##
15998## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015999_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016003{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16004echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016005if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016006 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016007else
16008 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016009fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016010{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16011echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016012
16013fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016014if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016017_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023
16024cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016026_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016027
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016028 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016029else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016030
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016031 # Just looking for pthread_create in libpthread is not enough:
16032 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16033 # So we really have to include pthread.h, and then link.
16034 _libs=$LIBS
16035 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016036 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16037echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016039/* confdefs.h. */
16040_ACEOF
16041cat confdefs.h >>conftest.$ac_ext
16042cat >>conftest.$ac_ext <<_ACEOF
16043/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016044#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016045
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016046void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016047int
16048main ()
16049{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016050
16051pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 ;
16053 return 0;
16054}
16055_ACEOF
16056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057if { (ac_try="$ac_link"
16058case "(($ac_try" in
16059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16060 *) ac_try_echo=$ac_try;;
16061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016065 grep -v '^ *+' conftest.er1 >conftest.err
16066 rm -f conftest.er1
16067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069 (exit $ac_status); } && {
16070 test -z "$ac_c_werror_flag" ||
16071 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016072 } && test -s conftest$ac_exeext &&
16073 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016075 { echo "$as_me:$LINENO: result: yes" >&5
16076echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016078#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016079_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016080
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016081 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016082 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016085sed 's/^/| /' conftest.$ac_ext >&5
16086
Martin v. Löwis11437992002-04-12 09:54:03 +000016087
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016088 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016089 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16090echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016091if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016093else
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016100/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16102#define pthread_detach innocuous_pthread_detach
16103
Guido van Rossumad678af1998-10-02 14:42:15 +000016104/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016105 which can conflict with char pthread_detach (); below.
16106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016107 <limits.h> exists even on freestanding compilers. */
16108
16109#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016110# include <limits.h>
16111#else
16112# include <assert.h>
16113#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016114
16115#undef pthread_detach
16116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117/* Override any GCC internal prototype to avoid an error.
16118 Use char because int might match the return type of a GCC
16119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016120#ifdef __cplusplus
16121extern "C"
16122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016123char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016124/* The GNU C library defines this for functions which it implements
16125 to always fail with ENOSYS. Some functions are actually named
16126 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016128choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016129#endif
16130
Skip Montanaro6dead952003-09-25 14:50:04 +000016131int
16132main ()
16133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 ;
16136 return 0;
16137}
16138_ACEOF
16139rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140if { (ac_try="$ac_link"
16141case "(($ac_try" in
16142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16143 *) ac_try_echo=$ac_try;;
16144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016146 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016148 grep -v '^ *+' conftest.er1 >conftest.err
16149 rm -f conftest.er1
16150 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152 (exit $ac_status); } && {
16153 test -z "$ac_c_werror_flag" ||
16154 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016155 } && test -s conftest$ac_exeext &&
16156 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016160sed 's/^/| /' conftest.$ac_ext >&5
16161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164
16165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016166 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016168{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16169echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16170if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016172#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016173_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016174
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016175 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016176 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016177else
Guido van Rossumad678af1998-10-02 14:42:15 +000016178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016179 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16180echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016181if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016183else
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016185LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016187/* confdefs.h. */
16188_ACEOF
16189cat confdefs.h >>conftest.$ac_ext
16190cat >>conftest.$ac_ext <<_ACEOF
16191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193/* Override any GCC internal prototype to avoid an error.
16194 Use char because int might match the return type of a GCC
16195 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016196#ifdef __cplusplus
16197extern "C"
16198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016199char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016200int
16201main ()
16202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016204 ;
16205 return 0;
16206}
16207_ACEOF
16208rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209if { (ac_try="$ac_link"
16210case "(($ac_try" in
16211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16212 *) ac_try_echo=$ac_try;;
16213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016217 grep -v '^ *+' conftest.er1 >conftest.err
16218 rm -f conftest.er1
16219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221 (exit $ac_status); } && {
16222 test -z "$ac_c_werror_flag" ||
16223 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016224 } && test -s conftest$ac_exeext &&
16225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016229sed 's/^/| /' conftest.$ac_ext >&5
16230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233
16234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016236LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016238{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16239echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16240if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016242#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016243_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016244
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016245 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016246 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016247 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016248else
Greg Steinadf63d62000-07-05 10:38:09 +000016249
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016250 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16251echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016252if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016253 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016254else
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016256LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016258/* confdefs.h. */
16259_ACEOF
16260cat confdefs.h >>conftest.$ac_ext
16261cat >>conftest.$ac_ext <<_ACEOF
16262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264/* Override any GCC internal prototype to avoid an error.
16265 Use char because int might match the return type of a GCC
16266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016267#ifdef __cplusplus
16268extern "C"
16269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016270char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016271int
16272main ()
16273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ;
16276 return 0;
16277}
16278_ACEOF
16279rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280if { (ac_try="$ac_link"
16281case "(($ac_try" in
16282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16283 *) ac_try_echo=$ac_try;;
16284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016288 grep -v '^ *+' conftest.er1 >conftest.err
16289 rm -f conftest.er1
16290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 (exit $ac_status); } && {
16293 test -z "$ac_c_werror_flag" ||
16294 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016295 } && test -s conftest$ac_exeext &&
16296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016300sed 's/^/| /' conftest.$ac_ext >&5
16301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304
16305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016307LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016309{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16310echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16311if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016313#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016314_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016315
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016316 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016317 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016318 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016319else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016321 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16322echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016323if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016325else
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016327LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016329/* confdefs.h. */
16330_ACEOF
16331cat confdefs.h >>conftest.$ac_ext
16332cat >>conftest.$ac_ext <<_ACEOF
16333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335/* Override any GCC internal prototype to avoid an error.
16336 Use char because int might match the return type of a GCC
16337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016338#ifdef __cplusplus
16339extern "C"
16340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016341char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016342int
16343main ()
16344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 ;
16347 return 0;
16348}
16349_ACEOF
16350rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351if { (ac_try="$ac_link"
16352case "(($ac_try" in
16353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16354 *) ac_try_echo=$ac_try;;
16355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016359 grep -v '^ *+' conftest.er1 >conftest.err
16360 rm -f conftest.er1
16361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363 (exit $ac_status); } && {
16364 test -z "$ac_c_werror_flag" ||
16365 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016366 } && test -s conftest$ac_exeext &&
16367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016371sed 's/^/| /' conftest.$ac_ext >&5
16372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375
16376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016378LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016379fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016380{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16381echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16382if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016384#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016385_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016387 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016388 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016389 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016390else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016392 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16393echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016394if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016396else
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016398LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016399cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016400/* confdefs.h. */
16401_ACEOF
16402cat confdefs.h >>conftest.$ac_ext
16403cat >>conftest.$ac_ext <<_ACEOF
16404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406/* Override any GCC internal prototype to avoid an error.
16407 Use char because int might match the return type of a GCC
16408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016409#ifdef __cplusplus
16410extern "C"
16411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016412char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016413int
16414main ()
16415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 ;
16418 return 0;
16419}
16420_ACEOF
16421rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422if { (ac_try="$ac_link"
16423case "(($ac_try" in
16424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16425 *) ac_try_echo=$ac_try;;
16426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016430 grep -v '^ *+' conftest.er1 >conftest.err
16431 rm -f conftest.er1
16432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434 (exit $ac_status); } && {
16435 test -z "$ac_c_werror_flag" ||
16436 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016437 } && test -s conftest$ac_exeext &&
16438 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016439 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016442sed 's/^/| /' conftest.$ac_ext >&5
16443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446
16447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016449LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016450fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016451{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16452echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16453if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016455#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016456_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016459 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016460 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016461else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016462
Martin v. Löwis130fb172001-07-19 11:00:41 +000016463 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016464fi
16465
Guido van Rossum627b2d71993-12-24 10:39:16 +000016466
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016467fi
16468
Guido van Rossum0be3e491997-05-22 20:33:33 +000016469fi
16470
Guido van Rossum49545951997-12-02 19:28:29 +000016471fi
16472
Guido van Rossumb93a8621998-05-07 13:27:32 +000016473fi
16474
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476
16477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016478 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479fi
16480
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
16482fi
16483
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016484
Michael W. Hudson54241132001-12-07 15:38:26 +000016485
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016486 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16487echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016488if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016489 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016490else
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016492LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016494/* confdefs.h. */
16495_ACEOF
16496cat confdefs.h >>conftest.$ac_ext
16497cat >>conftest.$ac_ext <<_ACEOF
16498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500/* Override any GCC internal prototype to avoid an error.
16501 Use char because int might match the return type of a GCC
16502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016503#ifdef __cplusplus
16504extern "C"
16505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016506char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016507int
16508main ()
16509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 ;
16512 return 0;
16513}
16514_ACEOF
16515rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516if { (ac_try="$ac_link"
16517case "(($ac_try" in
16518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16519 *) ac_try_echo=$ac_try;;
16520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016524 grep -v '^ *+' conftest.er1 >conftest.err
16525 rm -f conftest.er1
16526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 (exit $ac_status); } && {
16529 test -z "$ac_c_werror_flag" ||
16530 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016531 } && test -s conftest$ac_exeext &&
16532 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016536sed 's/^/| /' conftest.$ac_ext >&5
16537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540
16541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016543LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016544fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016545{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16546echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16547if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016548 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016550_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016551
Martin v. Löwis130fb172001-07-19 11:00:41 +000016552 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016553 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016554 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016555fi
16556
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016557
Neal Norwitza978ab02002-11-02 16:58:05 +000016558 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016559 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16560echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016561if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016563else
Martin v. Löwis11437992002-04-12 09:54:03 +000016564 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016565LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016567/* confdefs.h. */
16568_ACEOF
16569cat confdefs.h >>conftest.$ac_ext
16570cat >>conftest.$ac_ext <<_ACEOF
16571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573/* Override any GCC internal prototype to avoid an error.
16574 Use char because int might match the return type of a GCC
16575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016576#ifdef __cplusplus
16577extern "C"
16578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016579char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016580int
16581main ()
16582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ;
16585 return 0;
16586}
16587_ACEOF
16588rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589if { (ac_try="$ac_link"
16590case "(($ac_try" in
16591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16592 *) ac_try_echo=$ac_try;;
16593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016597 grep -v '^ *+' conftest.er1 >conftest.err
16598 rm -f conftest.er1
16599 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601 (exit $ac_status); } && {
16602 test -z "$ac_c_werror_flag" ||
16603 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016604 } && test -s conftest$ac_exeext &&
16605 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016606 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016607else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016609sed 's/^/| /' conftest.$ac_ext >&5
16610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
16614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016616LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016617fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016618{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16619echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16620if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016621 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016622#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016623_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016624
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016625 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016626 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016627 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016628fi
16629
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016630 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016631
Martin v. Löwis130fb172001-07-19 11:00:41 +000016632 if test "$USE_THREAD_MODULE" != "#"
16633 then
16634 # If the above checks didn't disable threads, (at least) OSF1
16635 # needs this '-threads' argument during linking.
16636 case $ac_sys_system in
16637 OSF1) LDLAST=-threads;;
16638 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016639 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016640fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642if test "$posix_threads" = "yes"; then
16643 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016644
16645cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016646#define _POSIX_THREADS 1
16647_ACEOF
16648
16649 fi
16650
16651 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16652 case $ac_sys_system/$ac_sys_release in
16653 SunOS/5.6)
16654cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016655#define HAVE_PTHREAD_DESTRUCTOR 1
16656_ACEOF
16657
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016658 ;;
16659 SunOS/5.8)
16660cat >>confdefs.h <<\_ACEOF
16661#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16662_ACEOF
16663
16664 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016665 AIX/5)
16666cat >>confdefs.h <<\_ACEOF
16667#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16668_ACEOF
16669
16670 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 esac
16672
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016673 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16674echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016675 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016676 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016677else
16678 if test "$cross_compiling" = yes; then
16679 ac_cv_pthread_system_supported=no
16680else
16681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016682/* confdefs.h. */
16683_ACEOF
16684cat confdefs.h >>conftest.$ac_ext
16685cat >>conftest.$ac_ext <<_ACEOF
16686/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016687#include <pthread.h>
16688 void *foo(void *parm) {
16689 return NULL;
16690 }
16691 main() {
16692 pthread_attr_t attr;
16693 pthread_t id;
16694 if (pthread_attr_init(&attr)) exit(-1);
16695 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16696 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16697 exit(0);
16698 }
16699_ACEOF
16700rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701if { (ac_try="$ac_link"
16702case "(($ac_try" in
16703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16704 *) ac_try_echo=$ac_try;;
16705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016708 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 { (case "(($ac_try" in
16712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16713 *) ac_try_echo=$ac_try;;
16714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016717 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016719 (exit $ac_status); }; }; then
16720 ac_cv_pthread_system_supported=yes
16721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016722 echo "$as_me: program exited with status $ac_status" >&5
16723echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016724sed 's/^/| /' conftest.$ac_ext >&5
16725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016726( exit $ac_status )
16727ac_cv_pthread_system_supported=no
16728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729rm -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 +000016730fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732
16733
Guido van Rossum627b2d71993-12-24 10:39:16 +000016734fi
16735
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016736 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16737echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016738 if test "$ac_cv_pthread_system_supported" = "yes"; then
16739
16740cat >>confdefs.h <<\_ACEOF
16741#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16742_ACEOF
16743
16744 fi
16745
16746for ac_func in pthread_sigmask
16747do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16749{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016752 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016753else
16754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016755/* confdefs.h. */
16756_ACEOF
16757cat confdefs.h >>conftest.$ac_ext
16758cat >>conftest.$ac_ext <<_ACEOF
16759/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016760/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16761 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16762#define $ac_func innocuous_$ac_func
16763
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016764/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016765 which can conflict with char $ac_func (); below.
16766 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016767 <limits.h> exists even on freestanding compilers. */
16768
16769#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016770# include <limits.h>
16771#else
16772# include <assert.h>
16773#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016774
16775#undef $ac_func
16776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777/* Override any GCC internal prototype to avoid an error.
16778 Use char because int might match the return type of a GCC
16779 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016780#ifdef __cplusplus
16781extern "C"
16782#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016783char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016784/* The GNU C library defines this for functions which it implements
16785 to always fail with ENOSYS. Some functions are actually named
16786 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016788choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016789#endif
16790
Skip Montanaro6dead952003-09-25 14:50:04 +000016791int
16792main ()
16793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016795 ;
16796 return 0;
16797}
16798_ACEOF
16799rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800if { (ac_try="$ac_link"
16801case "(($ac_try" in
16802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16803 *) ac_try_echo=$ac_try;;
16804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 grep -v '^ *+' conftest.er1 >conftest.err
16809 rm -f conftest.er1
16810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 (exit $ac_status); } && {
16813 test -z "$ac_c_werror_flag" ||
16814 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016815 } && test -s conftest$ac_exeext &&
16816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016817 eval "$as_ac_var=yes"
16818else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016820sed 's/^/| /' conftest.$ac_ext >&5
16821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824
16825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016827fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016828ac_res=`eval echo '${'$as_ac_var'}'`
16829 { echo "$as_me:$LINENO: result: $ac_res" >&5
16830echo "${ECHO_T}$ac_res" >&6; }
16831if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016832 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016833#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016834_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016835 case $ac_sys_system in
16836 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016837
Jason Tishlerfac083d2003-07-22 15:20:49 +000016838cat >>confdefs.h <<\_ACEOF
16839#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16840_ACEOF
16841
16842 ;;
16843 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016844fi
16845done
16846
16847fi
16848
16849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016850# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016851
16852
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016853{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16854echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016856if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016858 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016859 { echo "$as_me:$LINENO: result: no" >&5
16860echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016861 ipv6=no
16862 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016863 *) { echo "$as_me:$LINENO: result: yes" >&5
16864echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016867_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016868
16869 ipv6=yes
16870 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016872else
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016874 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016875 { echo "$as_me:$LINENO: result: no" >&5
16876echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016877 ipv6=no
16878
16879else
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016886 /* AF_INET6 available check */
16887#include <sys/types.h>
16888#include <sys/socket.h>
16889main()
16890{
16891 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16892 exit(1);
16893 else
16894 exit(0);
16895}
16896
Martin v. Löwis11437992002-04-12 09:54:03 +000016897_ACEOF
16898rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899if { (ac_try="$ac_link"
16900case "(($ac_try" in
16901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16902 *) ac_try_echo=$ac_try;;
16903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 { (case "(($ac_try" in
16910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16911 *) ac_try_echo=$ac_try;;
16912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016918 { echo "$as_me:$LINENO: result: yes" >&5
16919echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016920 ipv6=yes
16921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016922 echo "$as_me: program exited with status $ac_status" >&5
16923echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016924sed 's/^/| /' conftest.$ac_ext >&5
16925
Martin v. Löwis11437992002-04-12 09:54:03 +000016926( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016927{ echo "$as_me:$LINENO: result: no" >&5
16928echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016929 ipv6=no
16930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931rm -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 +000016932fi
16933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934
16935
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016936if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016937 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16938echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
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öwisa5f8bb52001-09-05 08:22:34 +000016945#include <sys/types.h>
16946#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016947int
16948main ()
16949{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016950struct sockaddr_in6 x;
16951x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 ;
16953 return 0;
16954}
16955_ACEOF
16956rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957if { (ac_try="$ac_compile"
16958case "(($ac_try" in
16959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16960 *) ac_try_echo=$ac_try;;
16961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016965 grep -v '^ *+' conftest.er1 >conftest.err
16966 rm -f conftest.er1
16967 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016969 (exit $ac_status); } && {
16970 test -z "$ac_c_werror_flag" ||
16971 test ! -s conftest.err
16972 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016973 { echo "$as_me:$LINENO: result: yes" >&5
16974echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016975 ipv6=yes
16976else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016980 { echo "$as_me:$LINENO: result: no" >&5
16981echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016982 ipv6=no
16983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984
16985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016986fi
16987
16988if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016990#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016991_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016992
16993fi
16994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995fi
16996
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016997
16998ipv6type=unknown
16999ipv6lib=none
17000ipv6trylibc=no
17001
17002if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017003 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17004echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017005 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17006 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017007 case $i in
17008 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017010/* confdefs.h. */
17011_ACEOF
17012cat confdefs.h >>conftest.$ac_ext
17013cat >>conftest.$ac_ext <<_ACEOF
17014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017016#include <netinet/in.h>
17017#ifdef IPV6_INRIA_VERSION
17018yes
17019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017022 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017023 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017024fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017026
17027 ;;
17028 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017030/* confdefs.h. */
17031_ACEOF
17032cat confdefs.h >>conftest.$ac_ext
17033cat >>conftest.$ac_ext <<_ACEOF
17034/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017036#include <netinet/in.h>
17037#ifdef __KAME__
17038yes
17039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017040_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017042 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017043 ipv6type=$i;
17044 ipv6lib=inet6
17045 ipv6libdir=/usr/local/v6/lib
17046 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017047fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017048rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017049
17050 ;;
17051 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017053/* confdefs.h. */
17054_ACEOF
17055cat confdefs.h >>conftest.$ac_ext
17056cat >>conftest.$ac_ext <<_ACEOF
17057/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017059#include <features.h>
17060#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17061yes
17062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017063_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017065 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066 ipv6type=$i;
17067 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017068fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017069rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017070
17071 ;;
17072 linux-inet6)
17073 if test -d /usr/inet6; then
17074 ipv6type=$i
17075 ipv6lib=inet6
17076 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017077 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017078 fi
17079 ;;
17080 solaris)
17081 if test -f /etc/netconfig; then
17082 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17083 ipv6type=$i
17084 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017085 fi
17086 fi
17087 ;;
17088 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017090/* confdefs.h. */
17091_ACEOF
17092cat confdefs.h >>conftest.$ac_ext
17093cat >>conftest.$ac_ext <<_ACEOF
17094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017096#include <sys/param.h>
17097#ifdef _TOSHIBA_INET6
17098yes
17099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017103 ipv6type=$i;
17104 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017105 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017106fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017108
17109 ;;
17110 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017112/* confdefs.h. */
17113_ACEOF
17114cat confdefs.h >>conftest.$ac_ext
17115cat >>conftest.$ac_ext <<_ACEOF
17116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017118#include </usr/local/v6/include/sys/v6config.h>
17119#ifdef __V6D__
17120yes
17121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017124 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017125 ipv6type=$i;
17126 ipv6lib=v6;
17127 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017128 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017129fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017130rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017131
17132 ;;
17133 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017135/* confdefs.h. */
17136_ACEOF
17137cat confdefs.h >>conftest.$ac_ext
17138cat >>conftest.$ac_ext <<_ACEOF
17139/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017141#include <sys/param.h>
17142#ifdef _ZETA_MINAMI_INET6
17143yes
17144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017145_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017147 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017148 ipv6type=$i;
17149 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017150 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017152rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017153
17154 ;;
17155 esac
17156 if test "$ipv6type" != "unknown"; then
17157 break
17158 fi
17159 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017160 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17161echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017162fi
17163
17164if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17165 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17166 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17167 echo "using lib$ipv6lib"
17168 else
17169 if test $ipv6trylibc = "yes"; then
17170 echo "using libc"
17171 else
17172 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17173 echo "You need to fetch lib$ipv6lib.a from appropriate"
17174 echo 'ipv6 kit and compile beforehand.'
17175 exit 1
17176 fi
17177 fi
17178fi
17179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017180{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17181echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017182cat >conftest.$ac_ext <<_ACEOF
17183/* confdefs.h. */
17184_ACEOF
17185cat confdefs.h >>conftest.$ac_ext
17186cat >>conftest.$ac_ext <<_ACEOF
17187/* end confdefs.h. */
17188#include <Carbon/Carbon.h>
17189int
17190main ()
17191{
17192FSIORefNum fRef = 0
17193 ;
17194 return 0;
17195}
17196_ACEOF
17197rm -f conftest.$ac_objext
17198if { (ac_try="$ac_compile"
17199case "(($ac_try" in
17200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17201 *) ac_try_echo=$ac_try;;
17202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017204 (eval "$ac_compile") 2>conftest.er1
17205 ac_status=$?
17206 grep -v '^ *+' conftest.er1 >conftest.err
17207 rm -f conftest.er1
17208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017210 (exit $ac_status); } && {
17211 test -z "$ac_c_werror_flag" ||
17212 test ! -s conftest.err
17213 } && test -s conftest.$ac_objext; then
17214
17215cat >>confdefs.h <<\_ACEOF
17216#define HAVE_OSX105_SDK 1
17217_ACEOF
17218
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017219 { echo "$as_me:$LINENO: result: yes" >&5
17220echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017222 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017223sed 's/^/| /' conftest.$ac_ext >&5
17224
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017225 { echo "$as_me:$LINENO: result: no" >&5
17226echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017227
17228fi
17229
17230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17231
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017232# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017233{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17234echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017237if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238 withval=$with_doc_strings;
17239fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017240
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017241
17242if test -z "$with_doc_strings"
17243then with_doc_strings="yes"
17244fi
17245if test "$with_doc_strings" != "no"
17246then
17247
17248cat >>confdefs.h <<\_ACEOF
17249#define WITH_DOC_STRINGS 1
17250_ACEOF
17251
17252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017253{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17254echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017255
Neil Schemenauera35c6882001-02-27 04:45:05 +000017256# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017257{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17258echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017261if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017263if test "$withval" != no
17264then
17265
17266cat >>confdefs.h <<\_ACEOF
17267#define WITH_TSC 1
17268_ACEOF
17269
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017270 { echo "$as_me:$LINENO: result: yes" >&5
17271echo "${ECHO_T}yes" >&6; }
17272else { echo "$as_me:$LINENO: result: no" >&5
17273echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017274fi
17275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017276 { echo "$as_me:$LINENO: result: no" >&5
17277echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278fi
17279
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017280
17281# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017282{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17283echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017286if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287 withval=$with_pymalloc;
17288fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017289
Neil Schemenauera35c6882001-02-27 04:45:05 +000017290
Neil Schemenauer16c22972002-03-22 15:34:49 +000017291if test -z "$with_pymalloc"
17292then with_pymalloc="yes"
17293fi
17294if test "$with_pymalloc" != "no"
17295then
Martin v. Löwis11437992002-04-12 09:54:03 +000017296
17297cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017298#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017299_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017300
17301fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017302{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17303echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017304
Benjamin Peterson05159c42009-12-03 03:01:27 +000017305# Check for Valgrind support
17306{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17307echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17308
17309# Check whether --with-valgrind was given.
17310if test "${with_valgrind+set}" = set; then
17311 withval=$with_valgrind;
17312else
17313 with_valgrind=no
17314fi
17315
17316{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17317echo "${ECHO_T}$with_valgrind" >&6; }
17318if test "$with_valgrind" != no; then
17319 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17320 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17321echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17322if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17323 echo $ECHO_N "(cached) $ECHO_C" >&6
17324fi
17325{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17326echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17327else
17328 # Is the header compilable?
17329{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17330echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17331cat >conftest.$ac_ext <<_ACEOF
17332/* confdefs.h. */
17333_ACEOF
17334cat confdefs.h >>conftest.$ac_ext
17335cat >>conftest.$ac_ext <<_ACEOF
17336/* end confdefs.h. */
17337$ac_includes_default
17338#include <valgrind/valgrind.h>
17339_ACEOF
17340rm -f conftest.$ac_objext
17341if { (ac_try="$ac_compile"
17342case "(($ac_try" in
17343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17344 *) ac_try_echo=$ac_try;;
17345esac
17346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17347 (eval "$ac_compile") 2>conftest.er1
17348 ac_status=$?
17349 grep -v '^ *+' conftest.er1 >conftest.err
17350 rm -f conftest.er1
17351 cat conftest.err >&5
17352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353 (exit $ac_status); } && {
17354 test -z "$ac_c_werror_flag" ||
17355 test ! -s conftest.err
17356 } && test -s conftest.$ac_objext; then
17357 ac_header_compiler=yes
17358else
17359 echo "$as_me: failed program was:" >&5
17360sed 's/^/| /' conftest.$ac_ext >&5
17361
17362 ac_header_compiler=no
17363fi
17364
17365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17366{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17367echo "${ECHO_T}$ac_header_compiler" >&6; }
17368
17369# Is the header present?
17370{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17371echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17372cat >conftest.$ac_ext <<_ACEOF
17373/* confdefs.h. */
17374_ACEOF
17375cat confdefs.h >>conftest.$ac_ext
17376cat >>conftest.$ac_ext <<_ACEOF
17377/* end confdefs.h. */
17378#include <valgrind/valgrind.h>
17379_ACEOF
17380if { (ac_try="$ac_cpp conftest.$ac_ext"
17381case "(($ac_try" in
17382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383 *) ac_try_echo=$ac_try;;
17384esac
17385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17387 ac_status=$?
17388 grep -v '^ *+' conftest.er1 >conftest.err
17389 rm -f conftest.er1
17390 cat conftest.err >&5
17391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17392 (exit $ac_status); } >/dev/null && {
17393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17394 test ! -s conftest.err
17395 }; then
17396 ac_header_preproc=yes
17397else
17398 echo "$as_me: failed program was:" >&5
17399sed 's/^/| /' conftest.$ac_ext >&5
17400
17401 ac_header_preproc=no
17402fi
17403
17404rm -f conftest.err conftest.$ac_ext
17405{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17406echo "${ECHO_T}$ac_header_preproc" >&6; }
17407
17408# So? What about this header?
17409case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17410 yes:no: )
17411 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17412echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17413 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17414echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17415 ac_header_preproc=yes
17416 ;;
17417 no:yes:* )
17418 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17419echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17420 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17421echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17422 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17423echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17424 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17425echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17426 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17427echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17428 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17429echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17430 ( cat <<\_ASBOX
17431## -------------------------------------- ##
17432## Report this to http://bugs.python.org/ ##
17433## -------------------------------------- ##
17434_ASBOX
17435 ) | sed "s/^/$as_me: WARNING: /" >&2
17436 ;;
17437esac
17438{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17439echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17440if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17441 echo $ECHO_N "(cached) $ECHO_C" >&6
17442else
17443 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17444fi
17445{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17446echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17447
17448fi
17449if test $ac_cv_header_valgrind_valgrind_h = yes; then
17450
17451cat >>confdefs.h <<\_ACEOF
17452#define WITH_VALGRIND 1
17453_ACEOF
17454
17455else
17456 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17457echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17458 { (exit 1); exit 1; }; }
17459
17460fi
17461
17462
17463fi
17464
Barry Warsawef82cd72000-06-30 16:21:01 +000017465# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017466{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17467echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017470if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017472if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017473then
17474
17475cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017476#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017477_ACEOF
17478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017479 { echo "$as_me:$LINENO: result: yes" >&5
17480echo "${ECHO_T}yes" >&6; }
17481else { echo "$as_me:$LINENO: result: no" >&5
17482echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017483fi
17484else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017485 { echo "$as_me:$LINENO: result: no" >&5
17486echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487fi
17488
Barry Warsawef82cd72000-06-30 16:21:01 +000017489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017490# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017491
Guido van Rossum98935bf2001-09-05 19:13:16 +000017492DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017493
Guido van Rossume97ee181999-12-20 21:27:22 +000017494# the dlopen() function means we might want to use dynload_shlib.o. some
17495# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
Thomas Wouters3a584202000-08-05 23:28:51 +000017497for ac_func in dlopen
17498do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17500{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017504else
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017506/* confdefs.h. */
17507_ACEOF
17508cat confdefs.h >>conftest.$ac_ext
17509cat >>conftest.$ac_ext <<_ACEOF
17510/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017511/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17512 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17513#define $ac_func innocuous_$ac_func
17514
Guido van Rossume97ee181999-12-20 21:27:22 +000017515/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017516 which can conflict with char $ac_func (); below.
17517 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017518 <limits.h> exists even on freestanding compilers. */
17519
17520#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017521# include <limits.h>
17522#else
17523# include <assert.h>
17524#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017525
17526#undef $ac_func
17527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528/* Override any GCC internal prototype to avoid an error.
17529 Use char because int might match the return type of a GCC
17530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017531#ifdef __cplusplus
17532extern "C"
17533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017534char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017535/* The GNU C library defines this for functions which it implements
17536 to always fail with ENOSYS. Some functions are actually named
17537 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017539choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017540#endif
17541
Skip Montanaro6dead952003-09-25 14:50:04 +000017542int
17543main ()
17544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 ;
17547 return 0;
17548}
17549_ACEOF
17550rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551if { (ac_try="$ac_link"
17552case "(($ac_try" in
17553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17554 *) ac_try_echo=$ac_try;;
17555esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017559 grep -v '^ *+' conftest.er1 >conftest.err
17560 rm -f conftest.er1
17561 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 (exit $ac_status); } && {
17564 test -z "$ac_c_werror_flag" ||
17565 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017566 } && test -s conftest$ac_exeext &&
17567 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017568 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017569else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017571sed 's/^/| /' conftest.$ac_ext >&5
17572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
17576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017577 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017578fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017579ac_res=`eval echo '${'$as_ac_var'}'`
17580 { echo "$as_me:$LINENO: result: $ac_res" >&5
17581echo "${ECHO_T}$ac_res" >&6; }
17582if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017584#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017585_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017586
Guido van Rossume97ee181999-12-20 21:27:22 +000017587fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017588done
Guido van Rossume97ee181999-12-20 21:27:22 +000017589
Michael W. Hudson54241132001-12-07 15:38:26 +000017590
Guido van Rossume97ee181999-12-20 21:27:22 +000017591# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17592# loading of modules.
17593
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017594{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17595echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017596if test -z "$DYNLOADFILE"
17597then
17598 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017599 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17600 if test "$ac_cv_func_dlopen" = yes
17601 then DYNLOADFILE="dynload_shlib.o"
17602 else DYNLOADFILE="dynload_aix.o"
17603 fi
17604 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017605 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017606 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17607 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017608 *)
17609 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17610 # out any dynamic loading
17611 if test "$ac_cv_func_dlopen" = yes
17612 then DYNLOADFILE="dynload_shlib.o"
17613 else DYNLOADFILE="dynload_stub.o"
17614 fi
17615 ;;
17616 esac
17617fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017618{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17619echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017620if test "$DYNLOADFILE" != "dynload_stub.o"
17621then
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
17623cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017624#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017625_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017626
17627fi
17628
Neil Schemenauer4e425612001-06-19 15:44:15 +000017629# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17630
Michael W. Hudson54241132001-12-07 15:38:26 +000017631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017632{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17633echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017634if test -z "$MACHDEP_OBJS"
17635then
Jack Jansene578a632001-08-15 01:27:14 +000017636 MACHDEP_OBJS=$extra_machdep_objs
17637else
17638 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017639fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017640{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17641echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017642
Guido van Rossum627b2d71993-12-24 10:39:16 +000017643# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
Martin v. Löwisd6320502004-08-12 13:45:08 +000017715
Martin v. Löwisc3001752005-01-23 09:27:24 +000017716
17717
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017718
17719
Thomas Wouterscf297e42007-02-23 15:07:44 +000017720
17721
Gregory P. Smith25523d22007-09-03 16:44:55 +000017722
Christian Heimes4e30a842007-11-30 22:12:06 +000017723
Martin v. Löwis92fab752008-03-08 10:40:41 +000017724
Martin v. Löwis823725e2008-03-24 13:39:54 +000017725
17726
Benjamin Peterson965ce872009-04-05 21:24:58 +000017727
17728
17729
17730
Martin v. Löwis011e8422009-05-05 04:43:17 +000017731
Martin v. Löwis113a0852009-05-29 17:25:39 +000017732
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017733
17734
17735
17736
Antoine Pitroub7572f02009-12-02 20:46:48 +000017737
Martin v. Löwis823725e2008-03-24 13:39:54 +000017738for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17739 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017740 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017741 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017742 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017743 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017744 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017745 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17746 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017747 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17748 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017749 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017750 truncate uname unsetenv utimes waitpid wait3 wait4 \
17751 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017752do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017753as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17754{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17755echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758else
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017760/* confdefs.h. */
17761_ACEOF
17762cat confdefs.h >>conftest.$ac_ext
17763cat >>conftest.$ac_ext <<_ACEOF
17764/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017765/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17766 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17767#define $ac_func innocuous_$ac_func
17768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017769/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017770 which can conflict with char $ac_func (); below.
17771 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017772 <limits.h> exists even on freestanding compilers. */
17773
17774#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017775# include <limits.h>
17776#else
17777# include <assert.h>
17778#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017779
17780#undef $ac_func
17781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782/* Override any GCC internal prototype to avoid an error.
17783 Use char because int might match the return type of a GCC
17784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017785#ifdef __cplusplus
17786extern "C"
17787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017788char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017789/* The GNU C library defines this for functions which it implements
17790 to always fail with ENOSYS. Some functions are actually named
17791 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017793choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017794#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017795
Skip Montanaro6dead952003-09-25 14:50:04 +000017796int
17797main ()
17798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 ;
17801 return 0;
17802}
17803_ACEOF
17804rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805if { (ac_try="$ac_link"
17806case "(($ac_try" in
17807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17808 *) ac_try_echo=$ac_try;;
17809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017813 grep -v '^ *+' conftest.er1 >conftest.err
17814 rm -f conftest.er1
17815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 (exit $ac_status); } && {
17818 test -z "$ac_c_werror_flag" ||
17819 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017820 } && test -s conftest$ac_exeext &&
17821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017825sed 's/^/| /' conftest.$ac_ext >&5
17826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829
17830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017833ac_res=`eval echo '${'$as_ac_var'}'`
17834 { echo "$as_me:$LINENO: result: $ac_res" >&5
17835echo "${ECHO_T}$ac_res" >&6; }
17836if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017838#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017839_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017840
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017841fi
17842done
17843
Michael W. Hudson54241132001-12-07 15:38:26 +000017844
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017845# For some functions, having a definition is not sufficient, since
17846# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017847{ echo "$as_me:$LINENO: checking for chroot" >&5
17848echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017850/* confdefs.h. */
17851_ACEOF
17852cat confdefs.h >>conftest.$ac_ext
17853cat >>conftest.$ac_ext <<_ACEOF
17854/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017855#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017856int
17857main ()
17858{
17859void *x=chroot
17860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865if { (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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017873 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877 (exit $ac_status); } && {
17878 test -z "$ac_c_werror_flag" ||
17879 test ! -s conftest.err
17880 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017881
17882cat >>confdefs.h <<\_ACEOF
17883#define HAVE_CHROOT 1
17884_ACEOF
17885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017886 { echo "$as_me:$LINENO: result: yes" >&5
17887echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +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; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017894
17895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896
17897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017898{ echo "$as_me:$LINENO: checking for link" >&5
17899echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017906#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017907int
17908main ()
17909{
17910void *x=link
17911 ;
17912 return 0;
17913}
17914_ACEOF
17915rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916if { (ac_try="$ac_compile"
17917case "(($ac_try" in
17918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17919 *) ac_try_echo=$ac_try;;
17920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017924 grep -v '^ *+' conftest.er1 >conftest.err
17925 rm -f conftest.er1
17926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928 (exit $ac_status); } && {
17929 test -z "$ac_c_werror_flag" ||
17930 test ! -s conftest.err
17931 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017932
17933cat >>confdefs.h <<\_ACEOF
17934#define HAVE_LINK 1
17935_ACEOF
17936
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017937 { echo "$as_me:$LINENO: result: yes" >&5
17938echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017939else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017941sed 's/^/| /' conftest.$ac_ext >&5
17942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017943 { echo "$as_me:$LINENO: result: no" >&5
17944echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017945
17946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947
17948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017949{ echo "$as_me:$LINENO: checking for symlink" >&5
17950echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017951cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017952/* confdefs.h. */
17953_ACEOF
17954cat confdefs.h >>conftest.$ac_ext
17955cat >>conftest.$ac_ext <<_ACEOF
17956/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017957#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017958int
17959main ()
17960{
17961void *x=symlink
17962 ;
17963 return 0;
17964}
17965_ACEOF
17966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967if { (ac_try="$ac_compile"
17968case "(($ac_try" in
17969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17970 *) ac_try_echo=$ac_try;;
17971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017975 grep -v '^ *+' conftest.er1 >conftest.err
17976 rm -f conftest.er1
17977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 (exit $ac_status); } && {
17980 test -z "$ac_c_werror_flag" ||
17981 test ! -s conftest.err
17982 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017983
17984cat >>confdefs.h <<\_ACEOF
17985#define HAVE_SYMLINK 1
17986_ACEOF
17987
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017988 { echo "$as_me:$LINENO: result: yes" >&5
17989echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017992sed 's/^/| /' conftest.$ac_ext >&5
17993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017994 { echo "$as_me:$LINENO: result: no" >&5
17995echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017996
17997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998
17999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018000{ echo "$as_me:$LINENO: checking for fchdir" >&5
18001echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018003/* confdefs.h. */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018008#include <unistd.h>
18009int
18010main ()
18011{
18012void *x=fchdir
18013 ;
18014 return 0;
18015}
18016_ACEOF
18017rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018if { (ac_try="$ac_compile"
18019case "(($ac_try" in
18020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18021 *) ac_try_echo=$ac_try;;
18022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018026 grep -v '^ *+' conftest.er1 >conftest.err
18027 rm -f conftest.er1
18028 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030 (exit $ac_status); } && {
18031 test -z "$ac_c_werror_flag" ||
18032 test ! -s conftest.err
18033 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018034
18035cat >>confdefs.h <<\_ACEOF
18036#define HAVE_FCHDIR 1
18037_ACEOF
18038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018039 { echo "$as_me:$LINENO: result: yes" >&5
18040echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018043sed 's/^/| /' conftest.$ac_ext >&5
18044
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018045 { echo "$as_me:$LINENO: result: no" >&5
18046echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018047
18048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049
18050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018051{ echo "$as_me:$LINENO: checking for fsync" >&5
18052echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018054/* confdefs.h. */
18055_ACEOF
18056cat confdefs.h >>conftest.$ac_ext
18057cat >>conftest.$ac_ext <<_ACEOF
18058/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018059#include <unistd.h>
18060int
18061main ()
18062{
18063void *x=fsync
18064 ;
18065 return 0;
18066}
18067_ACEOF
18068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069if { (ac_try="$ac_compile"
18070case "(($ac_try" in
18071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072 *) ac_try_echo=$ac_try;;
18073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077 grep -v '^ *+' conftest.er1 >conftest.err
18078 rm -f conftest.er1
18079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 (exit $ac_status); } && {
18082 test -z "$ac_c_werror_flag" ||
18083 test ! -s conftest.err
18084 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018085
18086cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018087#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018088_ACEOF
18089
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018090 { echo "$as_me:$LINENO: result: yes" >&5
18091echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018094sed 's/^/| /' conftest.$ac_ext >&5
18095
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018096 { echo "$as_me:$LINENO: result: no" >&5
18097echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018098
18099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100
18101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018102{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18103echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018105/* confdefs.h. */
18106_ACEOF
18107cat confdefs.h >>conftest.$ac_ext
18108cat >>conftest.$ac_ext <<_ACEOF
18109/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018110#include <unistd.h>
18111int
18112main ()
18113{
18114void *x=fdatasync
18115 ;
18116 return 0;
18117}
18118_ACEOF
18119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120if { (ac_try="$ac_compile"
18121case "(($ac_try" in
18122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18123 *) ac_try_echo=$ac_try;;
18124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018128 grep -v '^ *+' conftest.er1 >conftest.err
18129 rm -f conftest.er1
18130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132 (exit $ac_status); } && {
18133 test -z "$ac_c_werror_flag" ||
18134 test ! -s conftest.err
18135 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018136
18137cat >>confdefs.h <<\_ACEOF
18138#define HAVE_FDATASYNC 1
18139_ACEOF
18140
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018141 { echo "$as_me:$LINENO: result: yes" >&5
18142echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018143else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018145sed 's/^/| /' conftest.$ac_ext >&5
18146
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147 { echo "$as_me:$LINENO: result: no" >&5
18148echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018149
18150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151
18152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018153{ echo "$as_me:$LINENO: checking for epoll" >&5
18154echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018155cat >conftest.$ac_ext <<_ACEOF
18156/* confdefs.h. */
18157_ACEOF
18158cat confdefs.h >>conftest.$ac_ext
18159cat >>conftest.$ac_ext <<_ACEOF
18160/* end confdefs.h. */
18161#include <sys/epoll.h>
18162int
18163main ()
18164{
18165void *x=epoll_create
18166 ;
18167 return 0;
18168}
18169_ACEOF
18170rm -f conftest.$ac_objext
18171if { (ac_try="$ac_compile"
18172case "(($ac_try" in
18173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18174 *) ac_try_echo=$ac_try;;
18175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018177 (eval "$ac_compile") 2>conftest.er1
18178 ac_status=$?
18179 grep -v '^ *+' conftest.er1 >conftest.err
18180 rm -f conftest.er1
18181 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018183 (exit $ac_status); } && {
18184 test -z "$ac_c_werror_flag" ||
18185 test ! -s conftest.err
18186 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018187
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018188cat >>confdefs.h <<\_ACEOF
18189#define HAVE_EPOLL 1
18190_ACEOF
18191
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018192 { echo "$as_me:$LINENO: result: yes" >&5
18193echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018195 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018196sed 's/^/| /' conftest.$ac_ext >&5
18197
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018198 { echo "$as_me:$LINENO: result: no" >&5
18199echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018200
18201fi
18202
18203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018204{ echo "$as_me:$LINENO: checking for kqueue" >&5
18205echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018206cat >conftest.$ac_ext <<_ACEOF
18207/* confdefs.h. */
18208_ACEOF
18209cat confdefs.h >>conftest.$ac_ext
18210cat >>conftest.$ac_ext <<_ACEOF
18211/* end confdefs.h. */
18212
18213#include <sys/types.h>
18214#include <sys/event.h>
18215
18216int
18217main ()
18218{
18219int x=kqueue()
18220 ;
18221 return 0;
18222}
18223_ACEOF
18224rm -f conftest.$ac_objext
18225if { (ac_try="$ac_compile"
18226case "(($ac_try" in
18227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18228 *) ac_try_echo=$ac_try;;
18229esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018231 (eval "$ac_compile") 2>conftest.er1
18232 ac_status=$?
18233 grep -v '^ *+' conftest.er1 >conftest.err
18234 rm -f conftest.er1
18235 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018237 (exit $ac_status); } && {
18238 test -z "$ac_c_werror_flag" ||
18239 test ! -s conftest.err
18240 } && test -s conftest.$ac_objext; then
18241
18242cat >>confdefs.h <<\_ACEOF
18243#define HAVE_KQUEUE 1
18244_ACEOF
18245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018246 { echo "$as_me:$LINENO: result: yes" >&5
18247echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018249 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018250sed 's/^/| /' conftest.$ac_ext >&5
18251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252 { echo "$as_me:$LINENO: result: no" >&5
18253echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018254
18255fi
18256
18257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018258# On some systems (eg. FreeBSD 5), we would find a definition of the
18259# functions ctermid_r, setgroups in the library, but no prototype
18260# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18261# address to avoid compiler warnings and potential miscompilations
18262# because of the missing prototypes.
18263
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018264{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18265echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018267/* confdefs.h. */
18268_ACEOF
18269cat confdefs.h >>conftest.$ac_ext
18270cat >>conftest.$ac_ext <<_ACEOF
18271/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018272
18273#include "confdefs.h"
18274#include <stdio.h>
18275
Martin v. Löwisd5843682002-11-21 20:41:28 +000018276int
18277main ()
18278{
18279void* p = ctermid_r
18280 ;
18281 return 0;
18282}
18283_ACEOF
18284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285if { (ac_try="$ac_compile"
18286case "(($ac_try" in
18287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18288 *) ac_try_echo=$ac_try;;
18289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018293 grep -v '^ *+' conftest.er1 >conftest.err
18294 rm -f conftest.er1
18295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297 (exit $ac_status); } && {
18298 test -z "$ac_c_werror_flag" ||
18299 test ! -s conftest.err
18300 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018301
18302cat >>confdefs.h <<\_ACEOF
18303#define HAVE_CTERMID_R 1
18304_ACEOF
18305
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018306 { echo "$as_me:$LINENO: result: yes" >&5
18307echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018308else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018310sed 's/^/| /' conftest.$ac_ext >&5
18311
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018312 { echo "$as_me:$LINENO: result: no" >&5
18313echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018314
18315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018319{ echo "$as_me:$LINENO: checking for flock" >&5
18320echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018322/* confdefs.h. */
18323_ACEOF
18324cat confdefs.h >>conftest.$ac_ext
18325cat >>conftest.$ac_ext <<_ACEOF
18326/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018327
18328#include "confdefs.h"
18329#include <sys/file.h>
18330
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018331int
18332main ()
18333{
18334void* p = flock
18335 ;
18336 return 0;
18337}
18338_ACEOF
18339rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340if { (ac_try="$ac_compile"
18341case "(($ac_try" in
18342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18343 *) ac_try_echo=$ac_try;;
18344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018348 grep -v '^ *+' conftest.er1 >conftest.err
18349 rm -f conftest.er1
18350 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352 (exit $ac_status); } && {
18353 test -z "$ac_c_werror_flag" ||
18354 test ! -s conftest.err
18355 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018356
18357cat >>confdefs.h <<\_ACEOF
18358#define HAVE_FLOCK 1
18359_ACEOF
18360
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018361 { echo "$as_me:$LINENO: result: yes" >&5
18362echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018365sed 's/^/| /' conftest.$ac_ext >&5
18366
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018367 { echo "$as_me:$LINENO: result: no" >&5
18368echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018369
18370fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18373
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018374{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18375echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018377/* confdefs.h. */
18378_ACEOF
18379cat confdefs.h >>conftest.$ac_ext
18380cat >>conftest.$ac_ext <<_ACEOF
18381/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018382
18383#include "confdefs.h"
18384#include <unistd.h>
18385
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018386int
18387main ()
18388{
18389void* p = getpagesize
18390 ;
18391 return 0;
18392}
18393_ACEOF
18394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395if { (ac_try="$ac_compile"
18396case "(($ac_try" in
18397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18398 *) ac_try_echo=$ac_try;;
18399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018403 grep -v '^ *+' conftest.er1 >conftest.err
18404 rm -f conftest.er1
18405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 (exit $ac_status); } && {
18408 test -z "$ac_c_werror_flag" ||
18409 test ! -s conftest.err
18410 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018411
18412cat >>confdefs.h <<\_ACEOF
18413#define HAVE_GETPAGESIZE 1
18414_ACEOF
18415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018416 { echo "$as_me:$LINENO: result: yes" >&5
18417echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018420sed 's/^/| /' conftest.$ac_ext >&5
18421
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018422 { echo "$as_me:$LINENO: result: no" >&5
18423echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018424
18425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426
18427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018428
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018429for ac_prog in true
18430do
18431 # Extract the first word of "$ac_prog", so it can be a program name with args.
18432set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018433{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018435if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018436 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018437else
18438 if test -n "$TRUE"; then
18439 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18440else
18441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18442for as_dir in $PATH
18443do
18444 IFS=$as_save_IFS
18445 test -z "$as_dir" && as_dir=.
18446 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 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 +000018448 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018449 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018450 break 2
18451 fi
18452done
18453done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018455
18456fi
18457fi
18458TRUE=$ac_cv_prog_TRUE
18459if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018460 { echo "$as_me:$LINENO: result: $TRUE" >&5
18461echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018463 { echo "$as_me:$LINENO: result: no" >&5
18464echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018465fi
18466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018468 test -n "$TRUE" && break
18469done
18470test -n "$TRUE" || TRUE="/bin/true"
18471
18472
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018473{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18474echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018475if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018477else
18478 ac_check_lib_save_LIBS=$LIBS
18479LIBS="-lc $LIBS"
18480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018481/* confdefs.h. */
18482_ACEOF
18483cat confdefs.h >>conftest.$ac_ext
18484cat >>conftest.$ac_ext <<_ACEOF
18485/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487/* Override any GCC internal prototype to avoid an error.
18488 Use char because int might match the return type of a GCC
18489 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018490#ifdef __cplusplus
18491extern "C"
18492#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018493char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018494int
18495main ()
18496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018498 ;
18499 return 0;
18500}
18501_ACEOF
18502rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503if { (ac_try="$ac_link"
18504case "(($ac_try" in
18505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18506 *) ac_try_echo=$ac_try;;
18507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018511 grep -v '^ *+' conftest.er1 >conftest.err
18512 rm -f conftest.er1
18513 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515 (exit $ac_status); } && {
18516 test -z "$ac_c_werror_flag" ||
18517 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018518 } && test -s conftest$ac_exeext &&
18519 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018520 ac_cv_lib_c_inet_aton=yes
18521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018523sed 's/^/| /' conftest.$ac_ext >&5
18524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527
18528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018530LIBS=$ac_check_lib_save_LIBS
18531fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018532{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18533echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18534if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018535 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018536else
18537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018538{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18539echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018540if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018541 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018542else
18543 ac_check_lib_save_LIBS=$LIBS
18544LIBS="-lresolv $LIBS"
18545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018546/* confdefs.h. */
18547_ACEOF
18548cat confdefs.h >>conftest.$ac_ext
18549cat >>conftest.$ac_ext <<_ACEOF
18550/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552/* Override any GCC internal prototype to avoid an error.
18553 Use char because int might match the return type of a GCC
18554 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018555#ifdef __cplusplus
18556extern "C"
18557#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018558char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018559int
18560main ()
18561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018563 ;
18564 return 0;
18565}
18566_ACEOF
18567rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568if { (ac_try="$ac_link"
18569case "(($ac_try" in
18570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18571 *) ac_try_echo=$ac_try;;
18572esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018576 grep -v '^ *+' conftest.er1 >conftest.err
18577 rm -f conftest.er1
18578 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580 (exit $ac_status); } && {
18581 test -z "$ac_c_werror_flag" ||
18582 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018583 } && test -s conftest$ac_exeext &&
18584 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018585 ac_cv_lib_resolv_inet_aton=yes
18586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018588sed 's/^/| /' conftest.$ac_ext >&5
18589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592
18593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018595LIBS=$ac_check_lib_save_LIBS
18596fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018597{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18598echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18599if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018600 cat >>confdefs.h <<_ACEOF
18601#define HAVE_LIBRESOLV 1
18602_ACEOF
18603
18604 LIBS="-lresolv $LIBS"
18605
18606fi
18607
18608
18609fi
18610
18611
Christian Heimesd0764e22007-12-04 15:00:33 +000018612# On Tru64, chflags seems to be present, but calling it will
18613# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018614{ echo "$as_me:$LINENO: checking for chflags" >&5
18615echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018616if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018617 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018618else
18619 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018620 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018621else
18622 cat >conftest.$ac_ext <<_ACEOF
18623/* confdefs.h. */
18624_ACEOF
18625cat confdefs.h >>conftest.$ac_ext
18626cat >>conftest.$ac_ext <<_ACEOF
18627/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018628[
Christian Heimesd0764e22007-12-04 15:00:33 +000018629#include <sys/stat.h>
18630#include <unistd.h>
18631int main(int argc, char*argv[])
18632{
18633 if(chflags(argv[0], 0) != 0)
18634 return 1;
18635 return 0;
18636}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018637]
Christian Heimesd0764e22007-12-04 15:00:33 +000018638_ACEOF
18639rm -f conftest$ac_exeext
18640if { (ac_try="$ac_link"
18641case "(($ac_try" in
18642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18643 *) ac_try_echo=$ac_try;;
18644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018646 (eval "$ac_link") 2>&5
18647 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18650 { (case "(($ac_try" in
18651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18652 *) ac_try_echo=$ac_try;;
18653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018655 (eval "$ac_try") 2>&5
18656 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018658 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018659 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018660else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018661 echo "$as_me: program exited with status $ac_status" >&5
18662echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018663sed 's/^/| /' conftest.$ac_ext >&5
18664
18665( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018666ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018667fi
18668rm -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 +000018669fi
18670
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018671
18672
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018673fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018674{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18675echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018676if test "$ac_cv_have_chflags" = cross ; then
18677 { echo "$as_me:$LINENO: checking for chflags" >&5
18678echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18679if test "${ac_cv_func_chflags+set}" = set; then
18680 echo $ECHO_N "(cached) $ECHO_C" >&6
18681else
18682 cat >conftest.$ac_ext <<_ACEOF
18683/* confdefs.h. */
18684_ACEOF
18685cat confdefs.h >>conftest.$ac_ext
18686cat >>conftest.$ac_ext <<_ACEOF
18687/* end confdefs.h. */
18688/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18690#define chflags innocuous_chflags
18691
18692/* System header to define __stub macros and hopefully few prototypes,
18693 which can conflict with char chflags (); below.
18694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18695 <limits.h> exists even on freestanding compilers. */
18696
18697#ifdef __STDC__
18698# include <limits.h>
18699#else
18700# include <assert.h>
18701#endif
18702
18703#undef chflags
18704
18705/* Override any GCC internal prototype to avoid an error.
18706 Use char because int might match the return type of a GCC
18707 builtin and then its argument prototype would still apply. */
18708#ifdef __cplusplus
18709extern "C"
18710#endif
18711char chflags ();
18712/* The GNU C library defines this for functions which it implements
18713 to always fail with ENOSYS. Some functions are actually named
18714 something starting with __ and the normal name is an alias. */
18715#if defined __stub_chflags || defined __stub___chflags
18716choke me
18717#endif
18718
18719int
18720main ()
18721{
18722return chflags ();
18723 ;
18724 return 0;
18725}
18726_ACEOF
18727rm -f conftest.$ac_objext conftest$ac_exeext
18728if { (ac_try="$ac_link"
18729case "(($ac_try" in
18730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18731 *) ac_try_echo=$ac_try;;
18732esac
18733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18734 (eval "$ac_link") 2>conftest.er1
18735 ac_status=$?
18736 grep -v '^ *+' conftest.er1 >conftest.err
18737 rm -f conftest.er1
18738 cat conftest.err >&5
18739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18740 (exit $ac_status); } && {
18741 test -z "$ac_c_werror_flag" ||
18742 test ! -s conftest.err
18743 } && test -s conftest$ac_exeext &&
18744 $as_test_x conftest$ac_exeext; then
18745 ac_cv_func_chflags=yes
18746else
18747 echo "$as_me: failed program was:" >&5
18748sed 's/^/| /' conftest.$ac_ext >&5
18749
18750 ac_cv_func_chflags=no
18751fi
18752
18753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18754 conftest$ac_exeext conftest.$ac_ext
18755fi
18756{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18757echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18758if test $ac_cv_func_chflags = yes; then
18759 ac_cv_have_chflags="yes"
18760else
18761 ac_cv_have_chflags="no"
18762fi
18763
18764fi
18765if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018766
18767cat >>confdefs.h <<\_ACEOF
18768#define HAVE_CHFLAGS 1
18769_ACEOF
18770
18771fi
18772
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018773{ echo "$as_me:$LINENO: checking for lchflags" >&5
18774echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018775if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018776 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018777else
18778 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018779 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018780else
18781 cat >conftest.$ac_ext <<_ACEOF
18782/* confdefs.h. */
18783_ACEOF
18784cat confdefs.h >>conftest.$ac_ext
18785cat >>conftest.$ac_ext <<_ACEOF
18786/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018787[
Christian Heimesd0764e22007-12-04 15:00:33 +000018788#include <sys/stat.h>
18789#include <unistd.h>
18790int main(int argc, char*argv[])
18791{
18792 if(lchflags(argv[0], 0) != 0)
18793 return 1;
18794 return 0;
18795}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018796]
Christian Heimesd0764e22007-12-04 15:00:33 +000018797_ACEOF
18798rm -f conftest$ac_exeext
18799if { (ac_try="$ac_link"
18800case "(($ac_try" in
18801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18802 *) ac_try_echo=$ac_try;;
18803esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018805 (eval "$ac_link") 2>&5
18806 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18809 { (case "(($ac_try" in
18810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18811 *) ac_try_echo=$ac_try;;
18812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018814 (eval "$ac_try") 2>&5
18815 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018817 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018818 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018820 echo "$as_me: program exited with status $ac_status" >&5
18821echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018822sed 's/^/| /' conftest.$ac_ext >&5
18823
18824( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018825ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018826fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18828fi
18829
18830
Christian Heimesd0764e22007-12-04 15:00:33 +000018831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018833{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18834echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018835if test "$ac_cv_have_lchflags" = cross ; then
18836 { echo "$as_me:$LINENO: checking for lchflags" >&5
18837echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18838if test "${ac_cv_func_lchflags+set}" = set; then
18839 echo $ECHO_N "(cached) $ECHO_C" >&6
18840else
18841 cat >conftest.$ac_ext <<_ACEOF
18842/* confdefs.h. */
18843_ACEOF
18844cat confdefs.h >>conftest.$ac_ext
18845cat >>conftest.$ac_ext <<_ACEOF
18846/* end confdefs.h. */
18847/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18848 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18849#define lchflags innocuous_lchflags
18850
18851/* System header to define __stub macros and hopefully few prototypes,
18852 which can conflict with char lchflags (); below.
18853 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18854 <limits.h> exists even on freestanding compilers. */
18855
18856#ifdef __STDC__
18857# include <limits.h>
18858#else
18859# include <assert.h>
18860#endif
18861
18862#undef lchflags
18863
18864/* Override any GCC internal prototype to avoid an error.
18865 Use char because int might match the return type of a GCC
18866 builtin and then its argument prototype would still apply. */
18867#ifdef __cplusplus
18868extern "C"
18869#endif
18870char lchflags ();
18871/* The GNU C library defines this for functions which it implements
18872 to always fail with ENOSYS. Some functions are actually named
18873 something starting with __ and the normal name is an alias. */
18874#if defined __stub_lchflags || defined __stub___lchflags
18875choke me
18876#endif
18877
18878int
18879main ()
18880{
18881return lchflags ();
18882 ;
18883 return 0;
18884}
18885_ACEOF
18886rm -f conftest.$ac_objext conftest$ac_exeext
18887if { (ac_try="$ac_link"
18888case "(($ac_try" in
18889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18890 *) ac_try_echo=$ac_try;;
18891esac
18892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18893 (eval "$ac_link") 2>conftest.er1
18894 ac_status=$?
18895 grep -v '^ *+' conftest.er1 >conftest.err
18896 rm -f conftest.er1
18897 cat conftest.err >&5
18898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18899 (exit $ac_status); } && {
18900 test -z "$ac_c_werror_flag" ||
18901 test ! -s conftest.err
18902 } && test -s conftest$ac_exeext &&
18903 $as_test_x conftest$ac_exeext; then
18904 ac_cv_func_lchflags=yes
18905else
18906 echo "$as_me: failed program was:" >&5
18907sed 's/^/| /' conftest.$ac_ext >&5
18908
18909 ac_cv_func_lchflags=no
18910fi
18911
18912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18913 conftest$ac_exeext conftest.$ac_ext
18914fi
18915{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18916echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18917if test $ac_cv_func_lchflags = yes; then
18918 ac_cv_have_lchflags="yes"
18919else
18920 ac_cv_have_lchflags="no"
18921fi
18922
18923fi
18924if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018925
18926cat >>confdefs.h <<\_ACEOF
18927#define HAVE_LCHFLAGS 1
18928_ACEOF
18929
18930fi
18931
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018932case $ac_sys_system/$ac_sys_release in
18933Darwin/*)
18934 _CUR_CFLAGS="${CFLAGS}"
18935 _CUR_LDFLAGS="${LDFLAGS}"
18936 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18937 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18938 ;;
18939esac
18940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018941{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18942echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018943if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018944 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018945else
18946 ac_check_lib_save_LIBS=$LIBS
18947LIBS="-lz $LIBS"
18948cat >conftest.$ac_ext <<_ACEOF
18949/* confdefs.h. */
18950_ACEOF
18951cat confdefs.h >>conftest.$ac_ext
18952cat >>conftest.$ac_ext <<_ACEOF
18953/* end confdefs.h. */
18954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018955/* Override any GCC internal prototype to avoid an error.
18956 Use char because int might match the return type of a GCC
18957 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018958#ifdef __cplusplus
18959extern "C"
18960#endif
18961char inflateCopy ();
18962int
18963main ()
18964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018966 ;
18967 return 0;
18968}
18969_ACEOF
18970rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971if { (ac_try="$ac_link"
18972case "(($ac_try" in
18973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18974 *) ac_try_echo=$ac_try;;
18975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018977 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018978 ac_status=$?
18979 grep -v '^ *+' conftest.er1 >conftest.err
18980 rm -f conftest.er1
18981 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983 (exit $ac_status); } && {
18984 test -z "$ac_c_werror_flag" ||
18985 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018986 } && test -s conftest$ac_exeext &&
18987 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018988 ac_cv_lib_z_inflateCopy=yes
18989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018990 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018991sed 's/^/| /' conftest.$ac_ext >&5
18992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018995
18996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018997 conftest$ac_exeext conftest.$ac_ext
18998LIBS=$ac_check_lib_save_LIBS
18999fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019000{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19001echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19002if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019003
19004cat >>confdefs.h <<\_ACEOF
19005#define HAVE_ZLIB_COPY 1
19006_ACEOF
19007
19008fi
19009
19010
19011case $ac_sys_system/$ac_sys_release in
19012Darwin/*)
19013 CFLAGS="${_CUR_CFLAGS}"
19014 LDFLAGS="${_CUR_LDFLAGS}"
19015 ;;
19016esac
19017
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019018{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19019echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019021/* confdefs.h. */
19022_ACEOF
19023cat confdefs.h >>conftest.$ac_ext
19024cat >>conftest.$ac_ext <<_ACEOF
19025/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019026
19027#include "confdefs.h"
19028#include <netdb.h>
19029
Martin v. Löwise9416172003-05-03 10:12:45 +000019030int
19031main ()
19032{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019033void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019034 ;
19035 return 0;
19036}
19037_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019038rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019039if { (ac_try="$ac_link"
19040case "(($ac_try" in
19041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19042 *) ac_try_echo=$ac_try;;
19043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019047 grep -v '^ *+' conftest.er1 >conftest.err
19048 rm -f conftest.er1
19049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019051 (exit $ac_status); } && {
19052 test -z "$ac_c_werror_flag" ||
19053 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019054 } && test -s conftest$ac_exeext &&
19055 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019056
19057cat >>confdefs.h <<\_ACEOF
19058#define HAVE_HSTRERROR 1
19059_ACEOF
19060
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019061 { echo "$as_me:$LINENO: result: yes" >&5
19062echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019065sed 's/^/| /' conftest.$ac_ext >&5
19066
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019067 { echo "$as_me:$LINENO: result: no" >&5
19068echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019069
19070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019071
19072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019075{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19076echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019078/* confdefs.h. */
19079_ACEOF
19080cat confdefs.h >>conftest.$ac_ext
19081cat >>conftest.$ac_ext <<_ACEOF
19082/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019083
19084#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019085#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019086#include <sys/socket.h>
19087#include <netinet/in.h>
19088#include <arpa/inet.h>
19089
Martin v. Löwise9416172003-05-03 10:12:45 +000019090int
19091main ()
19092{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019093void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019094 ;
19095 return 0;
19096}
19097_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019098rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099if { (ac_try="$ac_link"
19100case "(($ac_try" in
19101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19102 *) ac_try_echo=$ac_try;;
19103esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019111 (exit $ac_status); } && {
19112 test -z "$ac_c_werror_flag" ||
19113 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019114 } && test -s conftest$ac_exeext &&
19115 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019116
19117cat >>confdefs.h <<\_ACEOF
19118#define HAVE_INET_ATON 1
19119_ACEOF
19120
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019121 { echo "$as_me:$LINENO: result: yes" >&5
19122echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019125sed 's/^/| /' conftest.$ac_ext >&5
19126
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019127 { echo "$as_me:$LINENO: result: no" >&5
19128echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019129
19130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019131
19132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019135{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19136echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019138/* confdefs.h. */
19139_ACEOF
19140cat confdefs.h >>conftest.$ac_ext
19141cat >>conftest.$ac_ext <<_ACEOF
19142/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019143
19144#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019145#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019146#include <sys/socket.h>
19147#include <netinet/in.h>
19148#include <arpa/inet.h>
19149
Martin v. Löwise9416172003-05-03 10:12:45 +000019150int
19151main ()
19152{
19153void* p = inet_pton
19154 ;
19155 return 0;
19156}
19157_ACEOF
19158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159if { (ac_try="$ac_compile"
19160case "(($ac_try" in
19161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19162 *) ac_try_echo=$ac_try;;
19163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019171 (exit $ac_status); } && {
19172 test -z "$ac_c_werror_flag" ||
19173 test ! -s conftest.err
19174 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019175
19176cat >>confdefs.h <<\_ACEOF
19177#define HAVE_INET_PTON 1
19178_ACEOF
19179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019180 { echo "$as_me:$LINENO: result: yes" >&5
19181echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019182else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019184sed 's/^/| /' conftest.$ac_ext >&5
19185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019186 { echo "$as_me:$LINENO: result: no" >&5
19187echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019188
19189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190
19191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019192
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019193# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019194{ echo "$as_me:$LINENO: checking for setgroups" >&5
19195echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019197/* confdefs.h. */
19198_ACEOF
19199cat confdefs.h >>conftest.$ac_ext
19200cat >>conftest.$ac_ext <<_ACEOF
19201/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019202
19203#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019204#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019205#ifdef HAVE_GRP_H
19206#include <grp.h>
19207#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019208
Martin v. Löwisd5843682002-11-21 20:41:28 +000019209int
19210main ()
19211{
19212void* p = setgroups
19213 ;
19214 return 0;
19215}
19216_ACEOF
19217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019218if { (ac_try="$ac_compile"
19219case "(($ac_try" in
19220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19221 *) ac_try_echo=$ac_try;;
19222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019226 grep -v '^ *+' conftest.er1 >conftest.err
19227 rm -f conftest.er1
19228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019230 (exit $ac_status); } && {
19231 test -z "$ac_c_werror_flag" ||
19232 test ! -s conftest.err
19233 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019234
19235cat >>confdefs.h <<\_ACEOF
19236#define HAVE_SETGROUPS 1
19237_ACEOF
19238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019239 { echo "$as_me:$LINENO: result: yes" >&5
19240echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019243sed 's/^/| /' conftest.$ac_ext >&5
19244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019245 { echo "$as_me:$LINENO: result: no" >&5
19246echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019247
19248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019249
19250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019251
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019252# check for openpty and forkpty
19253
Martin v. Löwis11437992002-04-12 09:54:03 +000019254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019255for ac_func in openpty
19256do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019257as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19258{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19259echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019260if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019262else
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019264/* confdefs.h. */
19265_ACEOF
19266cat confdefs.h >>conftest.$ac_ext
19267cat >>conftest.$ac_ext <<_ACEOF
19268/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019269/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19270 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19271#define $ac_func innocuous_$ac_func
19272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019273/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019274 which can conflict with char $ac_func (); below.
19275 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019276 <limits.h> exists even on freestanding compilers. */
19277
19278#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019279# include <limits.h>
19280#else
19281# include <assert.h>
19282#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019283
19284#undef $ac_func
19285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019286/* Override any GCC internal prototype to avoid an error.
19287 Use char because int might match the return type of a GCC
19288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019289#ifdef __cplusplus
19290extern "C"
19291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019292char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019293/* The GNU C library defines this for functions which it implements
19294 to always fail with ENOSYS. Some functions are actually named
19295 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019296#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019297choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019298#endif
19299
Skip Montanaro6dead952003-09-25 14:50:04 +000019300int
19301main ()
19302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019303return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 ;
19305 return 0;
19306}
19307_ACEOF
19308rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019309if { (ac_try="$ac_link"
19310case "(($ac_try" in
19311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19312 *) ac_try_echo=$ac_try;;
19313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019317 grep -v '^ *+' conftest.er1 >conftest.err
19318 rm -f conftest.er1
19319 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019321 (exit $ac_status); } && {
19322 test -z "$ac_c_werror_flag" ||
19323 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019324 } && test -s conftest$ac_exeext &&
19325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019329sed 's/^/| /' conftest.$ac_ext >&5
19330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019333
19334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019335 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019336fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019337ac_res=`eval echo '${'$as_ac_var'}'`
19338 { echo "$as_me:$LINENO: result: $ac_res" >&5
19339echo "${ECHO_T}$ac_res" >&6; }
19340if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019342#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019343_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019346 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19347echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019348if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019349 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019350else
Martin v. Löwis11437992002-04-12 09:54:03 +000019351 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019352LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019354/* confdefs.h. */
19355_ACEOF
19356cat confdefs.h >>conftest.$ac_ext
19357cat >>conftest.$ac_ext <<_ACEOF
19358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019360/* Override any GCC internal prototype to avoid an error.
19361 Use char because int might match the return type of a GCC
19362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019363#ifdef __cplusplus
19364extern "C"
19365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019366char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019367int
19368main ()
19369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019370return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 ;
19372 return 0;
19373}
19374_ACEOF
19375rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019376if { (ac_try="$ac_link"
19377case "(($ac_try" in
19378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19379 *) ac_try_echo=$ac_try;;
19380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019382 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019384 grep -v '^ *+' conftest.er1 >conftest.err
19385 rm -f conftest.er1
19386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019388 (exit $ac_status); } && {
19389 test -z "$ac_c_werror_flag" ||
19390 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019391 } && test -s conftest$ac_exeext &&
19392 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019393 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019396sed 's/^/| /' conftest.$ac_ext >&5
19397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019400
19401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019403LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019404fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019405{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19406echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19407if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019409#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019410_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019411 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019413 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19414echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019415if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019416 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019417else
19418 ac_check_lib_save_LIBS=$LIBS
19419LIBS="-lbsd $LIBS"
19420cat >conftest.$ac_ext <<_ACEOF
19421/* confdefs.h. */
19422_ACEOF
19423cat confdefs.h >>conftest.$ac_ext
19424cat >>conftest.$ac_ext <<_ACEOF
19425/* end confdefs.h. */
19426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427/* Override any GCC internal prototype to avoid an error.
19428 Use char because int might match the return type of a GCC
19429 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019430#ifdef __cplusplus
19431extern "C"
19432#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019433char openpty ();
19434int
19435main ()
19436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019437return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +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öwisfd9a72a2006-01-08 10:07:33 +000019450 ac_status=$?
19451 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öwisfd9a72a2006-01-08 10:07:33 +000019460 ac_cv_lib_bsd_openpty=yes
19461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019462 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019463sed 's/^/| /' conftest.$ac_ext >&5
19464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019465 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019467
19468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019469 conftest$ac_exeext conftest.$ac_ext
19470LIBS=$ac_check_lib_save_LIBS
19471fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019472{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19473echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19474if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019475 cat >>confdefs.h <<\_ACEOF
19476#define HAVE_OPENPTY 1
19477_ACEOF
19478 LIBS="$LIBS -lbsd"
19479fi
19480
19481
19482fi
19483
Fred Drake8cef4cf2000-06-28 16:40:38 +000019484
19485fi
19486done
19487
Martin v. Löwis11437992002-04-12 09:54:03 +000019488
Fred Drake8cef4cf2000-06-28 16:40:38 +000019489for ac_func in forkpty
19490do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19492{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19493echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019494if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019495 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019496else
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019498/* confdefs.h. */
19499_ACEOF
19500cat confdefs.h >>conftest.$ac_ext
19501cat >>conftest.$ac_ext <<_ACEOF
19502/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019503/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19504 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19505#define $ac_func innocuous_$ac_func
19506
Fred Drake8cef4cf2000-06-28 16:40:38 +000019507/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019508 which can conflict with char $ac_func (); below.
19509 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019510 <limits.h> exists even on freestanding compilers. */
19511
19512#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019513# include <limits.h>
19514#else
19515# include <assert.h>
19516#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019517
19518#undef $ac_func
19519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019520/* Override any GCC internal prototype to avoid an error.
19521 Use char because int might match the return type of a GCC
19522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019523#ifdef __cplusplus
19524extern "C"
19525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019526char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019527/* The GNU C library defines this for functions which it implements
19528 to always fail with ENOSYS. Some functions are actually named
19529 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019531choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019532#endif
19533
Skip Montanaro6dead952003-09-25 14:50:04 +000019534int
19535main ()
19536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019537return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 ;
19539 return 0;
19540}
19541_ACEOF
19542rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543if { (ac_try="$ac_link"
19544case "(($ac_try" in
19545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19546 *) ac_try_echo=$ac_try;;
19547esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019549 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019551 grep -v '^ *+' conftest.er1 >conftest.err
19552 rm -f conftest.er1
19553 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019555 (exit $ac_status); } && {
19556 test -z "$ac_c_werror_flag" ||
19557 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019558 } && test -s conftest$ac_exeext &&
19559 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019560 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019563sed 's/^/| /' conftest.$ac_ext >&5
19564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019565 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019567
19568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019569 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019570fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019571ac_res=`eval echo '${'$as_ac_var'}'`
19572 { echo "$as_me:$LINENO: result: $ac_res" >&5
19573echo "${ECHO_T}$ac_res" >&6; }
19574if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019575 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019576#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019577_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019578
Fred Drake8cef4cf2000-06-28 16:40:38 +000019579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019580 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19581echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019582if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019583 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019584else
Martin v. Löwis11437992002-04-12 09:54:03 +000019585 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019586LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019588/* confdefs.h. */
19589_ACEOF
19590cat confdefs.h >>conftest.$ac_ext
19591cat >>conftest.$ac_ext <<_ACEOF
19592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019594/* Override any GCC internal prototype to avoid an error.
19595 Use char because int might match the return type of a GCC
19596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019597#ifdef __cplusplus
19598extern "C"
19599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019600char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019601int
19602main ()
19603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019604return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019605 ;
19606 return 0;
19607}
19608_ACEOF
19609rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019610if { (ac_try="$ac_link"
19611case "(($ac_try" in
19612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19613 *) ac_try_echo=$ac_try;;
19614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019616 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019618 grep -v '^ *+' conftest.er1 >conftest.err
19619 rm -f conftest.er1
19620 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019622 (exit $ac_status); } && {
19623 test -z "$ac_c_werror_flag" ||
19624 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019625 } && test -s conftest$ac_exeext &&
19626 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019630sed 's/^/| /' conftest.$ac_ext >&5
19631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019632 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019634
19635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019637LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019639{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19640echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19641if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019643#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019644_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019645 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019647 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19648echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019649if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019651else
19652 ac_check_lib_save_LIBS=$LIBS
19653LIBS="-lbsd $LIBS"
19654cat >conftest.$ac_ext <<_ACEOF
19655/* confdefs.h. */
19656_ACEOF
19657cat confdefs.h >>conftest.$ac_ext
19658cat >>conftest.$ac_ext <<_ACEOF
19659/* end confdefs.h. */
19660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661/* Override any GCC internal prototype to avoid an error.
19662 Use char because int might match the return type of a GCC
19663 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019664#ifdef __cplusplus
19665extern "C"
19666#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019667char forkpty ();
19668int
19669main ()
19670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019671return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019672 ;
19673 return 0;
19674}
19675_ACEOF
19676rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677if { (ac_try="$ac_link"
19678case "(($ac_try" in
19679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19680 *) ac_try_echo=$ac_try;;
19681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019683 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019684 ac_status=$?
19685 grep -v '^ *+' conftest.er1 >conftest.err
19686 rm -f conftest.er1
19687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019689 (exit $ac_status); } && {
19690 test -z "$ac_c_werror_flag" ||
19691 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019692 } && test -s conftest$ac_exeext &&
19693 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019694 ac_cv_lib_bsd_forkpty=yes
19695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019696 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019697sed 's/^/| /' conftest.$ac_ext >&5
19698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019699 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701
19702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019703 conftest$ac_exeext conftest.$ac_ext
19704LIBS=$ac_check_lib_save_LIBS
19705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019706{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19707echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19708if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019709 cat >>confdefs.h <<\_ACEOF
19710#define HAVE_FORKPTY 1
19711_ACEOF
19712 LIBS="$LIBS -lbsd"
19713fi
19714
19715
19716fi
19717
Fred Drake8cef4cf2000-06-28 16:40:38 +000019718
19719fi
19720done
19721
Jack Jansendd19cf82001-12-06 22:36:17 +000019722
Christian Heimesb186d002008-03-18 15:15:01 +000019723# Stuff for expat.
19724
19725for ac_func in memmove
19726do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019731 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019732else
19733 cat >conftest.$ac_ext <<_ACEOF
19734/* confdefs.h. */
19735_ACEOF
19736cat confdefs.h >>conftest.$ac_ext
19737cat >>conftest.$ac_ext <<_ACEOF
19738/* end confdefs.h. */
19739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19741#define $ac_func innocuous_$ac_func
19742
19743/* System header to define __stub macros and hopefully few prototypes,
19744 which can conflict with char $ac_func (); below.
19745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19746 <limits.h> exists even on freestanding compilers. */
19747
19748#ifdef __STDC__
19749# include <limits.h>
19750#else
19751# include <assert.h>
19752#endif
19753
19754#undef $ac_func
19755
19756/* Override any GCC internal prototype to avoid an error.
19757 Use char because int might match the return type of a GCC
19758 builtin and then its argument prototype would still apply. */
19759#ifdef __cplusplus
19760extern "C"
19761#endif
19762char $ac_func ();
19763/* The GNU C library defines this for functions which it implements
19764 to always fail with ENOSYS. Some functions are actually named
19765 something starting with __ and the normal name is an alias. */
19766#if defined __stub_$ac_func || defined __stub___$ac_func
19767choke me
19768#endif
19769
19770int
19771main ()
19772{
19773return $ac_func ();
19774 ;
19775 return 0;
19776}
19777_ACEOF
19778rm -f conftest.$ac_objext conftest$ac_exeext
19779if { (ac_try="$ac_link"
19780case "(($ac_try" in
19781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19782 *) ac_try_echo=$ac_try;;
19783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019785 (eval "$ac_link") 2>conftest.er1
19786 ac_status=$?
19787 grep -v '^ *+' conftest.er1 >conftest.err
19788 rm -f conftest.er1
19789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019791 (exit $ac_status); } && {
19792 test -z "$ac_c_werror_flag" ||
19793 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019794 } && test -s conftest$ac_exeext &&
19795 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019796 eval "$as_ac_var=yes"
19797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019798 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019799sed 's/^/| /' conftest.$ac_ext >&5
19800
19801 eval "$as_ac_var=no"
19802fi
19803
19804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19805 conftest$ac_exeext conftest.$ac_ext
19806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019807ac_res=`eval echo '${'$as_ac_var'}'`
19808 { echo "$as_me:$LINENO: result: $ac_res" >&5
19809echo "${ECHO_T}$ac_res" >&6; }
19810if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019811 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019813_ACEOF
19814
19815fi
19816done
19817
19818
Michael W. Hudson54241132001-12-07 15:38:26 +000019819# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019820
19821
19822
19823
19824
19825
Fred Drake8cef4cf2000-06-28 16:40:38 +000019826for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19827do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019831if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019833else
Martin v. Löwis11437992002-04-12 09:54:03 +000019834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019835/* confdefs.h. */
19836_ACEOF
19837cat confdefs.h >>conftest.$ac_ext
19838cat >>conftest.$ac_ext <<_ACEOF
19839/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019840/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19841 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19842#define $ac_func innocuous_$ac_func
19843
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019844/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019845 which can conflict with char $ac_func (); below.
19846 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019847 <limits.h> exists even on freestanding compilers. */
19848
19849#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019850# include <limits.h>
19851#else
19852# include <assert.h>
19853#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019854
19855#undef $ac_func
19856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019857/* Override any GCC internal prototype to avoid an error.
19858 Use char because int might match the return type of a GCC
19859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019860#ifdef __cplusplus
19861extern "C"
19862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019863char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019864/* The GNU C library defines this for functions which it implements
19865 to always fail with ENOSYS. Some functions are actually named
19866 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019867#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019868choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019869#endif
19870
Skip Montanaro6dead952003-09-25 14:50:04 +000019871int
19872main ()
19873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ;
19876 return 0;
19877}
19878_ACEOF
19879rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880if { (ac_try="$ac_link"
19881case "(($ac_try" in
19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883 *) ac_try_echo=$ac_try;;
19884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 grep -v '^ *+' conftest.er1 >conftest.err
19889 rm -f conftest.er1
19890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892 (exit $ac_status); } && {
19893 test -z "$ac_c_werror_flag" ||
19894 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019895 } && test -s conftest$ac_exeext &&
19896 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019900sed 's/^/| /' conftest.$ac_ext >&5
19901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904
19905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019906 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019907fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019908ac_res=`eval echo '${'$as_ac_var'}'`
19909 { echo "$as_me:$LINENO: result: $ac_res" >&5
19910echo "${ECHO_T}$ac_res" >&6; }
19911if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019912 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019914_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019916fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019917done
19918
Michael W. Hudson54241132001-12-07 15:38:26 +000019919
Martin v. Löwis11437992002-04-12 09:54:03 +000019920
19921
19922
Christian Heimesb186d002008-03-18 15:15:01 +000019923for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019924do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019925as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19926{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19927echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019928if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019930else
Martin v. Löwis11437992002-04-12 09:54:03 +000019931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019932/* confdefs.h. */
19933_ACEOF
19934cat confdefs.h >>conftest.$ac_ext
19935cat >>conftest.$ac_ext <<_ACEOF
19936/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019937/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19939#define $ac_func innocuous_$ac_func
19940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019941/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019942 which can conflict with char $ac_func (); below.
19943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019944 <limits.h> exists even on freestanding compilers. */
19945
19946#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019947# include <limits.h>
19948#else
19949# include <assert.h>
19950#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019951
19952#undef $ac_func
19953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954/* Override any GCC internal prototype to avoid an error.
19955 Use char because int might match the return type of a GCC
19956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019957#ifdef __cplusplus
19958extern "C"
19959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019960char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019961/* The GNU C library defines this for functions which it implements
19962 to always fail with ENOSYS. Some functions are actually named
19963 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019964#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019965choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019966#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019967
Skip Montanaro6dead952003-09-25 14:50:04 +000019968int
19969main ()
19970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019972 ;
19973 return 0;
19974}
19975_ACEOF
19976rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977if { (ac_try="$ac_link"
19978case "(($ac_try" in
19979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19980 *) ac_try_echo=$ac_try;;
19981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019985 grep -v '^ *+' conftest.er1 >conftest.err
19986 rm -f conftest.er1
19987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019989 (exit $ac_status); } && {
19990 test -z "$ac_c_werror_flag" ||
19991 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019992 } && test -s conftest$ac_exeext &&
19993 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019997sed 's/^/| /' conftest.$ac_ext >&5
19998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019999 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020001
20002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020004fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020005ac_res=`eval echo '${'$as_ac_var'}'`
20006 { echo "$as_me:$LINENO: result: $ac_res" >&5
20007echo "${ECHO_T}$ac_res" >&6; }
20008if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020010#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020011_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020012
Martin v. Löwis1142de32002-03-29 16:28:31 +000020013else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020014 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020015 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020016 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20017 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020018esac
20019
Martin v. Löwis1142de32002-03-29 16:28:31 +000020020fi
20021done
20022
20023
Martin v. Löwis11437992002-04-12 09:54:03 +000020024
Martin v. Löwis1142de32002-03-29 16:28:31 +000020025for ac_func in getpgrp
20026do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20028{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020030if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020032else
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020034/* confdefs.h. */
20035_ACEOF
20036cat confdefs.h >>conftest.$ac_ext
20037cat >>conftest.$ac_ext <<_ACEOF
20038/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20041#define $ac_func innocuous_$ac_func
20042
Martin v. Löwis1142de32002-03-29 16:28:31 +000020043/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020044 which can conflict with char $ac_func (); below.
20045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020046 <limits.h> exists even on freestanding compilers. */
20047
20048#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020049# include <limits.h>
20050#else
20051# include <assert.h>
20052#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020053
20054#undef $ac_func
20055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020056/* Override any GCC internal prototype to avoid an error.
20057 Use char because int might match the return type of a GCC
20058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020059#ifdef __cplusplus
20060extern "C"
20061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020062char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020063/* The GNU C library defines this for functions which it implements
20064 to always fail with ENOSYS. Some functions are actually named
20065 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020066#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020067choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020068#endif
20069
Skip Montanaro6dead952003-09-25 14:50:04 +000020070int
20071main ()
20072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ;
20075 return 0;
20076}
20077_ACEOF
20078rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020079if { (ac_try="$ac_link"
20080case "(($ac_try" in
20081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20082 *) ac_try_echo=$ac_try;;
20083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020085 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020087 grep -v '^ *+' conftest.er1 >conftest.err
20088 rm -f conftest.er1
20089 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020091 (exit $ac_status); } && {
20092 test -z "$ac_c_werror_flag" ||
20093 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020094 } && test -s conftest$ac_exeext &&
20095 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020096 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020099sed 's/^/| /' conftest.$ac_ext >&5
20100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020101 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020103
20104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020106fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020107ac_res=`eval echo '${'$as_ac_var'}'`
20108 { echo "$as_me:$LINENO: result: $ac_res" >&5
20109echo "${ECHO_T}$ac_res" >&6; }
20110if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020113_ACEOF
20114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020115/* confdefs.h. */
20116_ACEOF
20117cat confdefs.h >>conftest.$ac_ext
20118cat >>conftest.$ac_ext <<_ACEOF
20119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020120#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020121int
20122main ()
20123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020124getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ;
20126 return 0;
20127}
20128_ACEOF
20129rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130if { (ac_try="$ac_compile"
20131case "(($ac_try" in
20132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20133 *) ac_try_echo=$ac_try;;
20134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020138 grep -v '^ *+' conftest.er1 >conftest.err
20139 rm -f conftest.er1
20140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142 (exit $ac_status); } && {
20143 test -z "$ac_c_werror_flag" ||
20144 test ! -s conftest.err
20145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020146
20147cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020148#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020149_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020150
Martin v. Löwis11437992002-04-12 09:54:03 +000020151
Guido van Rossumf78abae1997-01-21 22:02:36 +000020152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020154sed 's/^/| /' conftest.$ac_ext >&5
20155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156
Guido van Rossum627b2d71993-12-24 10:39:16 +000020157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158
20159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020160
Guido van Rossum627b2d71993-12-24 10:39:16 +000020161fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020162done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020163
Jack Jansen150753c2003-03-29 22:07:47 +000020164
20165for ac_func in setpgrp
20166do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020167as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20168{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20169echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020170if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020172else
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020174/* confdefs.h. */
20175_ACEOF
20176cat confdefs.h >>conftest.$ac_ext
20177cat >>conftest.$ac_ext <<_ACEOF
20178/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020179/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20181#define $ac_func innocuous_$ac_func
20182
Jack Jansen150753c2003-03-29 22:07:47 +000020183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020184 which can conflict with char $ac_func (); below.
20185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020186 <limits.h> exists even on freestanding compilers. */
20187
20188#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020189# include <limits.h>
20190#else
20191# include <assert.h>
20192#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020193
20194#undef $ac_func
20195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020196/* Override any GCC internal prototype to avoid an error.
20197 Use char because int might match the return type of a GCC
20198 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020199#ifdef __cplusplus
20200extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020201#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020202char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020203/* The GNU C library defines this for functions which it implements
20204 to always fail with ENOSYS. Some functions are actually named
20205 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020207choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020208#endif
20209
Skip Montanaro6dead952003-09-25 14:50:04 +000020210int
20211main ()
20212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020213return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 ;
20215 return 0;
20216}
20217_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020218rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020219if { (ac_try="$ac_link"
20220case "(($ac_try" in
20221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20222 *) ac_try_echo=$ac_try;;
20223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 grep -v '^ *+' conftest.er1 >conftest.err
20228 rm -f conftest.er1
20229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020231 (exit $ac_status); } && {
20232 test -z "$ac_c_werror_flag" ||
20233 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020234 } && test -s conftest$ac_exeext &&
20235 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020236 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020239sed 's/^/| /' conftest.$ac_ext >&5
20240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020241 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243
20244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020246fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020247ac_res=`eval echo '${'$as_ac_var'}'`
20248 { echo "$as_me:$LINENO: result: $ac_res" >&5
20249echo "${ECHO_T}$ac_res" >&6; }
20250if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020251 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020253_ACEOF
20254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020255/* confdefs.h. */
20256_ACEOF
20257cat confdefs.h >>conftest.$ac_ext
20258cat >>conftest.$ac_ext <<_ACEOF
20259/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020260#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020261int
20262main ()
20263{
20264setpgrp(0,0);
20265 ;
20266 return 0;
20267}
20268_ACEOF
20269rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270if { (ac_try="$ac_compile"
20271case "(($ac_try" in
20272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20273 *) ac_try_echo=$ac_try;;
20274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 grep -v '^ *+' conftest.er1 >conftest.err
20279 rm -f conftest.er1
20280 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020282 (exit $ac_status); } && {
20283 test -z "$ac_c_werror_flag" ||
20284 test ! -s conftest.err
20285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020286
20287cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020288#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020289_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020290
Jack Jansen150753c2003-03-29 22:07:47 +000020291
20292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020294sed 's/^/| /' conftest.$ac_ext >&5
20295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298
20299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020300
20301fi
20302done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020303
Martin v. Löwis11437992002-04-12 09:54:03 +000020304
Thomas Wouters3a584202000-08-05 23:28:51 +000020305for ac_func in gettimeofday
20306do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20308{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020310if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020312else
Martin v. Löwis11437992002-04-12 09:54:03 +000020313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020314/* confdefs.h. */
20315_ACEOF
20316cat confdefs.h >>conftest.$ac_ext
20317cat >>conftest.$ac_ext <<_ACEOF
20318/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020319/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20320 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20321#define $ac_func innocuous_$ac_func
20322
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020323/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020324 which can conflict with char $ac_func (); below.
20325 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020326 <limits.h> exists even on freestanding compilers. */
20327
20328#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020329# include <limits.h>
20330#else
20331# include <assert.h>
20332#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020333
20334#undef $ac_func
20335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020336/* Override any GCC internal prototype to avoid an error.
20337 Use char because int might match the return type of a GCC
20338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020339#ifdef __cplusplus
20340extern "C"
20341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020342char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020343/* The GNU C library defines this for functions which it implements
20344 to always fail with ENOSYS. Some functions are actually named
20345 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020346#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020347choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020348#endif
20349
Skip Montanaro6dead952003-09-25 14:50:04 +000020350int
20351main ()
20352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020353return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 ;
20355 return 0;
20356}
20357_ACEOF
20358rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020359if { (ac_try="$ac_link"
20360case "(($ac_try" in
20361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20362 *) ac_try_echo=$ac_try;;
20363esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020365 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020367 grep -v '^ *+' conftest.er1 >conftest.err
20368 rm -f conftest.er1
20369 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371 (exit $ac_status); } && {
20372 test -z "$ac_c_werror_flag" ||
20373 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020374 } && test -s conftest$ac_exeext &&
20375 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020376 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020379sed 's/^/| /' conftest.$ac_ext >&5
20380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020381 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020383
20384rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020385 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020386fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020387ac_res=`eval echo '${'$as_ac_var'}'`
20388 { echo "$as_me:$LINENO: result: $ac_res" >&5
20389echo "${ECHO_T}$ac_res" >&6; }
20390if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020392#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020393_ACEOF
20394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020395/* confdefs.h. */
20396_ACEOF
20397cat confdefs.h >>conftest.$ac_ext
20398cat >>conftest.$ac_ext <<_ACEOF
20399/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020400#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020401int
20402main ()
20403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020404gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410if { (ac_try="$ac_compile"
20411case "(($ac_try" in
20412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20413 *) ac_try_echo=$ac_try;;
20414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020418 grep -v '^ *+' conftest.er1 >conftest.err
20419 rm -f conftest.er1
20420 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422 (exit $ac_status); } && {
20423 test -z "$ac_c_werror_flag" ||
20424 test ! -s conftest.err
20425 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020426 :
20427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020429sed 's/^/| /' conftest.$ac_ext >&5
20430
Martin v. Löwis11437992002-04-12 09:54:03 +000020431
20432cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020433#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020434_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020435
Martin v. Löwis11437992002-04-12 09:54:03 +000020436
Guido van Rossum627b2d71993-12-24 10:39:16 +000020437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020438
20439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020441fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020442done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443
Michael W. Hudson54241132001-12-07 15:38:26 +000020444
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020445{ echo "$as_me:$LINENO: checking for major" >&5
20446echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020448/* confdefs.h. */
20449_ACEOF
20450cat confdefs.h >>conftest.$ac_ext
20451cat >>conftest.$ac_ext <<_ACEOF
20452/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020453
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020454#if defined(MAJOR_IN_MKDEV)
20455#include <sys/mkdev.h>
20456#elif defined(MAJOR_IN_SYSMACROS)
20457#include <sys/sysmacros.h>
20458#else
20459#include <sys/types.h>
20460#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020461
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020462int
20463main ()
20464{
20465
20466 makedev(major(0),minor(0));
20467
20468 ;
20469 return 0;
20470}
20471_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020472rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473if { (ac_try="$ac_link"
20474case "(($ac_try" in
20475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20476 *) ac_try_echo=$ac_try;;
20477esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020481 grep -v '^ *+' conftest.er1 >conftest.err
20482 rm -f conftest.er1
20483 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485 (exit $ac_status); } && {
20486 test -z "$ac_c_werror_flag" ||
20487 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020488 } && test -s conftest$ac_exeext &&
20489 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020490
20491
20492cat >>confdefs.h <<\_ACEOF
20493#define HAVE_DEVICE_MACROS 1
20494_ACEOF
20495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020496 { echo "$as_me:$LINENO: result: yes" >&5
20497echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020498
20499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020501sed 's/^/| /' conftest.$ac_ext >&5
20502
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020504 { echo "$as_me:$LINENO: result: no" >&5
20505echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020506
20507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020508
20509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020510 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020511
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020512# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020513# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020514{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20515echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020517/* confdefs.h. */
20518_ACEOF
20519cat confdefs.h >>conftest.$ac_ext
20520cat >>conftest.$ac_ext <<_ACEOF
20521/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020522
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020523#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020524#include <sys/socket.h>
20525#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020526#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020527
Martin v. Löwis11437992002-04-12 09:54:03 +000020528int
20529main ()
20530{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020531getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020532 ;
20533 return 0;
20534}
20535_ACEOF
20536rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020537if { (ac_try="$ac_link"
20538case "(($ac_try" in
20539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20540 *) ac_try_echo=$ac_try;;
20541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020545 grep -v '^ *+' conftest.er1 >conftest.err
20546 rm -f conftest.er1
20547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020549 (exit $ac_status); } && {
20550 test -z "$ac_c_werror_flag" ||
20551 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020552 } && test -s conftest$ac_exeext &&
20553 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020554 have_getaddrinfo=yes
20555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020556 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020557sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020559 have_getaddrinfo=no
20560fi
20561
20562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20563 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020564{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20565echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020566if test $have_getaddrinfo = yes
20567then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020568 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20569echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020570 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020571 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020572else
20573 if test "$cross_compiling" = yes; then
20574 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020575else
Martin v. Löwis11437992002-04-12 09:54:03 +000020576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020577/* confdefs.h. */
20578_ACEOF
20579cat confdefs.h >>conftest.$ac_ext
20580cat >>conftest.$ac_ext <<_ACEOF
20581/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020582
20583#include <sys/types.h>
20584#include <netdb.h>
20585#include <string.h>
20586#include <sys/socket.h>
20587#include <netinet/in.h>
20588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020589int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020590{
20591 int passive, gaierr, inet4 = 0, inet6 = 0;
20592 struct addrinfo hints, *ai, *aitop;
20593 char straddr[INET6_ADDRSTRLEN], strport[16];
20594
20595 for (passive = 0; passive <= 1; passive++) {
20596 memset(&hints, 0, sizeof(hints));
20597 hints.ai_family = AF_UNSPEC;
20598 hints.ai_flags = passive ? AI_PASSIVE : 0;
20599 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020600 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020601 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20602 (void)gai_strerror(gaierr);
20603 goto bad;
20604 }
20605 for (ai = aitop; ai; ai = ai->ai_next) {
20606 if (ai->ai_addr == NULL ||
20607 ai->ai_addrlen == 0 ||
20608 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20609 straddr, sizeof(straddr), strport, sizeof(strport),
20610 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20611 goto bad;
20612 }
20613 switch (ai->ai_family) {
20614 case AF_INET:
20615 if (strcmp(strport, "54321") != 0) {
20616 goto bad;
20617 }
20618 if (passive) {
20619 if (strcmp(straddr, "0.0.0.0") != 0) {
20620 goto bad;
20621 }
20622 } else {
20623 if (strcmp(straddr, "127.0.0.1") != 0) {
20624 goto bad;
20625 }
20626 }
20627 inet4++;
20628 break;
20629 case AF_INET6:
20630 if (strcmp(strport, "54321") != 0) {
20631 goto bad;
20632 }
20633 if (passive) {
20634 if (strcmp(straddr, "::") != 0) {
20635 goto bad;
20636 }
20637 } else {
20638 if (strcmp(straddr, "::1") != 0) {
20639 goto bad;
20640 }
20641 }
20642 inet6++;
20643 break;
20644 case AF_UNSPEC:
20645 goto bad;
20646 break;
20647 default:
20648 /* another family support? */
20649 break;
20650 }
20651 }
20652 }
20653
20654 if (!(inet4 == 0 || inet4 == 2))
20655 goto bad;
20656 if (!(inet6 == 0 || inet6 == 2))
20657 goto bad;
20658
20659 if (aitop)
20660 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020661 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020662
20663 bad:
20664 if (aitop)
20665 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020666 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020667}
20668
Martin v. Löwis11437992002-04-12 09:54:03 +000020669_ACEOF
20670rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020671if { (ac_try="$ac_link"
20672case "(($ac_try" in
20673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20674 *) ac_try_echo=$ac_try;;
20675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020681 { (case "(($ac_try" in
20682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20683 *) ac_try_echo=$ac_try;;
20684esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020690 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020692 echo "$as_me: program exited with status $ac_status" >&5
20693echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020694sed 's/^/| /' conftest.$ac_ext >&5
20695
Martin v. Löwis11437992002-04-12 09:54:03 +000020696( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020697ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020699rm -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 +000020700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701
20702
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020703fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020704
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020706
Mark Dickinson2df5d282009-12-31 21:22:50 +000020707if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020708then
20709 if test $ipv6 = yes
20710 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020711 echo 'Fatal: You must get working getaddrinfo() function.'
20712 echo ' or you can specify "--disable-ipv6"'.
20713 exit 1
20714 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020715else
Martin v. Löwis11437992002-04-12 09:54:03 +000020716
20717cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020718#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020719_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020720
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020722
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020723for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020724do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020725as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20726{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20727echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020728if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020730else
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020732/* confdefs.h. */
20733_ACEOF
20734cat confdefs.h >>conftest.$ac_ext
20735cat >>conftest.$ac_ext <<_ACEOF
20736/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020737/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20738 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20739#define $ac_func innocuous_$ac_func
20740
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020741/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020742 which can conflict with char $ac_func (); below.
20743 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020744 <limits.h> exists even on freestanding compilers. */
20745
20746#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020747# include <limits.h>
20748#else
20749# include <assert.h>
20750#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020751
20752#undef $ac_func
20753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020754/* Override any GCC internal prototype to avoid an error.
20755 Use char because int might match the return type of a GCC
20756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020757#ifdef __cplusplus
20758extern "C"
20759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020760char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020761/* The GNU C library defines this for functions which it implements
20762 to always fail with ENOSYS. Some functions are actually named
20763 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020764#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020765choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020766#endif
20767
Skip Montanaro6dead952003-09-25 14:50:04 +000020768int
20769main ()
20770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020772 ;
20773 return 0;
20774}
20775_ACEOF
20776rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777if { (ac_try="$ac_link"
20778case "(($ac_try" in
20779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20780 *) ac_try_echo=$ac_try;;
20781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020785 grep -v '^ *+' conftest.er1 >conftest.err
20786 rm -f conftest.er1
20787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020789 (exit $ac_status); } && {
20790 test -z "$ac_c_werror_flag" ||
20791 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020792 } && test -s conftest$ac_exeext &&
20793 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020797sed 's/^/| /' conftest.$ac_ext >&5
20798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020801
20802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020803 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020805ac_res=`eval echo '${'$as_ac_var'}'`
20806 { echo "$as_me:$LINENO: result: $ac_res" >&5
20807echo "${ECHO_T}$ac_res" >&6; }
20808if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020810#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020811_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020812
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020813fi
20814done
20815
Michael W. Hudson54241132001-12-07 15:38:26 +000020816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020818{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20819echo $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 +000020820if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822else
Martin v. Löwis11437992002-04-12 09:54:03 +000020823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020824/* confdefs.h. */
20825_ACEOF
20826cat confdefs.h >>conftest.$ac_ext
20827cat >>conftest.$ac_ext <<_ACEOF
20828/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020829#include <sys/types.h>
20830#include <sys/time.h>
20831#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020832
Martin v. Löwis11437992002-04-12 09:54:03 +000020833int
20834main ()
20835{
20836if ((struct tm *) 0)
20837return 0;
20838 ;
20839 return 0;
20840}
20841_ACEOF
20842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843if { (ac_try="$ac_compile"
20844case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020851 grep -v '^ *+' conftest.er1 >conftest.err
20852 rm -f conftest.er1
20853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020855 (exit $ac_status); } && {
20856 test -z "$ac_c_werror_flag" ||
20857 test ! -s conftest.err
20858 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020859 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020860else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020862sed 's/^/| /' conftest.$ac_ext >&5
20863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020866
20867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020869{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20870echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020871if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020872
20873cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020875_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020876
20877fi
20878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020879{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20880echo $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 +000020881if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883else
Martin v. Löwis11437992002-04-12 09:54:03 +000020884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020885/* confdefs.h. */
20886_ACEOF
20887cat confdefs.h >>conftest.$ac_ext
20888cat >>conftest.$ac_ext <<_ACEOF
20889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020890#include <sys/types.h>
20891#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020892
Martin v. Löwis11437992002-04-12 09:54:03 +000020893int
20894main ()
20895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020896struct tm tm;
20897 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020898 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 ;
20900 return 0;
20901}
20902_ACEOF
20903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904if { (ac_try="$ac_compile"
20905case "(($ac_try" in
20906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20907 *) ac_try_echo=$ac_try;;
20908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020912 grep -v '^ *+' conftest.er1 >conftest.err
20913 rm -f conftest.er1
20914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020916 (exit $ac_status); } && {
20917 test -z "$ac_c_werror_flag" ||
20918 test ! -s conftest.err
20919 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020920 ac_cv_struct_tm=time.h
20921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020923sed 's/^/| /' conftest.$ac_ext >&5
20924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020925 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927
20928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020929fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020930{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20931echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020932if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020933
20934cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020935#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020936_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020937
20938fi
20939
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020940{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20941echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020942if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020944else
Martin v. Löwis11437992002-04-12 09:54:03 +000020945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020946/* confdefs.h. */
20947_ACEOF
20948cat confdefs.h >>conftest.$ac_ext
20949cat >>conftest.$ac_ext <<_ACEOF
20950/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020951#include <sys/types.h>
20952#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020953
20954
Martin v. Löwis11437992002-04-12 09:54:03 +000020955int
20956main ()
20957{
20958static struct tm ac_aggr;
20959if (ac_aggr.tm_zone)
20960return 0;
20961 ;
20962 return 0;
20963}
20964_ACEOF
20965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966if { (ac_try="$ac_compile"
20967case "(($ac_try" in
20968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20969 *) ac_try_echo=$ac_try;;
20970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020974 grep -v '^ *+' conftest.er1 >conftest.err
20975 rm -f conftest.er1
20976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020978 (exit $ac_status); } && {
20979 test -z "$ac_c_werror_flag" ||
20980 test ! -s conftest.err
20981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020985sed 's/^/| /' conftest.$ac_ext >&5
20986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020988/* confdefs.h. */
20989_ACEOF
20990cat confdefs.h >>conftest.$ac_ext
20991cat >>conftest.$ac_ext <<_ACEOF
20992/* end confdefs.h. */
20993#include <sys/types.h>
20994#include <$ac_cv_struct_tm>
20995
20996
20997int
20998main ()
20999{
21000static struct tm ac_aggr;
21001if (sizeof ac_aggr.tm_zone)
21002return 0;
21003 ;
21004 return 0;
21005}
21006_ACEOF
21007rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008if { (ac_try="$ac_compile"
21009case "(($ac_try" in
21010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21011 *) ac_try_echo=$ac_try;;
21012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021014 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021016 grep -v '^ *+' conftest.er1 >conftest.err
21017 rm -f conftest.er1
21018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021020 (exit $ac_status); } && {
21021 test -z "$ac_c_werror_flag" ||
21022 test ! -s conftest.err
21023 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021024 ac_cv_member_struct_tm_tm_zone=yes
21025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021027sed 's/^/| /' conftest.$ac_ext >&5
21028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021031
21032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021037{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21038echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21039if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021040
21041cat >>confdefs.h <<_ACEOF
21042#define HAVE_STRUCT_TM_TM_ZONE 1
21043_ACEOF
21044
21045
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021046fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021047
Martin v. Löwis11437992002-04-12 09:54:03 +000021048if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21049
21050cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021051#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021052_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021053
21054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021055 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21056echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021057if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021058 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021059else
21060 cat >conftest.$ac_ext <<_ACEOF
21061/* confdefs.h. */
21062_ACEOF
21063cat confdefs.h >>conftest.$ac_ext
21064cat >>conftest.$ac_ext <<_ACEOF
21065/* end confdefs.h. */
21066#include <time.h>
21067
21068int
21069main ()
21070{
21071#ifndef tzname
21072 (void) tzname;
21073#endif
21074
21075 ;
21076 return 0;
21077}
21078_ACEOF
21079rm -f conftest.$ac_objext
21080if { (ac_try="$ac_compile"
21081case "(($ac_try" in
21082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21083 *) ac_try_echo=$ac_try;;
21084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021086 (eval "$ac_compile") 2>conftest.er1
21087 ac_status=$?
21088 grep -v '^ *+' conftest.er1 >conftest.err
21089 rm -f conftest.er1
21090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021092 (exit $ac_status); } && {
21093 test -z "$ac_c_werror_flag" ||
21094 test ! -s conftest.err
21095 } && test -s conftest.$ac_objext; then
21096 ac_cv_have_decl_tzname=yes
21097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021098 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021099sed 's/^/| /' conftest.$ac_ext >&5
21100
21101 ac_cv_have_decl_tzname=no
21102fi
21103
21104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21105fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021106{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21107echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21108if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109
21110cat >>confdefs.h <<_ACEOF
21111#define HAVE_DECL_TZNAME 1
21112_ACEOF
21113
21114
21115else
21116 cat >>confdefs.h <<_ACEOF
21117#define HAVE_DECL_TZNAME 0
21118_ACEOF
21119
21120
21121fi
21122
21123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021124 { echo "$as_me:$LINENO: checking for tzname" >&5
21125echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021126if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021128else
Martin v. Löwis11437992002-04-12 09:54:03 +000021129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021130/* confdefs.h. */
21131_ACEOF
21132cat confdefs.h >>conftest.$ac_ext
21133cat >>conftest.$ac_ext <<_ACEOF
21134/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021135#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136#if !HAVE_DECL_TZNAME
21137extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021139
Martin v. Löwis11437992002-04-12 09:54:03 +000021140int
21141main ()
21142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021143return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021144 ;
21145 return 0;
21146}
21147_ACEOF
21148rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149if { (ac_try="$ac_link"
21150case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021157 grep -v '^ *+' conftest.er1 >conftest.err
21158 rm -f conftest.er1
21159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021161 (exit $ac_status); } && {
21162 test -z "$ac_c_werror_flag" ||
21163 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021164 } && test -s conftest$ac_exeext &&
21165 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021166 ac_cv_var_tzname=yes
21167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021169sed 's/^/| /' conftest.$ac_ext >&5
21170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021171 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021173
21174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021175 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021176fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021177{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21178echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021179 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021180
21181cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021182#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021183_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021184
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021185 fi
21186fi
21187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021188{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21189echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021190if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021191 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021192else
21193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021194/* confdefs.h. */
21195_ACEOF
21196cat confdefs.h >>conftest.$ac_ext
21197cat >>conftest.$ac_ext <<_ACEOF
21198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021199$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021200int
21201main ()
21202{
21203static struct stat ac_aggr;
21204if (ac_aggr.st_rdev)
21205return 0;
21206 ;
21207 return 0;
21208}
21209_ACEOF
21210rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211if { (ac_try="$ac_compile"
21212case "(($ac_try" in
21213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21214 *) ac_try_echo=$ac_try;;
21215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021219 grep -v '^ *+' conftest.er1 >conftest.err
21220 rm -f conftest.er1
21221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021223 (exit $ac_status); } && {
21224 test -z "$ac_c_werror_flag" ||
21225 test ! -s conftest.err
21226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021227 ac_cv_member_struct_stat_st_rdev=yes
21228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021230sed 's/^/| /' conftest.$ac_ext >&5
21231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021233/* confdefs.h. */
21234_ACEOF
21235cat confdefs.h >>conftest.$ac_ext
21236cat >>conftest.$ac_ext <<_ACEOF
21237/* end confdefs.h. */
21238$ac_includes_default
21239int
21240main ()
21241{
21242static struct stat ac_aggr;
21243if (sizeof ac_aggr.st_rdev)
21244return 0;
21245 ;
21246 return 0;
21247}
21248_ACEOF
21249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021250if { (ac_try="$ac_compile"
21251case "(($ac_try" in
21252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21253 *) ac_try_echo=$ac_try;;
21254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021258 grep -v '^ *+' conftest.er1 >conftest.err
21259 rm -f conftest.er1
21260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021262 (exit $ac_status); } && {
21263 test -z "$ac_c_werror_flag" ||
21264 test ! -s conftest.err
21265 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021266 ac_cv_member_struct_stat_st_rdev=yes
21267else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021269sed 's/^/| /' conftest.$ac_ext >&5
21270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021271 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273
21274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276
21277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021278fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021279{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21280echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21281if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021282
21283cat >>confdefs.h <<_ACEOF
21284#define HAVE_STRUCT_STAT_ST_RDEV 1
21285_ACEOF
21286
21287
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021288fi
21289
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021290{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21291echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021292if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021294else
Martin v. Löwis11437992002-04-12 09:54:03 +000021295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021296/* confdefs.h. */
21297_ACEOF
21298cat confdefs.h >>conftest.$ac_ext
21299cat >>conftest.$ac_ext <<_ACEOF
21300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021301$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021302int
21303main ()
21304{
21305static struct stat ac_aggr;
21306if (ac_aggr.st_blksize)
21307return 0;
21308 ;
21309 return 0;
21310}
21311_ACEOF
21312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313if { (ac_try="$ac_compile"
21314case "(($ac_try" in
21315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21316 *) ac_try_echo=$ac_try;;
21317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021321 grep -v '^ *+' conftest.er1 >conftest.err
21322 rm -f conftest.er1
21323 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021325 (exit $ac_status); } && {
21326 test -z "$ac_c_werror_flag" ||
21327 test ! -s conftest.err
21328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021332sed 's/^/| /' conftest.$ac_ext >&5
21333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021335/* confdefs.h. */
21336_ACEOF
21337cat confdefs.h >>conftest.$ac_ext
21338cat >>conftest.$ac_ext <<_ACEOF
21339/* end confdefs.h. */
21340$ac_includes_default
21341int
21342main ()
21343{
21344static struct stat ac_aggr;
21345if (sizeof ac_aggr.st_blksize)
21346return 0;
21347 ;
21348 return 0;
21349}
21350_ACEOF
21351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021352if { (ac_try="$ac_compile"
21353case "(($ac_try" in
21354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21355 *) ac_try_echo=$ac_try;;
21356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021358 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021360 grep -v '^ *+' conftest.er1 >conftest.err
21361 rm -f conftest.er1
21362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021364 (exit $ac_status); } && {
21365 test -z "$ac_c_werror_flag" ||
21366 test ! -s conftest.err
21367 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021368 ac_cv_member_struct_stat_st_blksize=yes
21369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021371sed 's/^/| /' conftest.$ac_ext >&5
21372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375
21376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378
21379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021381{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21382echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21383if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021384
Martin v. Löwis11437992002-04-12 09:54:03 +000021385cat >>confdefs.h <<_ACEOF
21386#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21387_ACEOF
21388
21389
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021390fi
21391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021392{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21393echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021394if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021395 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021396else
21397 cat >conftest.$ac_ext <<_ACEOF
21398/* confdefs.h. */
21399_ACEOF
21400cat confdefs.h >>conftest.$ac_ext
21401cat >>conftest.$ac_ext <<_ACEOF
21402/* end confdefs.h. */
21403$ac_includes_default
21404int
21405main ()
21406{
21407static struct stat ac_aggr;
21408if (ac_aggr.st_flags)
21409return 0;
21410 ;
21411 return 0;
21412}
21413_ACEOF
21414rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415if { (ac_try="$ac_compile"
21416case "(($ac_try" in
21417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21418 *) ac_try_echo=$ac_try;;
21419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021421 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021422 ac_status=$?
21423 grep -v '^ *+' conftest.er1 >conftest.err
21424 rm -f conftest.er1
21425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427 (exit $ac_status); } && {
21428 test -z "$ac_c_werror_flag" ||
21429 test ! -s conftest.err
21430 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021431 ac_cv_member_struct_stat_st_flags=yes
21432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021433 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021434sed 's/^/| /' conftest.$ac_ext >&5
21435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021436 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021437/* confdefs.h. */
21438_ACEOF
21439cat confdefs.h >>conftest.$ac_ext
21440cat >>conftest.$ac_ext <<_ACEOF
21441/* end confdefs.h. */
21442$ac_includes_default
21443int
21444main ()
21445{
21446static struct stat ac_aggr;
21447if (sizeof ac_aggr.st_flags)
21448return 0;
21449 ;
21450 return 0;
21451}
21452_ACEOF
21453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454if { (ac_try="$ac_compile"
21455case "(($ac_try" in
21456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21457 *) ac_try_echo=$ac_try;;
21458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021461 ac_status=$?
21462 grep -v '^ *+' conftest.er1 >conftest.err
21463 rm -f conftest.er1
21464 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466 (exit $ac_status); } && {
21467 test -z "$ac_c_werror_flag" ||
21468 test ! -s conftest.err
21469 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021470 ac_cv_member_struct_stat_st_flags=yes
21471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021472 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021473sed 's/^/| /' conftest.$ac_ext >&5
21474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021475 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477
21478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480
21481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021482fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021483{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21484echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21485if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021486
21487cat >>confdefs.h <<_ACEOF
21488#define HAVE_STRUCT_STAT_ST_FLAGS 1
21489_ACEOF
21490
21491
21492fi
21493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021494{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21495echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021496if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021497 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021498else
21499 cat >conftest.$ac_ext <<_ACEOF
21500/* confdefs.h. */
21501_ACEOF
21502cat confdefs.h >>conftest.$ac_ext
21503cat >>conftest.$ac_ext <<_ACEOF
21504/* end confdefs.h. */
21505$ac_includes_default
21506int
21507main ()
21508{
21509static struct stat ac_aggr;
21510if (ac_aggr.st_gen)
21511return 0;
21512 ;
21513 return 0;
21514}
21515_ACEOF
21516rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021517if { (ac_try="$ac_compile"
21518case "(($ac_try" in
21519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21520 *) ac_try_echo=$ac_try;;
21521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021524 ac_status=$?
21525 grep -v '^ *+' conftest.er1 >conftest.err
21526 rm -f conftest.er1
21527 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021529 (exit $ac_status); } && {
21530 test -z "$ac_c_werror_flag" ||
21531 test ! -s conftest.err
21532 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021533 ac_cv_member_struct_stat_st_gen=yes
21534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021535 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021536sed 's/^/| /' conftest.$ac_ext >&5
21537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021538 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021539/* confdefs.h. */
21540_ACEOF
21541cat confdefs.h >>conftest.$ac_ext
21542cat >>conftest.$ac_ext <<_ACEOF
21543/* end confdefs.h. */
21544$ac_includes_default
21545int
21546main ()
21547{
21548static struct stat ac_aggr;
21549if (sizeof ac_aggr.st_gen)
21550return 0;
21551 ;
21552 return 0;
21553}
21554_ACEOF
21555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556if { (ac_try="$ac_compile"
21557case "(($ac_try" in
21558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21559 *) ac_try_echo=$ac_try;;
21560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021563 ac_status=$?
21564 grep -v '^ *+' conftest.er1 >conftest.err
21565 rm -f conftest.er1
21566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568 (exit $ac_status); } && {
21569 test -z "$ac_c_werror_flag" ||
21570 test ! -s conftest.err
21571 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021572 ac_cv_member_struct_stat_st_gen=yes
21573else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021574 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021575sed 's/^/| /' conftest.$ac_ext >&5
21576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021577 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579
21580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021582
21583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021584fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021585{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21586echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21587if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021588
21589cat >>confdefs.h <<_ACEOF
21590#define HAVE_STRUCT_STAT_ST_GEN 1
21591_ACEOF
21592
21593
21594fi
21595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021596{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21597echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021598if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021600else
21601 cat >conftest.$ac_ext <<_ACEOF
21602/* confdefs.h. */
21603_ACEOF
21604cat confdefs.h >>conftest.$ac_ext
21605cat >>conftest.$ac_ext <<_ACEOF
21606/* end confdefs.h. */
21607$ac_includes_default
21608int
21609main ()
21610{
21611static struct stat ac_aggr;
21612if (ac_aggr.st_birthtime)
21613return 0;
21614 ;
21615 return 0;
21616}
21617_ACEOF
21618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021619if { (ac_try="$ac_compile"
21620case "(($ac_try" in
21621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21622 *) ac_try_echo=$ac_try;;
21623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021626 ac_status=$?
21627 grep -v '^ *+' conftest.er1 >conftest.err
21628 rm -f conftest.er1
21629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021631 (exit $ac_status); } && {
21632 test -z "$ac_c_werror_flag" ||
21633 test ! -s conftest.err
21634 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021635 ac_cv_member_struct_stat_st_birthtime=yes
21636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021637 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021638sed 's/^/| /' conftest.$ac_ext >&5
21639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021641/* confdefs.h. */
21642_ACEOF
21643cat confdefs.h >>conftest.$ac_ext
21644cat >>conftest.$ac_ext <<_ACEOF
21645/* end confdefs.h. */
21646$ac_includes_default
21647int
21648main ()
21649{
21650static struct stat ac_aggr;
21651if (sizeof ac_aggr.st_birthtime)
21652return 0;
21653 ;
21654 return 0;
21655}
21656_ACEOF
21657rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021658if { (ac_try="$ac_compile"
21659case "(($ac_try" in
21660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21661 *) ac_try_echo=$ac_try;;
21662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021665 ac_status=$?
21666 grep -v '^ *+' conftest.er1 >conftest.err
21667 rm -f conftest.er1
21668 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021670 (exit $ac_status); } && {
21671 test -z "$ac_c_werror_flag" ||
21672 test ! -s conftest.err
21673 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021674 ac_cv_member_struct_stat_st_birthtime=yes
21675else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021676 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021677sed 's/^/| /' conftest.$ac_ext >&5
21678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021679 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681
21682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021684
21685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021686fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021687{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21688echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21689if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021690
21691cat >>confdefs.h <<_ACEOF
21692#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21693_ACEOF
21694
21695
21696fi
21697
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021698{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21699echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021700if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021702else
Martin v. Löwis11437992002-04-12 09:54:03 +000021703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021704/* confdefs.h. */
21705_ACEOF
21706cat confdefs.h >>conftest.$ac_ext
21707cat >>conftest.$ac_ext <<_ACEOF
21708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021709$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021710int
21711main ()
21712{
21713static struct stat ac_aggr;
21714if (ac_aggr.st_blocks)
21715return 0;
21716 ;
21717 return 0;
21718}
21719_ACEOF
21720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021721if { (ac_try="$ac_compile"
21722case "(($ac_try" in
21723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21724 *) ac_try_echo=$ac_try;;
21725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021729 grep -v '^ *+' conftest.er1 >conftest.err
21730 rm -f conftest.er1
21731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021733 (exit $ac_status); } && {
21734 test -z "$ac_c_werror_flag" ||
21735 test ! -s conftest.err
21736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021737 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021740sed 's/^/| /' conftest.$ac_ext >&5
21741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021743/* confdefs.h. */
21744_ACEOF
21745cat confdefs.h >>conftest.$ac_ext
21746cat >>conftest.$ac_ext <<_ACEOF
21747/* end confdefs.h. */
21748$ac_includes_default
21749int
21750main ()
21751{
21752static struct stat ac_aggr;
21753if (sizeof ac_aggr.st_blocks)
21754return 0;
21755 ;
21756 return 0;
21757}
21758_ACEOF
21759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021760if { (ac_try="$ac_compile"
21761case "(($ac_try" in
21762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21763 *) ac_try_echo=$ac_try;;
21764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021766 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021768 grep -v '^ *+' conftest.er1 >conftest.err
21769 rm -f conftest.er1
21770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021772 (exit $ac_status); } && {
21773 test -z "$ac_c_werror_flag" ||
21774 test ! -s conftest.err
21775 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021776 ac_cv_member_struct_stat_st_blocks=yes
21777else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021779sed 's/^/| /' conftest.$ac_ext >&5
21780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021781 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021783
21784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786
21787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021788fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021789{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21790echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21791if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021792
Martin v. Löwis11437992002-04-12 09:54:03 +000021793cat >>confdefs.h <<_ACEOF
21794#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21795_ACEOF
21796
21797
21798cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021799#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021800_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021801
21802else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021803 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021804 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021805 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21806 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021807esac
21808
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021809fi
21810
Michael W. Hudson54241132001-12-07 15:38:26 +000021811
Martin v. Löwis11437992002-04-12 09:54:03 +000021812
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021813{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21814echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021815if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817else
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021819/* confdefs.h. */
21820_ACEOF
21821cat confdefs.h >>conftest.$ac_ext
21822cat >>conftest.$ac_ext <<_ACEOF
21823/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021824#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021825int
21826main ()
21827{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021828return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 ;
21830 return 0;
21831}
21832_ACEOF
21833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834if { (ac_try="$ac_compile"
21835case "(($ac_try" in
21836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21837 *) ac_try_echo=$ac_try;;
21838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021842 grep -v '^ *+' conftest.er1 >conftest.err
21843 rm -f conftest.er1
21844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021846 (exit $ac_status); } && {
21847 test -z "$ac_c_werror_flag" ||
21848 test ! -s conftest.err
21849 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021850 ac_cv_header_time_altzone=yes
21851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021853sed 's/^/| /' conftest.$ac_ext >&5
21854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021855 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021856fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21859fi
21860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021861{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21862echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021863if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021864
21865cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021866#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021867_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021868
21869fi
21870
Guido van Rossumda88dad1995-01-26 00:46:29 +000021871was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021872{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21873echo $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 +000021874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021875/* confdefs.h. */
21876_ACEOF
21877cat confdefs.h >>conftest.$ac_ext
21878cat >>conftest.$ac_ext <<_ACEOF
21879/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021880
21881#include <sys/types.h>
21882#include <sys/select.h>
21883#include <sys/time.h>
21884
Martin v. Löwis11437992002-04-12 09:54:03 +000021885int
21886main ()
21887{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021888;
Martin v. Löwis11437992002-04-12 09:54:03 +000021889 ;
21890 return 0;
21891}
21892_ACEOF
21893rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021894if { (ac_try="$ac_compile"
21895case "(($ac_try" in
21896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21897 *) ac_try_echo=$ac_try;;
21898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021902 grep -v '^ *+' conftest.er1 >conftest.err
21903 rm -f conftest.er1
21904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906 (exit $ac_status); } && {
21907 test -z "$ac_c_werror_flag" ||
21908 test ! -s conftest.err
21909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021910
21911
21912cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021913#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021914_ACEOF
21915
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021916 was_it_defined=yes
21917
Guido van Rossumf78abae1997-01-21 22:02:36 +000021918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021920sed 's/^/| /' conftest.$ac_ext >&5
21921
Thomas Wouters477c8d52006-05-27 19:21:47 +000021922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021923fi
21924
21925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021926{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21927echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021928
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021929{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21930echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021931if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021933else
Martin v. Löwis11437992002-04-12 09:54:03 +000021934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021935/* confdefs.h. */
21936_ACEOF
21937cat confdefs.h >>conftest.$ac_ext
21938cat >>conftest.$ac_ext <<_ACEOF
21939/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021940
21941# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021942int
21943main ()
21944{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021945struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021946 ;
21947 return 0;
21948}
21949_ACEOF
21950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021951if { (ac_try="$ac_compile"
21952case "(($ac_try" in
21953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21954 *) ac_try_echo=$ac_try;;
21955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021959 grep -v '^ *+' conftest.er1 >conftest.err
21960 rm -f conftest.er1
21961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963 (exit $ac_status); } && {
21964 test -z "$ac_c_werror_flag" ||
21965 test ! -s conftest.err
21966 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021967 ac_cv_struct_addrinfo=yes
21968else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021970sed 's/^/| /' conftest.$ac_ext >&5
21971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021972 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021973fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21976fi
21977
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021978{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21979echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021980if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021981
21982cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021984_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021985
21986fi
21987
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021988{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21989echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021990if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021991 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021992else
Martin v. Löwis11437992002-04-12 09:54:03 +000021993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021994/* confdefs.h. */
21995_ACEOF
21996cat confdefs.h >>conftest.$ac_ext
21997cat >>conftest.$ac_ext <<_ACEOF
21998/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021999
22000# include <sys/types.h>
22001# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022002int
22003main ()
22004{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022005struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022006 ;
22007 return 0;
22008}
22009_ACEOF
22010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022011if { (ac_try="$ac_compile"
22012case "(($ac_try" in
22013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22014 *) ac_try_echo=$ac_try;;
22015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022019 grep -v '^ *+' conftest.er1 >conftest.err
22020 rm -f conftest.er1
22021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022023 (exit $ac_status); } && {
22024 test -z "$ac_c_werror_flag" ||
22025 test ! -s conftest.err
22026 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022027 ac_cv_struct_sockaddr_storage=yes
22028else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022030sed 's/^/| /' conftest.$ac_ext >&5
22031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022032 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22036fi
22037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022038{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22039echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022040if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022041
22042cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022043#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022044_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022045
22046fi
22047
Guido van Rossum627b2d71993-12-24 10:39:16 +000022048# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022049
Michael W. Hudson54241132001-12-07 15:38:26 +000022050
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022051{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22052echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022053if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022054 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022055else
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022057/* confdefs.h. */
22058_ACEOF
22059cat confdefs.h >>conftest.$ac_ext
22060cat >>conftest.$ac_ext <<_ACEOF
22061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022063int
22064main ()
22065{
22066static int test_array [1 - 2 * !(((char) -1) < 0)];
22067test_array [0] = 0
22068
22069 ;
22070 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022071}
Martin v. Löwis11437992002-04-12 09:54:03 +000022072_ACEOF
22073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074if { (ac_try="$ac_compile"
22075case "(($ac_try" in
22076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22077 *) ac_try_echo=$ac_try;;
22078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022082 grep -v '^ *+' conftest.er1 >conftest.err
22083 rm -f conftest.er1
22084 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022086 (exit $ac_status); } && {
22087 test -z "$ac_c_werror_flag" ||
22088 test ! -s conftest.err
22089 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022090 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022093sed 's/^/| /' conftest.$ac_ext >&5
22094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022095 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022097
22098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022099fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022100{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22101echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022102if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022104#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022105_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022106
22107fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022109{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22110echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022111if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022112 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022113else
22114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022115/* confdefs.h. */
22116_ACEOF
22117cat confdefs.h >>conftest.$ac_ext
22118cat >>conftest.$ac_ext <<_ACEOF
22119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022120
Martin v. Löwis11437992002-04-12 09:54:03 +000022121int
22122main ()
22123{
22124/* FIXME: Include the comments suggested by Paul. */
22125#ifndef __cplusplus
22126 /* Ultrix mips cc rejects this. */
22127 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 char const *const *pcpcc;
22131 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 /* NEC SVR4.0.2 mips cc rejects this. */
22133 struct point {int x, y;};
22134 static struct point const zero = {0,0};
22135 /* AIX XL C 1.02.0.0 rejects this.
22136 It does not let you subtract one const X* pointer from another in
22137 an arm of an if-expression whose if-part is not a constant
22138 expression */
22139 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022142 ++pcpcc;
22143 ppc = (char**) pcpcc;
22144 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 { /* SCO 3.2v4 cc rejects this. */
22146 char *t;
22147 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022148
Martin v. Löwis11437992002-04-12 09:54:03 +000022149 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022150 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 }
22152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22153 int x[] = {25, 17};
22154 const int *foo = &x[0];
22155 ++foo;
22156 }
22157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22158 typedef const int *iptr;
22159 iptr p = 0;
22160 ++p;
22161 }
22162 { /* AIX XL C 1.02.0.0 rejects this saying
22163 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22164 struct s { int j; const int *ap[3]; };
22165 struct s *b; b->j = 5;
22166 }
22167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22168 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022171 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022172#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022173
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ;
22175 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022176}
Martin v. Löwis11437992002-04-12 09:54:03 +000022177_ACEOF
22178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179if { (ac_try="$ac_compile"
22180case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022187 grep -v '^ *+' conftest.er1 >conftest.err
22188 rm -f conftest.er1
22189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022191 (exit $ac_status); } && {
22192 test -z "$ac_c_werror_flag" ||
22193 test ! -s conftest.err
22194 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022195 ac_cv_c_const=yes
22196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022198sed 's/^/| /' conftest.$ac_ext >&5
22199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022200 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022202
22203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022204fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022205{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22206echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022207if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022208
22209cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022210#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022212
22213fi
22214
Michael W. Hudson54241132001-12-07 15:38:26 +000022215
Guido van Rossumda88dad1995-01-26 00:46:29 +000022216works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022217{ echo "$as_me:$LINENO: checking for working volatile" >&5
22218echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022220/* confdefs.h. */
22221_ACEOF
22222cat confdefs.h >>conftest.$ac_ext
22223cat >>conftest.$ac_ext <<_ACEOF
22224/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022225
Martin v. Löwis11437992002-04-12 09:54:03 +000022226int
22227main ()
22228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022229volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022230 ;
22231 return 0;
22232}
22233_ACEOF
22234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235if { (ac_try="$ac_compile"
22236case "(($ac_try" in
22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22238 *) ac_try_echo=$ac_try;;
22239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022243 grep -v '^ *+' conftest.er1 >conftest.err
22244 rm -f conftest.er1
22245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022247 (exit $ac_status); } && {
22248 test -z "$ac_c_werror_flag" ||
22249 test ! -s conftest.err
22250 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022251 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022254sed 's/^/| /' conftest.$ac_ext >&5
22255
Martin v. Löwis11437992002-04-12 09:54:03 +000022256
22257cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022258#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022259_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022261
Guido van Rossum627b2d71993-12-24 10:39:16 +000022262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022263
22264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022265{ echo "$as_me:$LINENO: result: $works" >&5
22266echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022267
Guido van Rossumda88dad1995-01-26 00:46:29 +000022268works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022269{ echo "$as_me:$LINENO: checking for working signed char" >&5
22270echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022272/* confdefs.h. */
22273_ACEOF
22274cat confdefs.h >>conftest.$ac_ext
22275cat >>conftest.$ac_ext <<_ACEOF
22276/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022277
Martin v. Löwis11437992002-04-12 09:54:03 +000022278int
22279main ()
22280{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022281signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022282 ;
22283 return 0;
22284}
22285_ACEOF
22286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022287if { (ac_try="$ac_compile"
22288case "(($ac_try" in
22289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22290 *) ac_try_echo=$ac_try;;
22291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022295 grep -v '^ *+' conftest.er1 >conftest.err
22296 rm -f conftest.er1
22297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022299 (exit $ac_status); } && {
22300 test -z "$ac_c_werror_flag" ||
22301 test ! -s conftest.err
22302 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022303 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022306sed 's/^/| /' conftest.$ac_ext >&5
22307
Martin v. Löwis11437992002-04-12 09:54:03 +000022308
22309cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022310#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022311_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022312
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022313
Guido van Rossum7f43da71994-08-01 12:15:30 +000022314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022315
22316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022317{ echo "$as_me:$LINENO: result: $works" >&5
22318echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022319
Guido van Rossumda88dad1995-01-26 00:46:29 +000022320have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022321{ echo "$as_me:$LINENO: checking for prototypes" >&5
22322echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022324/* confdefs.h. */
22325_ACEOF
22326cat confdefs.h >>conftest.$ac_ext
22327cat >>conftest.$ac_ext <<_ACEOF
22328/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022329int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022330int
22331main ()
22332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022333return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 ;
22335 return 0;
22336}
22337_ACEOF
22338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022339if { (ac_try="$ac_compile"
22340case "(($ac_try" in
22341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22342 *) ac_try_echo=$ac_try;;
22343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022347 grep -v '^ *+' conftest.er1 >conftest.err
22348 rm -f conftest.er1
22349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022351 (exit $ac_status); } && {
22352 test -z "$ac_c_werror_flag" ||
22353 test ! -s conftest.err
22354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022355
22356
22357cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022358#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022359_ACEOF
22360
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022361 have_prototypes=yes
22362
Guido van Rossumf78abae1997-01-21 22:02:36 +000022363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022365sed 's/^/| /' conftest.$ac_ext >&5
22366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367
Guido van Rossum7f43da71994-08-01 12:15:30 +000022368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022369
22370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022371{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22372echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022373
Guido van Rossumda88dad1995-01-26 00:46:29 +000022374works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022375{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22376echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022378/* confdefs.h. */
22379_ACEOF
22380cat confdefs.h >>conftest.$ac_ext
22381cat >>conftest.$ac_ext <<_ACEOF
22382/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022383
22384#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022385int foo(int x, ...) {
22386 va_list va;
22387 va_start(va, x);
22388 va_arg(va, int);
22389 va_arg(va, char *);
22390 va_arg(va, double);
22391 return 0;
22392}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022393
Martin v. Löwis11437992002-04-12 09:54:03 +000022394int
22395main ()
22396{
Guido van Rossum90eea071996-08-30 20:58:57 +000022397return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022398 ;
22399 return 0;
22400}
22401_ACEOF
22402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022403if { (ac_try="$ac_compile"
22404case "(($ac_try" in
22405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22406 *) ac_try_echo=$ac_try;;
22407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022411 grep -v '^ *+' conftest.er1 >conftest.err
22412 rm -f conftest.er1
22413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022415 (exit $ac_status); } && {
22416 test -z "$ac_c_werror_flag" ||
22417 test ! -s conftest.err
22418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022419
22420
22421cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022422#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022423_ACEOF
22424
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022425 works=yes
22426
Guido van Rossumf78abae1997-01-21 22:02:36 +000022427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022429sed 's/^/| /' conftest.$ac_ext >&5
22430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022431
Guido van Rossum627b2d71993-12-24 10:39:16 +000022432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022433
22434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022435{ echo "$as_me:$LINENO: result: $works" >&5
22436echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022437
Martin v. Löwisd6320502004-08-12 13:45:08 +000022438# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022439{ echo "$as_me:$LINENO: checking for socketpair" >&5
22440echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022441cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022442/* confdefs.h. */
22443_ACEOF
22444cat confdefs.h >>conftest.$ac_ext
22445cat >>conftest.$ac_ext <<_ACEOF
22446/* end confdefs.h. */
22447
22448#include <sys/types.h>
22449#include <sys/socket.h>
22450
22451int
22452main ()
22453{
22454void *x=socketpair
22455 ;
22456 return 0;
22457}
22458_ACEOF
22459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022460if { (ac_try="$ac_compile"
22461case "(($ac_try" in
22462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22463 *) ac_try_echo=$ac_try;;
22464esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022468 grep -v '^ *+' conftest.er1 >conftest.err
22469 rm -f conftest.er1
22470 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022472 (exit $ac_status); } && {
22473 test -z "$ac_c_werror_flag" ||
22474 test ! -s conftest.err
22475 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022476
22477cat >>confdefs.h <<\_ACEOF
22478#define HAVE_SOCKETPAIR 1
22479_ACEOF
22480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022481 { echo "$as_me:$LINENO: result: yes" >&5
22482echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022484 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022485sed 's/^/| /' conftest.$ac_ext >&5
22486
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022487 { echo "$as_me:$LINENO: result: no" >&5
22488echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022489
22490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022491
22492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022493
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022494# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022495{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22496echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022498/* confdefs.h. */
22499_ACEOF
22500cat confdefs.h >>conftest.$ac_ext
22501cat >>conftest.$ac_ext <<_ACEOF
22502/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022503#include <sys/types.h>
22504#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022505int
22506main ()
22507{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022508struct sockaddr x;
22509x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022510 ;
22511 return 0;
22512}
22513_ACEOF
22514rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022515if { (ac_try="$ac_compile"
22516case "(($ac_try" in
22517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22518 *) ac_try_echo=$ac_try;;
22519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022523 grep -v '^ *+' conftest.er1 >conftest.err
22524 rm -f conftest.er1
22525 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022527 (exit $ac_status); } && {
22528 test -z "$ac_c_werror_flag" ||
22529 test ! -s conftest.err
22530 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022531 { echo "$as_me:$LINENO: result: yes" >&5
22532echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022533
22534cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022535#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022536_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022537
22538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022540sed 's/^/| /' conftest.$ac_ext >&5
22541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022542 { echo "$as_me:$LINENO: result: no" >&5
22543echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022545
22546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022547
Guido van Rossumda88dad1995-01-26 00:46:29 +000022548va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022549{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22550echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022552/* confdefs.h. */
22553_ACEOF
22554cat confdefs.h >>conftest.$ac_ext
22555cat >>conftest.$ac_ext <<_ACEOF
22556/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022557
22558#ifdef HAVE_STDARG_PROTOTYPES
22559#include <stdarg.h>
22560#else
22561#include <varargs.h>
22562#endif
22563
Martin v. Löwis11437992002-04-12 09:54:03 +000022564int
22565main ()
22566{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022567va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022568 ;
22569 return 0;
22570}
22571_ACEOF
22572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573if { (ac_try="$ac_compile"
22574case "(($ac_try" in
22575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22576 *) ac_try_echo=$ac_try;;
22577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022581 grep -v '^ *+' conftest.er1 >conftest.err
22582 rm -f conftest.er1
22583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022585 (exit $ac_status); } && {
22586 test -z "$ac_c_werror_flag" ||
22587 test ! -s conftest.err
22588 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022589 :
22590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022592sed 's/^/| /' conftest.$ac_ext >&5
22593
Martin v. Löwis11437992002-04-12 09:54:03 +000022594
22595
22596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022597#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022598_ACEOF
22599
Guido van Rossumda88dad1995-01-26 00:46:29 +000022600 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022603
22604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022605{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22606echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022608# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022609
22610
22611
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022612{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22613echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022614if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022616else
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022618/* confdefs.h. */
22619_ACEOF
22620cat confdefs.h >>conftest.$ac_ext
22621cat >>conftest.$ac_ext <<_ACEOF
22622/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022623/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22624 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22625#define gethostbyname_r innocuous_gethostbyname_r
22626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022627/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022628 which can conflict with char gethostbyname_r (); below.
22629 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022630 <limits.h> exists even on freestanding compilers. */
22631
22632#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022633# include <limits.h>
22634#else
22635# include <assert.h>
22636#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022637
22638#undef gethostbyname_r
22639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022640/* Override any GCC internal prototype to avoid an error.
22641 Use char because int might match the return type of a GCC
22642 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022643#ifdef __cplusplus
22644extern "C"
22645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022646char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022647/* The GNU C library defines this for functions which it implements
22648 to always fail with ENOSYS. Some functions are actually named
22649 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022650#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022651choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022652#endif
22653
Skip Montanaro6dead952003-09-25 14:50:04 +000022654int
22655main ()
22656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022657return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 ;
22659 return 0;
22660}
22661_ACEOF
22662rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022663if { (ac_try="$ac_link"
22664case "(($ac_try" in
22665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666 *) ac_try_echo=$ac_try;;
22667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022669 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022671 grep -v '^ *+' conftest.er1 >conftest.err
22672 rm -f conftest.er1
22673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022675 (exit $ac_status); } && {
22676 test -z "$ac_c_werror_flag" ||
22677 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022678 } && test -s conftest$ac_exeext &&
22679 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022680 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022683sed 's/^/| /' conftest.$ac_ext >&5
22684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022685 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022687
22688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022689 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022691{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22692echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22693if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022694
Martin v. Löwis11437992002-04-12 09:54:03 +000022695 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022696#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022697_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022698
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022699 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22700echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022701 OLD_CFLAGS=$CFLAGS
22702 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022704/* confdefs.h. */
22705_ACEOF
22706cat confdefs.h >>conftest.$ac_ext
22707cat >>conftest.$ac_ext <<_ACEOF
22708/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022709
22710# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022711
Martin v. Löwis11437992002-04-12 09:54:03 +000022712int
22713main ()
22714{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022715
22716 char *name;
22717 struct hostent *he, *res;
22718 char buffer[2048];
22719 int buflen = 2048;
22720 int h_errnop;
22721
22722 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022723
22724 ;
22725 return 0;
22726}
22727_ACEOF
22728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022729if { (ac_try="$ac_compile"
22730case "(($ac_try" in
22731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22732 *) ac_try_echo=$ac_try;;
22733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022737 grep -v '^ *+' conftest.er1 >conftest.err
22738 rm -f conftest.er1
22739 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022741 (exit $ac_status); } && {
22742 test -z "$ac_c_werror_flag" ||
22743 test ! -s conftest.err
22744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022745
22746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022747#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022748_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022749
Martin v. Löwis11437992002-04-12 09:54:03 +000022750
22751cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022752#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022753_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022754
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022755 { echo "$as_me:$LINENO: result: yes" >&5
22756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022758else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022760sed 's/^/| /' conftest.$ac_ext >&5
22761
Martin v. Löwis11437992002-04-12 09:54:03 +000022762
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022763 { echo "$as_me:$LINENO: result: no" >&5
22764echo "${ECHO_T}no" >&6; }
22765 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22766echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022768/* confdefs.h. */
22769_ACEOF
22770cat confdefs.h >>conftest.$ac_ext
22771cat >>conftest.$ac_ext <<_ACEOF
22772/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022773
22774# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
Martin v. Löwis11437992002-04-12 09:54:03 +000022776int
22777main ()
22778{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022779
22780 char *name;
22781 struct hostent *he;
22782 char buffer[2048];
22783 int buflen = 2048;
22784 int h_errnop;
22785
22786 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022787
22788 ;
22789 return 0;
22790}
22791_ACEOF
22792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022793if { (ac_try="$ac_compile"
22794case "(($ac_try" in
22795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22796 *) ac_try_echo=$ac_try;;
22797esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022801 grep -v '^ *+' conftest.er1 >conftest.err
22802 rm -f conftest.er1
22803 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022805 (exit $ac_status); } && {
22806 test -z "$ac_c_werror_flag" ||
22807 test ! -s conftest.err
22808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022809
22810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022811#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022812_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022813
Martin v. Löwis11437992002-04-12 09:54:03 +000022814
22815cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022816#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022817_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022819 { echo "$as_me:$LINENO: result: yes" >&5
22820echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022824sed 's/^/| /' conftest.$ac_ext >&5
22825
Martin v. Löwis11437992002-04-12 09:54:03 +000022826
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022827 { echo "$as_me:$LINENO: result: no" >&5
22828echo "${ECHO_T}no" >&6; }
22829 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22830echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022832/* confdefs.h. */
22833_ACEOF
22834cat confdefs.h >>conftest.$ac_ext
22835cat >>conftest.$ac_ext <<_ACEOF
22836/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022837
22838# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022839
Martin v. Löwis11437992002-04-12 09:54:03 +000022840int
22841main ()
22842{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022843
22844 char *name;
22845 struct hostent *he;
22846 struct hostent_data data;
22847
22848 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
22850 ;
22851 return 0;
22852}
22853_ACEOF
22854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855if { (ac_try="$ac_compile"
22856case "(($ac_try" in
22857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22858 *) ac_try_echo=$ac_try;;
22859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022863 grep -v '^ *+' conftest.er1 >conftest.err
22864 rm -f conftest.er1
22865 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022867 (exit $ac_status); } && {
22868 test -z "$ac_c_werror_flag" ||
22869 test ! -s conftest.err
22870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022871
22872 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022873#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022874_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022875
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
22877cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022878#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022879_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022881 { echo "$as_me:$LINENO: result: yes" >&5
22882echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022886sed 's/^/| /' conftest.$ac_ext >&5
22887
Martin v. Löwis11437992002-04-12 09:54:03 +000022888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022889 { echo "$as_me:$LINENO: result: no" >&5
22890echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022893
22894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022895
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022897
22898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022899
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022901
22902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022903 CFLAGS=$OLD_CFLAGS
22904
22905else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022906
Martin v. Löwis11437992002-04-12 09:54:03 +000022907
22908for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022909do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022910as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22911{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22912echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022913if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022915else
Martin v. Löwis11437992002-04-12 09:54:03 +000022916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022917/* confdefs.h. */
22918_ACEOF
22919cat confdefs.h >>conftest.$ac_ext
22920cat >>conftest.$ac_ext <<_ACEOF
22921/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022922/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22923 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22924#define $ac_func innocuous_$ac_func
22925
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022926/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022927 which can conflict with char $ac_func (); below.
22928 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022929 <limits.h> exists even on freestanding compilers. */
22930
22931#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022932# include <limits.h>
22933#else
22934# include <assert.h>
22935#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022936
22937#undef $ac_func
22938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022939/* Override any GCC internal prototype to avoid an error.
22940 Use char because int might match the return type of a GCC
22941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022942#ifdef __cplusplus
22943extern "C"
22944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022945char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022946/* The GNU C library defines this for functions which it implements
22947 to always fail with ENOSYS. Some functions are actually named
22948 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022949#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022950choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022951#endif
22952
Skip Montanaro6dead952003-09-25 14:50:04 +000022953int
22954main ()
22955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022956return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022957 ;
22958 return 0;
22959}
22960_ACEOF
22961rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022962if { (ac_try="$ac_link"
22963case "(($ac_try" in
22964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22965 *) ac_try_echo=$ac_try;;
22966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022968 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022970 grep -v '^ *+' conftest.er1 >conftest.err
22971 rm -f conftest.er1
22972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022974 (exit $ac_status); } && {
22975 test -z "$ac_c_werror_flag" ||
22976 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022977 } && test -s conftest$ac_exeext &&
22978 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022979 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022982sed 's/^/| /' conftest.$ac_ext >&5
22983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022984 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022986
22987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022988 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022989fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022990ac_res=`eval echo '${'$as_ac_var'}'`
22991 { echo "$as_me:$LINENO: result: $ac_res" >&5
22992echo "${ECHO_T}$ac_res" >&6; }
22993if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022994 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022995#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022997
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022998fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022999done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000
Michael W. Hudson54241132001-12-07 15:38:26 +000023001
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023002fi
23003
Michael W. Hudson54241132001-12-07 15:38:26 +000023004
23005
23006
23007
23008
23009
Guido van Rossum627b2d71993-12-24 10:39:16 +000023010# checks for system services
23011# (none yet)
23012
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023013# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023014{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23015echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023016if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023018else
Martin v. Löwis11437992002-04-12 09:54:03 +000023019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023020/* confdefs.h. */
23021_ACEOF
23022cat confdefs.h >>conftest.$ac_ext
23023cat >>conftest.$ac_ext <<_ACEOF
23024/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023025/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23026 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23027#define __fpu_control innocuous___fpu_control
23028
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023029/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023030 which can conflict with char __fpu_control (); below.
23031 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023032 <limits.h> exists even on freestanding compilers. */
23033
23034#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023035# include <limits.h>
23036#else
23037# include <assert.h>
23038#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023039
23040#undef __fpu_control
23041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023042/* Override any GCC internal prototype to avoid an error.
23043 Use char because int might match the return type of a GCC
23044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023045#ifdef __cplusplus
23046extern "C"
23047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023048char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023049/* The GNU C library defines this for functions which it implements
23050 to always fail with ENOSYS. Some functions are actually named
23051 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023052#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023053choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023054#endif
23055
Skip Montanaro6dead952003-09-25 14:50:04 +000023056int
23057main ()
23058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023059return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 ;
23061 return 0;
23062}
23063_ACEOF
23064rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023065if { (ac_try="$ac_link"
23066case "(($ac_try" in
23067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23068 *) ac_try_echo=$ac_try;;
23069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023071 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023073 grep -v '^ *+' conftest.er1 >conftest.err
23074 rm -f conftest.er1
23075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023077 (exit $ac_status); } && {
23078 test -z "$ac_c_werror_flag" ||
23079 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023080 } && test -s conftest$ac_exeext &&
23081 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023082 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023085sed 's/^/| /' conftest.$ac_ext >&5
23086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023087 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023089
23090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023091 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023092fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023093{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23094echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23095if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023096 :
23097else
Martin v. Löwis11437992002-04-12 09:54:03 +000023098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023099{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23100echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023101if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023103else
Martin v. Löwis11437992002-04-12 09:54:03 +000023104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023105LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023107/* confdefs.h. */
23108_ACEOF
23109cat confdefs.h >>conftest.$ac_ext
23110cat >>conftest.$ac_ext <<_ACEOF
23111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023113/* Override any GCC internal prototype to avoid an error.
23114 Use char because int might match the return type of a GCC
23115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023116#ifdef __cplusplus
23117extern "C"
23118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023119char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023120int
23121main ()
23122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023123return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023124 ;
23125 return 0;
23126}
23127_ACEOF
23128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023129if { (ac_try="$ac_link"
23130case "(($ac_try" in
23131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23132 *) ac_try_echo=$ac_try;;
23133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023137 grep -v '^ *+' conftest.er1 >conftest.err
23138 rm -f conftest.er1
23139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023141 (exit $ac_status); } && {
23142 test -z "$ac_c_werror_flag" ||
23143 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023144 } && test -s conftest$ac_exeext &&
23145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023146 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023149sed 's/^/| /' conftest.$ac_ext >&5
23150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023151 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023153
23154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023156LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023157fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023158{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23159echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23160if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023161 cat >>confdefs.h <<_ACEOF
23162#define HAVE_LIBIEEE 1
23163_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023164
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023165 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023166
Guido van Rossum627b2d71993-12-24 10:39:16 +000023167fi
23168
Michael W. Hudson54241132001-12-07 15:38:26 +000023169
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023170fi
23171
Michael W. Hudson54241132001-12-07 15:38:26 +000023172
Guido van Rossum7f253911997-05-09 02:42:48 +000023173# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023174{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23175echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023177# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023178if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023179 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023180if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023181then
23182
23183cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023184#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023185_ACEOF
23186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023187 { echo "$as_me:$LINENO: result: yes" >&5
23188echo "${ECHO_T}yes" >&6; }
23189else { echo "$as_me:$LINENO: result: no" >&5
23190echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023191fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023193 { echo "$as_me:$LINENO: result: no" >&5
23194echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023195fi
23196
Guido van Rossum7f253911997-05-09 02:42:48 +000023197
Guido van Rossum7f43da71994-08-01 12:15:30 +000023198# check for --with-libm=...
23199
Guido van Rossum563e7081996-09-10 18:20:48 +000023200case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023201Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023202*) LIBM=-lm
23203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023204{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23205echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023207# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023208if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023209 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023210if test "$withval" = no
23211then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023212 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23213echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023214elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023215then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023216 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23217echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23218else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23219echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023220 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023221fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023223 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23224echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023225fi
23226
Guido van Rossum7f43da71994-08-01 12:15:30 +000023227
23228# check for --with-libc=...
23229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023230{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23231echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023233# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023234if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023235 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023236if test "$withval" = no
23237then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023238 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23239echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023240elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023241then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023242 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23243echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23244else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23245echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023246 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023247fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023249 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23250echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023251fi
23252
Guido van Rossum7f43da71994-08-01 12:15:30 +000023253
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023254# **************************************************
23255# * Check for various properties of floating point *
23256# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023257
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023258{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23259echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023260if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023261 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023262else
23263
23264if test "$cross_compiling" = yes; then
23265 ac_cv_little_endian_double=no
23266else
23267 cat >conftest.$ac_ext <<_ACEOF
23268/* confdefs.h. */
23269_ACEOF
23270cat confdefs.h >>conftest.$ac_ext
23271cat >>conftest.$ac_ext <<_ACEOF
23272/* end confdefs.h. */
23273
23274#include <string.h>
23275int main() {
23276 double x = 9006104071832581.0;
23277 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23278 return 0;
23279 else
23280 return 1;
23281}
23282
23283_ACEOF
23284rm -f conftest$ac_exeext
23285if { (ac_try="$ac_link"
23286case "(($ac_try" in
23287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23288 *) ac_try_echo=$ac_try;;
23289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023291 (eval "$ac_link") 2>&5
23292 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23295 { (case "(($ac_try" in
23296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23297 *) ac_try_echo=$ac_try;;
23298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023300 (eval "$ac_try") 2>&5
23301 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023303 (exit $ac_status); }; }; then
23304 ac_cv_little_endian_double=yes
23305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023306 echo "$as_me: program exited with status $ac_status" >&5
23307echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023308sed 's/^/| /' conftest.$ac_ext >&5
23309
23310( exit $ac_status )
23311ac_cv_little_endian_double=no
23312fi
23313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23314fi
23315
23316
23317fi
23318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023319{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23320echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023321if test "$ac_cv_little_endian_double" = yes
23322then
23323
23324cat >>confdefs.h <<\_ACEOF
23325#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23326_ACEOF
23327
23328fi
23329
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023330{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23331echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023332if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023333 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023334else
23335
23336if test "$cross_compiling" = yes; then
23337 ac_cv_big_endian_double=no
23338else
23339 cat >conftest.$ac_ext <<_ACEOF
23340/* confdefs.h. */
23341_ACEOF
23342cat confdefs.h >>conftest.$ac_ext
23343cat >>conftest.$ac_ext <<_ACEOF
23344/* end confdefs.h. */
23345
23346#include <string.h>
23347int main() {
23348 double x = 9006104071832581.0;
23349 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23350 return 0;
23351 else
23352 return 1;
23353}
23354
23355_ACEOF
23356rm -f conftest$ac_exeext
23357if { (ac_try="$ac_link"
23358case "(($ac_try" in
23359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23360 *) ac_try_echo=$ac_try;;
23361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023363 (eval "$ac_link") 2>&5
23364 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23367 { (case "(($ac_try" in
23368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23369 *) ac_try_echo=$ac_try;;
23370esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023372 (eval "$ac_try") 2>&5
23373 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023375 (exit $ac_status); }; }; then
23376 ac_cv_big_endian_double=yes
23377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023378 echo "$as_me: program exited with status $ac_status" >&5
23379echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023380sed 's/^/| /' conftest.$ac_ext >&5
23381
23382( exit $ac_status )
23383ac_cv_big_endian_double=no
23384fi
23385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23386fi
23387
23388
23389fi
23390
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023391{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23392echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023393if test "$ac_cv_big_endian_double" = yes
23394then
23395
23396cat >>confdefs.h <<\_ACEOF
23397#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23398_ACEOF
23399
23400fi
23401
23402# Some ARM platforms use a mixed-endian representation for doubles.
23403# While Python doesn't currently have full support for these platforms
23404# (see e.g., issue 1762561), we can at least make sure that float <-> string
23405# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023406{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23407echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023408if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023409 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023410else
23411
23412if test "$cross_compiling" = yes; then
23413 ac_cv_mixed_endian_double=no
23414else
23415 cat >conftest.$ac_ext <<_ACEOF
23416/* confdefs.h. */
23417_ACEOF
23418cat confdefs.h >>conftest.$ac_ext
23419cat >>conftest.$ac_ext <<_ACEOF
23420/* end confdefs.h. */
23421
23422#include <string.h>
23423int main() {
23424 double x = 9006104071832581.0;
23425 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23426 return 0;
23427 else
23428 return 1;
23429}
23430
23431_ACEOF
23432rm -f conftest$ac_exeext
23433if { (ac_try="$ac_link"
23434case "(($ac_try" in
23435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23436 *) ac_try_echo=$ac_try;;
23437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023439 (eval "$ac_link") 2>&5
23440 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23443 { (case "(($ac_try" in
23444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23445 *) ac_try_echo=$ac_try;;
23446esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023448 (eval "$ac_try") 2>&5
23449 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023451 (exit $ac_status); }; }; then
23452 ac_cv_mixed_endian_double=yes
23453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023454 echo "$as_me: program exited with status $ac_status" >&5
23455echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023456sed 's/^/| /' conftest.$ac_ext >&5
23457
23458( exit $ac_status )
23459ac_cv_mixed_endian_double=no
23460fi
23461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23462fi
23463
23464
23465fi
23466
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023467{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23468echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023469if test "$ac_cv_mixed_endian_double" = yes
23470then
23471
23472cat >>confdefs.h <<\_ACEOF
23473#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23474_ACEOF
23475
23476fi
23477
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023478# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023479# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023480# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023481# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023482# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023483# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023484
23485# This inline assembler syntax may also work for suncc and icc,
23486# so we try it on all platforms.
23487
23488{ 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 +000023489echo $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 +000023490cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023491/* confdefs.h. */
23492_ACEOF
23493cat confdefs.h >>conftest.$ac_ext
23494cat >>conftest.$ac_ext <<_ACEOF
23495/* end confdefs.h. */
23496
23497int
23498main ()
23499{
23500
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023501 unsigned short cw;
23502 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23503 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023504
23505 ;
23506 return 0;
23507}
23508_ACEOF
23509rm -f conftest.$ac_objext
23510if { (ac_try="$ac_compile"
23511case "(($ac_try" in
23512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23513 *) ac_try_echo=$ac_try;;
23514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023516 (eval "$ac_compile") 2>conftest.er1
23517 ac_status=$?
23518 grep -v '^ *+' conftest.er1 >conftest.err
23519 rm -f conftest.er1
23520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023522 (exit $ac_status); } && {
23523 test -z "$ac_c_werror_flag" ||
23524 test ! -s conftest.err
23525 } && test -s conftest.$ac_objext; then
23526 have_gcc_asm_for_x87=yes
23527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023528 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023529sed 's/^/| /' conftest.$ac_ext >&5
23530
23531 have_gcc_asm_for_x87=no
23532fi
23533
23534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023535{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023536echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023537if test "$have_gcc_asm_for_x87" = yes
23538then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023539
23540cat >>confdefs.h <<\_ACEOF
23541#define HAVE_GCC_ASM_FOR_X87 1
23542_ACEOF
23543
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023545
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023546# Detect whether system arithmetic is subject to x87-style double
23547# rounding issues. The result of this test has little meaning on non
23548# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23549# mode is round-to-nearest and double rounding issues are present, and
23550# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023551{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23552echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023553# $BASECFLAGS may affect the result
23554ac_save_cc="$CC"
23555CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023556if test "$cross_compiling" = yes; then
23557 ac_cv_x87_double_rounding=no
23558else
23559 cat >conftest.$ac_ext <<_ACEOF
23560/* confdefs.h. */
23561_ACEOF
23562cat confdefs.h >>conftest.$ac_ext
23563cat >>conftest.$ac_ext <<_ACEOF
23564/* end confdefs.h. */
23565
23566#include <stdlib.h>
23567#include <math.h>
23568int main() {
23569 volatile double x, y, z;
23570 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23571 x = 0.99999999999999989; /* 1-2**-53 */
23572 y = 1./x;
23573 if (y != 1.)
23574 exit(0);
23575 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23576 x = 1e16;
23577 y = 2.99999;
23578 z = x + y;
23579 if (z != 1e16+4.)
23580 exit(0);
23581 /* both tests show evidence of double rounding */
23582 exit(1);
23583}
23584
23585_ACEOF
23586rm -f conftest$ac_exeext
23587if { (ac_try="$ac_link"
23588case "(($ac_try" in
23589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23590 *) ac_try_echo=$ac_try;;
23591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023593 (eval "$ac_link") 2>&5
23594 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23597 { (case "(($ac_try" in
23598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23599 *) ac_try_echo=$ac_try;;
23600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023602 (eval "$ac_try") 2>&5
23603 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023605 (exit $ac_status); }; }; then
23606 ac_cv_x87_double_rounding=no
23607else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023608 echo "$as_me: program exited with status $ac_status" >&5
23609echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023610sed 's/^/| /' conftest.$ac_ext >&5
23611
23612( exit $ac_status )
23613ac_cv_x87_double_rounding=yes
23614fi
23615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23616fi
23617
23618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023619CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023620{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23621echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023622if test "$ac_cv_x87_double_rounding" = yes
23623then
23624
23625cat >>confdefs.h <<\_ACEOF
23626#define X87_DOUBLE_ROUNDING 1
23627_ACEOF
23628
23629fi
23630
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023631# ************************************
23632# * Check for mathematical functions *
23633# ************************************
23634
23635LIBS_SAVE=$LIBS
23636LIBS="$LIBS $LIBM"
23637
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023638# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23639# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023640{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23641echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023642if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023643 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023644else
23645
23646if test "$cross_compiling" = yes; then
23647 ac_cv_tanh_preserves_zero_sign=no
23648else
23649 cat >conftest.$ac_ext <<_ACEOF
23650/* confdefs.h. */
23651_ACEOF
23652cat confdefs.h >>conftest.$ac_ext
23653cat >>conftest.$ac_ext <<_ACEOF
23654/* end confdefs.h. */
23655
23656#include <math.h>
23657#include <stdlib.h>
23658int main() {
23659 /* return 0 if either negative zeros don't exist
23660 on this platform or if negative zeros exist
23661 and tanh(-0.) == -0. */
23662 if (atan2(0., -1.) == atan2(-0., -1.) ||
23663 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23664 else exit(1);
23665}
23666
23667_ACEOF
23668rm -f conftest$ac_exeext
23669if { (ac_try="$ac_link"
23670case "(($ac_try" in
23671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23672 *) ac_try_echo=$ac_try;;
23673esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023675 (eval "$ac_link") 2>&5
23676 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23679 { (case "(($ac_try" in
23680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23681 *) ac_try_echo=$ac_try;;
23682esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023684 (eval "$ac_try") 2>&5
23685 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023687 (exit $ac_status); }; }; then
23688 ac_cv_tanh_preserves_zero_sign=yes
23689else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023690 echo "$as_me: program exited with status $ac_status" >&5
23691echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023692sed 's/^/| /' conftest.$ac_ext >&5
23693
23694( exit $ac_status )
23695ac_cv_tanh_preserves_zero_sign=no
23696fi
23697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23698fi
23699
23700
23701fi
23702
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023703{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23704echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023705if test "$ac_cv_tanh_preserves_zero_sign" = yes
23706then
23707
23708cat >>confdefs.h <<\_ACEOF
23709#define TANH_PRESERVES_ZERO_SIGN 1
23710_ACEOF
23711
23712fi
23713
23714
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023715
Michael W. Hudson54241132001-12-07 15:38:26 +000023716
Christian Heimes99170a52007-12-19 02:07:34 +000023717
23718
23719
23720
23721
Mark Dickinsonf2537862009-04-18 13:58:18 +000023722
Mark Dickinson9c113362009-09-05 10:36:23 +000023723for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23724do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023725as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23726{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23727echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023728if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023729 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023730else
23731 cat >conftest.$ac_ext <<_ACEOF
23732/* confdefs.h. */
23733_ACEOF
23734cat confdefs.h >>conftest.$ac_ext
23735cat >>conftest.$ac_ext <<_ACEOF
23736/* end confdefs.h. */
23737/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23738 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23739#define $ac_func innocuous_$ac_func
23740
23741/* System header to define __stub macros and hopefully few prototypes,
23742 which can conflict with char $ac_func (); below.
23743 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23744 <limits.h> exists even on freestanding compilers. */
23745
23746#ifdef __STDC__
23747# include <limits.h>
23748#else
23749# include <assert.h>
23750#endif
23751
23752#undef $ac_func
23753
23754/* Override any GCC internal prototype to avoid an error.
23755 Use char because int might match the return type of a GCC
23756 builtin and then its argument prototype would still apply. */
23757#ifdef __cplusplus
23758extern "C"
23759#endif
23760char $ac_func ();
23761/* The GNU C library defines this for functions which it implements
23762 to always fail with ENOSYS. Some functions are actually named
23763 something starting with __ and the normal name is an alias. */
23764#if defined __stub_$ac_func || defined __stub___$ac_func
23765choke me
23766#endif
23767
23768int
23769main ()
23770{
23771return $ac_func ();
23772 ;
23773 return 0;
23774}
23775_ACEOF
23776rm -f conftest.$ac_objext conftest$ac_exeext
23777if { (ac_try="$ac_link"
23778case "(($ac_try" in
23779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23780 *) ac_try_echo=$ac_try;;
23781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023783 (eval "$ac_link") 2>conftest.er1
23784 ac_status=$?
23785 grep -v '^ *+' conftest.er1 >conftest.err
23786 rm -f conftest.er1
23787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023789 (exit $ac_status); } && {
23790 test -z "$ac_c_werror_flag" ||
23791 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023792 } && test -s conftest$ac_exeext &&
23793 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023794 eval "$as_ac_var=yes"
23795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023796 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023797sed 's/^/| /' conftest.$ac_ext >&5
23798
23799 eval "$as_ac_var=no"
23800fi
23801
23802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23803 conftest$ac_exeext conftest.$ac_ext
23804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023805ac_res=`eval echo '${'$as_ac_var'}'`
23806 { echo "$as_me:$LINENO: result: $ac_res" >&5
23807echo "${ECHO_T}$ac_res" >&6; }
23808if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023809 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023810#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023811_ACEOF
23812
23813fi
23814done
23815
23816
23817
23818
23819
23820
23821for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023822do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23824{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023826if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023827 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023828else
23829 cat >conftest.$ac_ext <<_ACEOF
23830/* confdefs.h. */
23831_ACEOF
23832cat confdefs.h >>conftest.$ac_ext
23833cat >>conftest.$ac_ext <<_ACEOF
23834/* end confdefs.h. */
23835/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23836 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23837#define $ac_func innocuous_$ac_func
23838
23839/* System header to define __stub macros and hopefully few prototypes,
23840 which can conflict with char $ac_func (); below.
23841 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23842 <limits.h> exists even on freestanding compilers. */
23843
23844#ifdef __STDC__
23845# include <limits.h>
23846#else
23847# include <assert.h>
23848#endif
23849
23850#undef $ac_func
23851
23852/* Override any GCC internal prototype to avoid an error.
23853 Use char because int might match the return type of a GCC
23854 builtin and then its argument prototype would still apply. */
23855#ifdef __cplusplus
23856extern "C"
23857#endif
23858char $ac_func ();
23859/* The GNU C library defines this for functions which it implements
23860 to always fail with ENOSYS. Some functions are actually named
23861 something starting with __ and the normal name is an alias. */
23862#if defined __stub_$ac_func || defined __stub___$ac_func
23863choke me
23864#endif
23865
23866int
23867main ()
23868{
23869return $ac_func ();
23870 ;
23871 return 0;
23872}
23873_ACEOF
23874rm -f conftest.$ac_objext conftest$ac_exeext
23875if { (ac_try="$ac_link"
23876case "(($ac_try" in
23877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23878 *) ac_try_echo=$ac_try;;
23879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023881 (eval "$ac_link") 2>conftest.er1
23882 ac_status=$?
23883 grep -v '^ *+' conftest.er1 >conftest.err
23884 rm -f conftest.er1
23885 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023887 (exit $ac_status); } && {
23888 test -z "$ac_c_werror_flag" ||
23889 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023890 } && test -s conftest$ac_exeext &&
23891 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023892 eval "$as_ac_var=yes"
23893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023894 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023895sed 's/^/| /' conftest.$ac_ext >&5
23896
23897 eval "$as_ac_var=no"
23898fi
23899
23900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23901 conftest$ac_exeext conftest.$ac_ext
23902fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023903ac_res=`eval echo '${'$as_ac_var'}'`
23904 { echo "$as_me:$LINENO: result: $ac_res" >&5
23905echo "${ECHO_T}$ac_res" >&6; }
23906if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023907 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023908#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023909_ACEOF
23910
23911fi
23912done
23913
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023914{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23915echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023916if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023917 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023918else
23919 cat >conftest.$ac_ext <<_ACEOF
23920/* confdefs.h. */
23921_ACEOF
23922cat confdefs.h >>conftest.$ac_ext
23923cat >>conftest.$ac_ext <<_ACEOF
23924/* end confdefs.h. */
23925#include <math.h>
23926
23927int
23928main ()
23929{
23930#ifndef isinf
23931 (void) isinf;
23932#endif
23933
23934 ;
23935 return 0;
23936}
23937_ACEOF
23938rm -f conftest.$ac_objext
23939if { (ac_try="$ac_compile"
23940case "(($ac_try" in
23941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23942 *) ac_try_echo=$ac_try;;
23943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023945 (eval "$ac_compile") 2>conftest.er1
23946 ac_status=$?
23947 grep -v '^ *+' conftest.er1 >conftest.err
23948 rm -f conftest.er1
23949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023951 (exit $ac_status); } && {
23952 test -z "$ac_c_werror_flag" ||
23953 test ! -s conftest.err
23954 } && test -s conftest.$ac_objext; then
23955 ac_cv_have_decl_isinf=yes
23956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023957 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023958sed 's/^/| /' conftest.$ac_ext >&5
23959
23960 ac_cv_have_decl_isinf=no
23961fi
23962
23963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23964fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023965{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23966echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23967if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023968
23969cat >>confdefs.h <<_ACEOF
23970#define HAVE_DECL_ISINF 1
23971_ACEOF
23972
23973
23974else
23975 cat >>confdefs.h <<_ACEOF
23976#define HAVE_DECL_ISINF 0
23977_ACEOF
23978
23979
23980fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023981{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23982echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023983if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023984 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023985else
23986 cat >conftest.$ac_ext <<_ACEOF
23987/* confdefs.h. */
23988_ACEOF
23989cat confdefs.h >>conftest.$ac_ext
23990cat >>conftest.$ac_ext <<_ACEOF
23991/* end confdefs.h. */
23992#include <math.h>
23993
23994int
23995main ()
23996{
23997#ifndef isnan
23998 (void) isnan;
23999#endif
24000
24001 ;
24002 return 0;
24003}
24004_ACEOF
24005rm -f conftest.$ac_objext
24006if { (ac_try="$ac_compile"
24007case "(($ac_try" in
24008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24009 *) ac_try_echo=$ac_try;;
24010esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024012 (eval "$ac_compile") 2>conftest.er1
24013 ac_status=$?
24014 grep -v '^ *+' conftest.er1 >conftest.err
24015 rm -f conftest.er1
24016 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024018 (exit $ac_status); } && {
24019 test -z "$ac_c_werror_flag" ||
24020 test ! -s conftest.err
24021 } && test -s conftest.$ac_objext; then
24022 ac_cv_have_decl_isnan=yes
24023else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024024 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024025sed 's/^/| /' conftest.$ac_ext >&5
24026
24027 ac_cv_have_decl_isnan=no
24028fi
24029
24030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24031fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024032{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24033echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24034if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024035
24036cat >>confdefs.h <<_ACEOF
24037#define HAVE_DECL_ISNAN 1
24038_ACEOF
24039
24040
24041else
24042 cat >>confdefs.h <<_ACEOF
24043#define HAVE_DECL_ISNAN 0
24044_ACEOF
24045
24046
24047fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024048{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24049echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024050if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024052else
24053 cat >conftest.$ac_ext <<_ACEOF
24054/* confdefs.h. */
24055_ACEOF
24056cat confdefs.h >>conftest.$ac_ext
24057cat >>conftest.$ac_ext <<_ACEOF
24058/* end confdefs.h. */
24059#include <math.h>
24060
24061int
24062main ()
24063{
24064#ifndef isfinite
24065 (void) isfinite;
24066#endif
24067
24068 ;
24069 return 0;
24070}
24071_ACEOF
24072rm -f conftest.$ac_objext
24073if { (ac_try="$ac_compile"
24074case "(($ac_try" in
24075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24076 *) ac_try_echo=$ac_try;;
24077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024079 (eval "$ac_compile") 2>conftest.er1
24080 ac_status=$?
24081 grep -v '^ *+' conftest.er1 >conftest.err
24082 rm -f conftest.er1
24083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024085 (exit $ac_status); } && {
24086 test -z "$ac_c_werror_flag" ||
24087 test ! -s conftest.err
24088 } && test -s conftest.$ac_objext; then
24089 ac_cv_have_decl_isfinite=yes
24090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024091 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024092sed 's/^/| /' conftest.$ac_ext >&5
24093
24094 ac_cv_have_decl_isfinite=no
24095fi
24096
24097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24098fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024099{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24100echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24101if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024102
24103cat >>confdefs.h <<_ACEOF
24104#define HAVE_DECL_ISFINITE 1
24105_ACEOF
24106
24107
24108else
24109 cat >>confdefs.h <<_ACEOF
24110#define HAVE_DECL_ISFINITE 0
24111_ACEOF
24112
24113
24114fi
24115
24116
Christian Heimes99170a52007-12-19 02:07:34 +000024117
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024118LIBS=$LIBS_SAVE
24119
Mark Dickinsona614f042009-11-28 12:48:43 +000024120# For multiprocessing module, check that sem_open
24121# actually works. For FreeBSD versions <= 7.2,
24122# the kernel module that provides POSIX semaphores
24123# isn't loaded by default, so an attempt to call
24124# sem_open results in a 'Signal 12' error.
24125{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24126echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24127if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24128 echo $ECHO_N "(cached) $ECHO_C" >&6
24129else
24130 if test "$cross_compiling" = yes; then
24131 ac_cv_posix_semaphores_enabled=yes
24132else
24133 cat >conftest.$ac_ext <<_ACEOF
24134/* confdefs.h. */
24135_ACEOF
24136cat confdefs.h >>conftest.$ac_ext
24137cat >>conftest.$ac_ext <<_ACEOF
24138/* end confdefs.h. */
24139
24140#include <unistd.h>
24141#include <fcntl.h>
24142#include <stdio.h>
24143#include <semaphore.h>
24144#include <sys/stat.h>
24145
24146int main(void) {
24147 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24148 if (a == SEM_FAILED) {
24149 perror("sem_open");
24150 return 1;
24151 }
24152 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024153 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024154 return 0;
24155}
24156
24157_ACEOF
24158rm -f conftest$ac_exeext
24159if { (ac_try="$ac_link"
24160case "(($ac_try" in
24161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24162 *) ac_try_echo=$ac_try;;
24163esac
24164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24165 (eval "$ac_link") 2>&5
24166 ac_status=$?
24167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24168 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24169 { (case "(($ac_try" in
24170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24171 *) ac_try_echo=$ac_try;;
24172esac
24173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24174 (eval "$ac_try") 2>&5
24175 ac_status=$?
24176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24177 (exit $ac_status); }; }; then
24178 ac_cv_posix_semaphores_enabled=yes
24179else
24180 echo "$as_me: program exited with status $ac_status" >&5
24181echo "$as_me: failed program was:" >&5
24182sed 's/^/| /' conftest.$ac_ext >&5
24183
24184( exit $ac_status )
24185ac_cv_posix_semaphores_enabled=no
24186fi
24187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24188fi
24189
24190
24191
24192fi
24193
24194{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24195echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24196if test $ac_cv_posix_semaphores_enabled = no
24197then
24198
24199cat >>confdefs.h <<\_ACEOF
24200#define POSIX_SEMAPHORES_NOT_ENABLED 1
24201_ACEOF
24202
24203fi
24204
Mark Dickinson10683072009-04-18 21:18:19 +000024205# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024206{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24207echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024208if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024209 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024210else
24211 if test "$cross_compiling" = yes; then
24212 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024213else
24214 cat >conftest.$ac_ext <<_ACEOF
24215/* confdefs.h. */
24216_ACEOF
24217cat confdefs.h >>conftest.$ac_ext
24218cat >>conftest.$ac_ext <<_ACEOF
24219/* end confdefs.h. */
24220
24221#include <unistd.h>
24222#include <fcntl.h>
24223#include <stdio.h>
24224#include <semaphore.h>
24225#include <sys/stat.h>
24226
24227int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024228 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024229 int count;
24230 int res;
24231 if(a==SEM_FAILED){
24232 perror("sem_open");
24233 return 1;
24234
24235 }
24236 res = sem_getvalue(a, &count);
24237 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024238 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024239 return res==-1 ? 1 : 0;
24240}
24241
Mark Dickinson10683072009-04-18 21:18:19 +000024242_ACEOF
24243rm -f conftest$ac_exeext
24244if { (ac_try="$ac_link"
24245case "(($ac_try" in
24246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24247 *) ac_try_echo=$ac_try;;
24248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024250 (eval "$ac_link") 2>&5
24251 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24254 { (case "(($ac_try" in
24255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24256 *) ac_try_echo=$ac_try;;
24257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024259 (eval "$ac_try") 2>&5
24260 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024262 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024263 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024265 echo "$as_me: program exited with status $ac_status" >&5
24266echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024267sed 's/^/| /' conftest.$ac_ext >&5
24268
24269( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024270ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024271fi
24272rm -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 +000024273fi
24274
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024275
24276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024277fi
24278
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024279{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24280echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024281if test $ac_cv_broken_sem_getvalue = yes
24282then
24283
24284cat >>confdefs.h <<\_ACEOF
24285#define HAVE_BROKEN_SEM_GETVALUE 1
24286_ACEOF
24287
24288fi
24289
Mark Dickinsonbd792642009-03-18 20:06:12 +000024290# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024291{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24292echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024293# Check whether --enable-big-digits was given.
24294if test "${enable_big_digits+set}" = set; then
24295 enableval=$enable_big_digits; case $enable_big_digits in
24296yes)
24297 enable_big_digits=30 ;;
24298no)
24299 enable_big_digits=15 ;;
2430015|30)
24301 ;;
24302*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024303 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24304echo "$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 +000024305 { (exit 1); exit 1; }; } ;;
24306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024307{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24308echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024309
24310cat >>confdefs.h <<_ACEOF
24311#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24312_ACEOF
24313
24314
24315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316 { echo "$as_me:$LINENO: result: no value specified" >&5
24317echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024318fi
24319
24320
Guido van Rossumef2255b2000-03-10 22:30:29 +000024321# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024322if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24324echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024325if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024327fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24329echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024330else
Martin v. Löwis11437992002-04-12 09:54:03 +000024331 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024332{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24333echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024335/* confdefs.h. */
24336_ACEOF
24337cat confdefs.h >>conftest.$ac_ext
24338cat >>conftest.$ac_ext <<_ACEOF
24339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024340$ac_includes_default
24341#include <wchar.h>
24342_ACEOF
24343rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344if { (ac_try="$ac_compile"
24345case "(($ac_try" in
24346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24347 *) ac_try_echo=$ac_try;;
24348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024352 grep -v '^ *+' conftest.er1 >conftest.err
24353 rm -f conftest.er1
24354 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024356 (exit $ac_status); } && {
24357 test -z "$ac_c_werror_flag" ||
24358 test ! -s conftest.err
24359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024360 ac_header_compiler=yes
24361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024363sed 's/^/| /' conftest.$ac_ext >&5
24364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024365 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024367
24368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24370echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024371
24372# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024373{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24374echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024376/* confdefs.h. */
24377_ACEOF
24378cat confdefs.h >>conftest.$ac_ext
24379cat >>conftest.$ac_ext <<_ACEOF
24380/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024381#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024382_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383if { (ac_try="$ac_cpp conftest.$ac_ext"
24384case "(($ac_try" in
24385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24386 *) ac_try_echo=$ac_try;;
24387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024391 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 rm -f conftest.er1
24393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024395 (exit $ac_status); } >/dev/null && {
24396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24397 test ! -s conftest.err
24398 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024399 ac_header_preproc=yes
24400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024402sed 's/^/| /' conftest.$ac_ext >&5
24403
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406
Martin v. Löwis11437992002-04-12 09:54:03 +000024407rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024408{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24409echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024410
24411# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024412case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24413 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024414 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24415echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24416 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24417echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024418 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024419 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024420 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024421 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24422echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24423 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24424echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24425 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24426echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24427 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24428echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24429 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24430echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24431 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24432echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024433 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024434## -------------------------------------- ##
24435## Report this to http://bugs.python.org/ ##
24436## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024437_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024438 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024439 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024441{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24442echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024443if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024444 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024445else
24446 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024448{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24449echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024450
24451fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024452if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024453
24454
24455cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024456#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024457_ACEOF
24458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024459 wchar_h="yes"
24460
Guido van Rossumef2255b2000-03-10 22:30:29 +000024461else
Martin v. Löwis11437992002-04-12 09:54:03 +000024462 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024463
24464fi
24465
Michael W. Hudson54241132001-12-07 15:38:26 +000024466
Martin v. Löwis11437992002-04-12 09:54:03 +000024467
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024468# determine wchar_t size
24469if test "$wchar_h" = yes
24470then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024471 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24472echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24473if test "${ac_cv_type_wchar_t+set}" = set; then
24474 echo $ECHO_N "(cached) $ECHO_C" >&6
24475else
24476 cat >conftest.$ac_ext <<_ACEOF
24477/* confdefs.h. */
24478_ACEOF
24479cat confdefs.h >>conftest.$ac_ext
24480cat >>conftest.$ac_ext <<_ACEOF
24481/* end confdefs.h. */
24482#include <wchar.h>
24483
24484typedef wchar_t ac__type_new_;
24485int
24486main ()
24487{
24488if ((ac__type_new_ *) 0)
24489 return 0;
24490if (sizeof (ac__type_new_))
24491 return 0;
24492 ;
24493 return 0;
24494}
24495_ACEOF
24496rm -f conftest.$ac_objext
24497if { (ac_try="$ac_compile"
24498case "(($ac_try" in
24499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24500 *) ac_try_echo=$ac_try;;
24501esac
24502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24503 (eval "$ac_compile") 2>conftest.er1
24504 ac_status=$?
24505 grep -v '^ *+' conftest.er1 >conftest.err
24506 rm -f conftest.er1
24507 cat conftest.err >&5
24508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24509 (exit $ac_status); } && {
24510 test -z "$ac_c_werror_flag" ||
24511 test ! -s conftest.err
24512 } && test -s conftest.$ac_objext; then
24513 ac_cv_type_wchar_t=yes
24514else
24515 echo "$as_me: failed program was:" >&5
24516sed 's/^/| /' conftest.$ac_ext >&5
24517
24518 ac_cv_type_wchar_t=no
24519fi
24520
24521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24522fi
24523{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24524echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24525
24526# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24529# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024530{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24531echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024532if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024534else
Martin v. Löwis11437992002-04-12 09:54:03 +000024535 if test "$cross_compiling" = yes; then
24536 # Depending upon the size, compute the lo and hi bounds.
24537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024538/* confdefs.h. */
24539_ACEOF
24540cat confdefs.h >>conftest.$ac_ext
24541cat >>conftest.$ac_ext <<_ACEOF
24542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024543#include <wchar.h>
24544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024545 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024546int
24547main ()
24548{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024549static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024550test_array [0] = 0
24551
24552 ;
24553 return 0;
24554}
24555_ACEOF
24556rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557if { (ac_try="$ac_compile"
24558case "(($ac_try" in
24559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24560 *) ac_try_echo=$ac_try;;
24561esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024565 grep -v '^ *+' conftest.er1 >conftest.err
24566 rm -f conftest.er1
24567 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024569 (exit $ac_status); } && {
24570 test -z "$ac_c_werror_flag" ||
24571 test ! -s conftest.err
24572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024573 ac_lo=0 ac_mid=0
24574 while :; do
24575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024576/* confdefs.h. */
24577_ACEOF
24578cat confdefs.h >>conftest.$ac_ext
24579cat >>conftest.$ac_ext <<_ACEOF
24580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024581#include <wchar.h>
24582
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024583 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024584int
24585main ()
24586{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024588test_array [0] = 0
24589
24590 ;
24591 return 0;
24592}
24593_ACEOF
24594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024595if { (ac_try="$ac_compile"
24596case "(($ac_try" in
24597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24598 *) ac_try_echo=$ac_try;;
24599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024603 grep -v '^ *+' conftest.er1 >conftest.err
24604 rm -f conftest.er1
24605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607 (exit $ac_status); } && {
24608 test -z "$ac_c_werror_flag" ||
24609 test ! -s conftest.err
24610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024611 ac_hi=$ac_mid; break
24612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024614sed 's/^/| /' conftest.$ac_ext >&5
24615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024616 ac_lo=`expr $ac_mid + 1`
24617 if test $ac_lo -le $ac_mid; then
24618 ac_lo= ac_hi=
24619 break
24620 fi
24621 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623
24624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024625 done
24626else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024628sed 's/^/| /' conftest.$ac_ext >&5
24629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024631/* confdefs.h. */
24632_ACEOF
24633cat confdefs.h >>conftest.$ac_ext
24634cat >>conftest.$ac_ext <<_ACEOF
24635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024636#include <wchar.h>
24637
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024638 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024639int
24640main ()
24641{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024642static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024643test_array [0] = 0
24644
24645 ;
24646 return 0;
24647}
24648_ACEOF
24649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024650if { (ac_try="$ac_compile"
24651case "(($ac_try" in
24652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24653 *) ac_try_echo=$ac_try;;
24654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024658 grep -v '^ *+' conftest.er1 >conftest.err
24659 rm -f conftest.er1
24660 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024662 (exit $ac_status); } && {
24663 test -z "$ac_c_werror_flag" ||
24664 test ! -s conftest.err
24665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024666 ac_hi=-1 ac_mid=-1
24667 while :; do
24668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024669/* confdefs.h. */
24670_ACEOF
24671cat confdefs.h >>conftest.$ac_ext
24672cat >>conftest.$ac_ext <<_ACEOF
24673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024674#include <wchar.h>
24675
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024676 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024677int
24678main ()
24679{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024681test_array [0] = 0
24682
24683 ;
24684 return 0;
24685}
24686_ACEOF
24687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024688if { (ac_try="$ac_compile"
24689case "(($ac_try" in
24690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24691 *) ac_try_echo=$ac_try;;
24692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024696 grep -v '^ *+' conftest.er1 >conftest.err
24697 rm -f conftest.er1
24698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024700 (exit $ac_status); } && {
24701 test -z "$ac_c_werror_flag" ||
24702 test ! -s conftest.err
24703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024704 ac_lo=$ac_mid; break
24705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024707sed 's/^/| /' conftest.$ac_ext >&5
24708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024709 ac_hi=`expr '(' $ac_mid ')' - 1`
24710 if test $ac_mid -le $ac_hi; then
24711 ac_lo= ac_hi=
24712 break
24713 fi
24714 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024716
24717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024718 done
24719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024721sed 's/^/| /' conftest.$ac_ext >&5
24722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024723 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024725
24726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024728
24729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024730# Binary search between lo and hi bounds.
24731while test "x$ac_lo" != "x$ac_hi"; do
24732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024734/* confdefs.h. */
24735_ACEOF
24736cat confdefs.h >>conftest.$ac_ext
24737cat >>conftest.$ac_ext <<_ACEOF
24738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024739#include <wchar.h>
24740
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024741 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024742int
24743main ()
24744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024746test_array [0] = 0
24747
24748 ;
24749 return 0;
24750}
24751_ACEOF
24752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753if { (ac_try="$ac_compile"
24754case "(($ac_try" in
24755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24756 *) ac_try_echo=$ac_try;;
24757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024761 grep -v '^ *+' conftest.er1 >conftest.err
24762 rm -f conftest.er1
24763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765 (exit $ac_status); } && {
24766 test -z "$ac_c_werror_flag" ||
24767 test ! -s conftest.err
24768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024769 ac_hi=$ac_mid
24770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024772sed 's/^/| /' conftest.$ac_ext >&5
24773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024774 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024776
24777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024778done
24779case $ac_lo in
24780?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024782 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024783See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024784echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024785See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024786 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024787 else
24788 ac_cv_sizeof_wchar_t=0
24789 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024790esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024791else
Martin v. Löwis11437992002-04-12 09:54:03 +000024792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024793/* confdefs.h. */
24794_ACEOF
24795cat confdefs.h >>conftest.$ac_ext
24796cat >>conftest.$ac_ext <<_ACEOF
24797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024798#include <wchar.h>
24799
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024800 typedef wchar_t ac__type_sizeof_;
24801static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24802static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024804#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024805int
24806main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024807{
Martin v. Löwis11437992002-04-12 09:54:03 +000024808
24809 FILE *f = fopen ("conftest.val", "w");
24810 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024812 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024813 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024815 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024818 }
24819 else
24820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024823 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024824 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024825 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024827
24828 ;
24829 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024830}
Martin v. Löwis11437992002-04-12 09:54:03 +000024831_ACEOF
24832rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024833if { (ac_try="$ac_link"
24834case "(($ac_try" in
24835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24836 *) ac_try_echo=$ac_try;;
24837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024839 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024840 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024843 { (case "(($ac_try" in
24844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24845 *) ac_try_echo=$ac_try;;
24846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024848 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024849 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024851 (exit $ac_status); }; }; then
24852 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024854 echo "$as_me: program exited with status $ac_status" >&5
24855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024856sed 's/^/| /' conftest.$ac_ext >&5
24857
Martin v. Löwis11437992002-04-12 09:54:03 +000024858( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024859if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024861See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024862echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024863See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024864 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024865 else
24866 ac_cv_sizeof_wchar_t=0
24867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024869rm -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 +000024870fi
24871rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24874echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875
24876
24877
Martin v. Löwis11437992002-04-12 09:54:03 +000024878cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024879#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024880_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024881
Michael W. Hudson54241132001-12-07 15:38:26 +000024882
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024883fi
24884
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024885{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24886echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024887have_ucs4_tcl=no
24888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024889/* confdefs.h. */
24890_ACEOF
24891cat confdefs.h >>conftest.$ac_ext
24892cat >>conftest.$ac_ext <<_ACEOF
24893/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024894
24895#include <tcl.h>
24896#if TCL_UTF_MAX != 6
24897# error "NOT UCS4_TCL"
24898#endif
24899int
24900main ()
24901{
24902
24903 ;
24904 return 0;
24905}
24906_ACEOF
24907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908if { (ac_try="$ac_compile"
24909case "(($ac_try" in
24910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24911 *) ac_try_echo=$ac_try;;
24912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024916 grep -v '^ *+' conftest.er1 >conftest.err
24917 rm -f conftest.er1
24918 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024920 (exit $ac_status); } && {
24921 test -z "$ac_c_werror_flag" ||
24922 test ! -s conftest.err
24923 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024924
24925
24926cat >>confdefs.h <<\_ACEOF
24927#define HAVE_UCS4_TCL 1
24928_ACEOF
24929
24930 have_ucs4_tcl=yes
24931
24932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024938
24939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024940{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24941echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024942
Skip Montanaro6dead952003-09-25 14:50:04 +000024943# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024944if test "$wchar_h" = yes
24945then
24946 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024947 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24948echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024949 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024950 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024951else
24952
24953 if test "$cross_compiling" = yes; then
24954 ac_cv_wchar_t_signed=yes
24955else
24956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024957/* confdefs.h. */
24958_ACEOF
24959cat confdefs.h >>conftest.$ac_ext
24960cat >>conftest.$ac_ext <<_ACEOF
24961/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024962
24963 #include <wchar.h>
24964 int main()
24965 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024966 /* Success: exit code 0 */
24967 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024968 }
24969
24970_ACEOF
24971rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972if { (ac_try="$ac_link"
24973case "(($ac_try" in
24974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24975 *) ac_try_echo=$ac_try;;
24976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024979 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024982 { (case "(($ac_try" in
24983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24984 *) ac_try_echo=$ac_try;;
24985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024987 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024988 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024990 (exit $ac_status); }; }; then
24991 ac_cv_wchar_t_signed=yes
24992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024993 echo "$as_me: program exited with status $ac_status" >&5
24994echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024995sed 's/^/| /' conftest.$ac_ext >&5
24996
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024997( exit $ac_status )
24998ac_cv_wchar_t_signed=no
24999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025001fi
25002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025004fi
25005
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025006 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25007echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025008fi
25009
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025010{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25011echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025012
25013# Check whether --with-wide-unicode was given.
25014if test "${with_wide_unicode+set}" = set; then
25015 withval=$with_wide_unicode;
25016if test "$withval" != no
25017then unicode_size="4"
25018else unicode_size="2"
25019fi
25020
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025021else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025022
Georg Brandl52d168a2008-01-07 18:10:24 +000025023case "$have_ucs4_tcl" in
25024 yes) unicode_size="4" ;;
25025 *) unicode_size="2" ;;
25026esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025027
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025028fi
25029
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025030
25031
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025032
Georg Brandl52d168a2008-01-07 18:10:24 +000025033case "$unicode_size" in
25034 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025035#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025036_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025037 ;;
25038 *) cat >>confdefs.h <<\_ACEOF
25039#define Py_UNICODE_SIZE 2
25040_ACEOF
25041 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025042esac
25043
Michael W. Hudson54241132001-12-07 15:38:26 +000025044
Martin v. Löwis11437992002-04-12 09:54:03 +000025045
25046
Georg Brandl52d168a2008-01-07 18:10:24 +000025047# wchar_t is only usable if it maps to an unsigned type
25048if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025049 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025050then
25051 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025052
Martin v. Löwis11437992002-04-12 09:54:03 +000025053cat >>confdefs.h <<\_ACEOF
25054#define HAVE_USABLE_WCHAR_T 1
25055_ACEOF
25056
Georg Brandl52d168a2008-01-07 18:10:24 +000025057 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025058#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025059_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025060
Georg Brandl52d168a2008-01-07 18:10:24 +000025061elif test "$ac_cv_sizeof_short" = "$unicode_size"
25062then
25063 PY_UNICODE_TYPE="unsigned short"
25064 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025065#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025066_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025067
Georg Brandl52d168a2008-01-07 18:10:24 +000025068elif test "$ac_cv_sizeof_long" = "$unicode_size"
25069then
25070 PY_UNICODE_TYPE="unsigned long"
25071 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025072#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025073_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025074
Georg Brandl52d168a2008-01-07 18:10:24 +000025075else
25076 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025077fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025078{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25079echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025080
25081# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025082{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25083echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025084if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025087 # See if sys/param.h defines the BYTE_ORDER macro.
25088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025089/* confdefs.h. */
25090_ACEOF
25091cat confdefs.h >>conftest.$ac_ext
25092cat >>conftest.$ac_ext <<_ACEOF
25093/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025094#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025095#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025096
Martin v. Löwis11437992002-04-12 09:54:03 +000025097int
25098main ()
25099{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025100#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25101 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25102 bogus endian macros
25103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025104
25105 ;
25106 return 0;
25107}
25108_ACEOF
25109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025110if { (ac_try="$ac_compile"
25111case "(($ac_try" in
25112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25113 *) ac_try_echo=$ac_try;;
25114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025118 grep -v '^ *+' conftest.er1 >conftest.err
25119 rm -f conftest.er1
25120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025122 (exit $ac_status); } && {
25123 test -z "$ac_c_werror_flag" ||
25124 test ! -s conftest.err
25125 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025126 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025128/* confdefs.h. */
25129_ACEOF
25130cat confdefs.h >>conftest.$ac_ext
25131cat >>conftest.$ac_ext <<_ACEOF
25132/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025133#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025134#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025135
Martin v. Löwis11437992002-04-12 09:54:03 +000025136int
25137main ()
25138{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025139#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025140 not big endian
25141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025142
25143 ;
25144 return 0;
25145}
25146_ACEOF
25147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025148if { (ac_try="$ac_compile"
25149case "(($ac_try" in
25150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25151 *) ac_try_echo=$ac_try;;
25152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025156 grep -v '^ *+' conftest.er1 >conftest.err
25157 rm -f conftest.er1
25158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025160 (exit $ac_status); } && {
25161 test -z "$ac_c_werror_flag" ||
25162 test ! -s conftest.err
25163 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025164 ac_cv_c_bigendian=yes
25165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171
25172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025175sed 's/^/| /' conftest.$ac_ext >&5
25176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177 # It does not; compile a test program.
25178if test "$cross_compiling" = yes; then
25179 # try to guess the endianness by grepping values into an object file
25180 ac_cv_c_bigendian=unknown
25181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025182/* confdefs.h. */
25183_ACEOF
25184cat confdefs.h >>conftest.$ac_ext
25185cat >>conftest.$ac_ext <<_ACEOF
25186/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025187short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25188short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25189void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25190short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25191short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25192void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025193int
25194main ()
25195{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025196 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025197 ;
25198 return 0;
25199}
25200_ACEOF
25201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202if { (ac_try="$ac_compile"
25203case "(($ac_try" in
25204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25205 *) ac_try_echo=$ac_try;;
25206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025210 grep -v '^ *+' conftest.er1 >conftest.err
25211 rm -f conftest.er1
25212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214 (exit $ac_status); } && {
25215 test -z "$ac_c_werror_flag" ||
25216 test ! -s conftest.err
25217 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025218 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025219 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025220fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025221if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25222 if test "$ac_cv_c_bigendian" = unknown; then
25223 ac_cv_c_bigendian=no
25224 else
25225 # finding both strings is unlikely to happen, but who knows?
25226 ac_cv_c_bigendian=unknown
25227 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025228fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025231sed 's/^/| /' conftest.$ac_ext >&5
25232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025233
Martin v. Löwis11437992002-04-12 09:54:03 +000025234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025235
25236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025237else
25238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025239/* confdefs.h. */
25240_ACEOF
25241cat confdefs.h >>conftest.$ac_ext
25242cat >>conftest.$ac_ext <<_ACEOF
25243/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025244$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025245int
25246main ()
25247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025249 /* Are we little or big endian? From Harbison&Steele. */
25250 union
25251 {
25252 long int l;
25253 char c[sizeof (long int)];
25254 } u;
25255 u.l = 1;
25256 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257
25258 ;
25259 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025260}
Martin v. Löwis11437992002-04-12 09:54:03 +000025261_ACEOF
25262rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025263if { (ac_try="$ac_link"
25264case "(($ac_try" in
25265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25266 *) ac_try_echo=$ac_try;;
25267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025269 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025273 { (case "(($ac_try" in
25274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25275 *) ac_try_echo=$ac_try;;
25276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025278 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025279 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025281 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025282 ac_cv_c_bigendian=no
25283else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025284 echo "$as_me: program exited with status $ac_status" >&5
25285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025286sed 's/^/| /' conftest.$ac_ext >&5
25287
Martin v. Löwis11437992002-04-12 09:54:03 +000025288( exit $ac_status )
25289ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025291rm -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 +000025292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025293
25294
Martin v. Löwis11437992002-04-12 09:54:03 +000025295fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025296
25297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25298fi
25299{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25300echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25301case $ac_cv_c_bigendian in
25302 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025303
25304cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025305#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025306_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025307 ;;
25308 no)
25309 ;;
25310 *)
25311 { { echo "$as_me:$LINENO: error: unknown endianness
25312presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25313echo "$as_me: error: unknown endianness
25314presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025315 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025316esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025317
Michael W. Hudson54241132001-12-07 15:38:26 +000025318
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025319# Check whether right shifting a negative integer extends the sign bit
25320# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025321{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25322echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025323if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025324 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025325else
Martin v. Löwis11437992002-04-12 09:54:03 +000025326
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025327if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025328 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025329else
Martin v. Löwis11437992002-04-12 09:54:03 +000025330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025331/* confdefs.h. */
25332_ACEOF
25333cat confdefs.h >>conftest.$ac_ext
25334cat >>conftest.$ac_ext <<_ACEOF
25335/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025336
25337int main()
25338{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025339 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025340}
25341
Martin v. Löwis11437992002-04-12 09:54:03 +000025342_ACEOF
25343rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025344if { (ac_try="$ac_link"
25345case "(($ac_try" in
25346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25347 *) ac_try_echo=$ac_try;;
25348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025350 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025351 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025354 { (case "(($ac_try" in
25355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25356 *) ac_try_echo=$ac_try;;
25357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025359 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025360 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025363 ac_cv_rshift_extends_sign=yes
25364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025365 echo "$as_me: program exited with status $ac_status" >&5
25366echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025367sed 's/^/| /' conftest.$ac_ext >&5
25368
Martin v. Löwis11437992002-04-12 09:54:03 +000025369( exit $ac_status )
25370ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025372rm -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 +000025373fi
25374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025375
25376fi
25377
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025378{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25379echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025380if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025381then
Martin v. Löwis11437992002-04-12 09:54:03 +000025382
25383cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025384#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025385_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025386
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025387fi
25388
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025389# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25391echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025392if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025394else
Martin v. Löwis11437992002-04-12 09:54:03 +000025395
25396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025397/* confdefs.h. */
25398_ACEOF
25399cat confdefs.h >>conftest.$ac_ext
25400cat >>conftest.$ac_ext <<_ACEOF
25401/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025402#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025403int
25404main ()
25405{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025406
25407 FILE *f = fopen("/dev/null", "r");
25408 flockfile(f);
25409 getc_unlocked(f);
25410 funlockfile(f);
25411
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 ;
25413 return 0;
25414}
25415_ACEOF
25416rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417if { (ac_try="$ac_link"
25418case "(($ac_try" in
25419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25420 *) ac_try_echo=$ac_try;;
25421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025425 grep -v '^ *+' conftest.er1 >conftest.err
25426 rm -f conftest.er1
25427 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429 (exit $ac_status); } && {
25430 test -z "$ac_c_werror_flag" ||
25431 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025432 } && test -s conftest$ac_exeext &&
25433 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025434 ac_cv_have_getc_unlocked=yes
25435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025437sed 's/^/| /' conftest.$ac_ext >&5
25438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025439 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441
25442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025443 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025444fi
25445
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025446{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25447echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025448if test "$ac_cv_have_getc_unlocked" = yes
25449then
Martin v. Löwis11437992002-04-12 09:54:03 +000025450
25451cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025452#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025453_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025454
25455fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025456
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025457# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025458# save the value of LIBS so we don't actually link Python with readline
25459LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025460
Gregory P. Smith18820942008-09-07 06:24:49 +000025461# On some systems we need to link readline to a termcap compatible
25462# library. NOTE: Keep the precedence of listed libraries synchronised
25463# with setup.py.
25464py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025465{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25466echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025467for py_libtermcap in "" ncursesw ncurses curses termcap; do
25468 if test -z "$py_libtermcap"; then
25469 READLINE_LIBS="-lreadline"
25470 else
25471 READLINE_LIBS="-lreadline -l$py_libtermcap"
25472 fi
25473 LIBS="$READLINE_LIBS $LIBS_no_readline"
25474 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025475/* confdefs.h. */
25476_ACEOF
25477cat confdefs.h >>conftest.$ac_ext
25478cat >>conftest.$ac_ext <<_ACEOF
25479/* end confdefs.h. */
25480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025481/* Override any GCC internal prototype to avoid an error.
25482 Use char because int might match the return type of a GCC
25483 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025484#ifdef __cplusplus
25485extern "C"
25486#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025487char readline ();
25488int
25489main ()
25490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025492 ;
25493 return 0;
25494}
25495_ACEOF
25496rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025497if { (ac_try="$ac_link"
25498case "(($ac_try" in
25499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25500 *) ac_try_echo=$ac_try;;
25501esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025503 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025504 ac_status=$?
25505 grep -v '^ *+' conftest.er1 >conftest.err
25506 rm -f conftest.er1
25507 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025509 (exit $ac_status); } && {
25510 test -z "$ac_c_werror_flag" ||
25511 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025512 } && test -s conftest$ac_exeext &&
25513 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025514 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025516 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025517sed 's/^/| /' conftest.$ac_ext >&5
25518
Gregory P. Smith18820942008-09-07 06:24:49 +000025519
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025521
25522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025523 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025524 if test $py_cv_lib_readline = yes; then
25525 break
25526 fi
25527done
25528# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25529#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025530if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025531 { echo "$as_me:$LINENO: result: none" >&5
25532echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025534 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25535echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025536
25537cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025538#define HAVE_LIBREADLINE 1
25539_ACEOF
25540
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025541fi
25542
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025543# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025544{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25545echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025546if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025547 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548else
25549 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025550LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025551cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025552/* confdefs.h. */
25553_ACEOF
25554cat confdefs.h >>conftest.$ac_ext
25555cat >>conftest.$ac_ext <<_ACEOF
25556/* end confdefs.h. */
25557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025558/* Override any GCC internal prototype to avoid an error.
25559 Use char because int might match the return type of a GCC
25560 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025561#ifdef __cplusplus
25562extern "C"
25563#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025564char rl_callback_handler_install ();
25565int
25566main ()
25567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025569 ;
25570 return 0;
25571}
25572_ACEOF
25573rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025574if { (ac_try="$ac_link"
25575case "(($ac_try" in
25576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25577 *) ac_try_echo=$ac_try;;
25578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025580 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025582 grep -v '^ *+' conftest.er1 >conftest.err
25583 rm -f conftest.er1
25584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025586 (exit $ac_status); } && {
25587 test -z "$ac_c_werror_flag" ||
25588 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025589 } && test -s conftest$ac_exeext &&
25590 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025591 ac_cv_lib_readline_rl_callback_handler_install=yes
25592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025593 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025594sed 's/^/| /' conftest.$ac_ext >&5
25595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025596 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025598
25599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025601LIBS=$ac_check_lib_save_LIBS
25602fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025603{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25604echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25605if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025606
25607cat >>confdefs.h <<\_ACEOF
25608#define HAVE_RL_CALLBACK 1
25609_ACEOF
25610
25611fi
25612
25613
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025614# check for readline 2.2
25615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025616/* confdefs.h. */
25617_ACEOF
25618cat confdefs.h >>conftest.$ac_ext
25619cat >>conftest.$ac_ext <<_ACEOF
25620/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025621#include <readline/readline.h>
25622_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623if { (ac_try="$ac_cpp conftest.$ac_ext"
25624case "(($ac_try" in
25625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25626 *) ac_try_echo=$ac_try;;
25627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025630 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025631 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025632 rm -f conftest.er1
25633 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025635 (exit $ac_status); } >/dev/null && {
25636 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25637 test ! -s conftest.err
25638 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025639 have_readline=yes
25640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025642sed 's/^/| /' conftest.$ac_ext >&5
25643
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025644 have_readline=no
25645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025646
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025647rm -f conftest.err conftest.$ac_ext
25648if test $have_readline = yes
25649then
25650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025651/* confdefs.h. */
25652_ACEOF
25653cat confdefs.h >>conftest.$ac_ext
25654cat >>conftest.$ac_ext <<_ACEOF
25655/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025656#include <readline/readline.h>
25657
25658_ACEOF
25659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025660 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025661
25662cat >>confdefs.h <<\_ACEOF
25663#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25664_ACEOF
25665
25666fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025667rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025668
Antoine Pitroud5131772009-10-26 19:22:14 +000025669 cat >conftest.$ac_ext <<_ACEOF
25670/* confdefs.h. */
25671_ACEOF
25672cat confdefs.h >>conftest.$ac_ext
25673cat >>conftest.$ac_ext <<_ACEOF
25674/* end confdefs.h. */
25675#include <readline/readline.h>
25676
25677_ACEOF
25678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25679 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25680
25681cat >>confdefs.h <<\_ACEOF
25682#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25683_ACEOF
25684
25685fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025686rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025687
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025688fi
25689
Martin v. Löwis0daad592001-09-30 21:09:59 +000025690# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025691{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25692echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025693if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025695else
Martin v. Löwis11437992002-04-12 09:54:03 +000025696 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025697LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025699/* confdefs.h. */
25700_ACEOF
25701cat confdefs.h >>conftest.$ac_ext
25702cat >>conftest.$ac_ext <<_ACEOF
25703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025705/* Override any GCC internal prototype to avoid an error.
25706 Use char because int might match the return type of a GCC
25707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025708#ifdef __cplusplus
25709extern "C"
25710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025711char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025712int
25713main ()
25714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025715return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025716 ;
25717 return 0;
25718}
25719_ACEOF
25720rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025721if { (ac_try="$ac_link"
25722case "(($ac_try" in
25723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25724 *) ac_try_echo=$ac_try;;
25725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025729 grep -v '^ *+' conftest.er1 >conftest.err
25730 rm -f conftest.er1
25731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025733 (exit $ac_status); } && {
25734 test -z "$ac_c_werror_flag" ||
25735 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025736 } && test -s conftest$ac_exeext &&
25737 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025738 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025739else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025741sed 's/^/| /' conftest.$ac_ext >&5
25742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025743 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745
25746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025748LIBS=$ac_check_lib_save_LIBS
25749fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025750{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25751echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25752if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025753
Martin v. Löwis11437992002-04-12 09:54:03 +000025754cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025755#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025756_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025757
Martin v. Löwis0daad592001-09-30 21:09:59 +000025758fi
25759
Michael W. Hudson54241132001-12-07 15:38:26 +000025760
Thomas Wouters89d996e2007-09-08 17:39:28 +000025761# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025762{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25763echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025764if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025765 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025766else
25767 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025768LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025769cat >conftest.$ac_ext <<_ACEOF
25770/* confdefs.h. */
25771_ACEOF
25772cat confdefs.h >>conftest.$ac_ext
25773cat >>conftest.$ac_ext <<_ACEOF
25774/* end confdefs.h. */
25775
25776/* Override any GCC internal prototype to avoid an error.
25777 Use char because int might match the return type of a GCC
25778 builtin and then its argument prototype would still apply. */
25779#ifdef __cplusplus
25780extern "C"
25781#endif
25782char rl_completion_display_matches_hook ();
25783int
25784main ()
25785{
25786return rl_completion_display_matches_hook ();
25787 ;
25788 return 0;
25789}
25790_ACEOF
25791rm -f conftest.$ac_objext conftest$ac_exeext
25792if { (ac_try="$ac_link"
25793case "(($ac_try" in
25794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25795 *) ac_try_echo=$ac_try;;
25796esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025798 (eval "$ac_link") 2>conftest.er1
25799 ac_status=$?
25800 grep -v '^ *+' conftest.er1 >conftest.err
25801 rm -f conftest.er1
25802 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025804 (exit $ac_status); } && {
25805 test -z "$ac_c_werror_flag" ||
25806 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025807 } && test -s conftest$ac_exeext &&
25808 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025809 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25810else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025811 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025812sed 's/^/| /' conftest.$ac_ext >&5
25813
25814 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25815fi
25816
25817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25818 conftest$ac_exeext conftest.$ac_ext
25819LIBS=$ac_check_lib_save_LIBS
25820fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025821{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25822echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25823if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025824
25825cat >>confdefs.h <<\_ACEOF
25826#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25827_ACEOF
25828
25829fi
25830
25831
Martin v. Löwis0daad592001-09-30 21:09:59 +000025832# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025833{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25834echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025835if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025837else
Martin v. Löwis11437992002-04-12 09:54:03 +000025838 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025839LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025841/* confdefs.h. */
25842_ACEOF
25843cat confdefs.h >>conftest.$ac_ext
25844cat >>conftest.$ac_ext <<_ACEOF
25845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025847/* Override any GCC internal prototype to avoid an error.
25848 Use char because int might match the return type of a GCC
25849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025850#ifdef __cplusplus
25851extern "C"
25852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025853char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025854int
25855main ()
25856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025858 ;
25859 return 0;
25860}
25861_ACEOF
25862rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025863if { (ac_try="$ac_link"
25864case "(($ac_try" in
25865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25866 *) ac_try_echo=$ac_try;;
25867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025869 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025871 grep -v '^ *+' conftest.er1 >conftest.err
25872 rm -f conftest.er1
25873 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025875 (exit $ac_status); } && {
25876 test -z "$ac_c_werror_flag" ||
25877 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025878 } && test -s conftest$ac_exeext &&
25879 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025880 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025881else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025883sed 's/^/| /' conftest.$ac_ext >&5
25884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025885 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025887
25888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025890LIBS=$ac_check_lib_save_LIBS
25891fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025892{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25893echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25894if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025895
Martin v. Löwis11437992002-04-12 09:54:03 +000025896cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025897#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025898_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025899
Guido van Rossum353ae582001-07-10 16:45:32 +000025900fi
25901
Jack Jansendd19cf82001-12-06 22:36:17 +000025902
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025903# also in readline 4.2
25904cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025905/* confdefs.h. */
25906_ACEOF
25907cat confdefs.h >>conftest.$ac_ext
25908cat >>conftest.$ac_ext <<_ACEOF
25909/* end confdefs.h. */
25910#include <readline/readline.h>
25911_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912if { (ac_try="$ac_cpp conftest.$ac_ext"
25913case "(($ac_try" in
25914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25915 *) ac_try_echo=$ac_try;;
25916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025918 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025919 ac_status=$?
25920 grep -v '^ *+' conftest.er1 >conftest.err
25921 rm -f conftest.er1
25922 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025924 (exit $ac_status); } >/dev/null && {
25925 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25926 test ! -s conftest.err
25927 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025928 have_readline=yes
25929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025930 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025931sed 's/^/| /' conftest.$ac_ext >&5
25932
25933 have_readline=no
25934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025936rm -f conftest.err conftest.$ac_ext
25937if test $have_readline = yes
25938then
25939 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025940/* confdefs.h. */
25941_ACEOF
25942cat confdefs.h >>conftest.$ac_ext
25943cat >>conftest.$ac_ext <<_ACEOF
25944/* end confdefs.h. */
25945#include <readline/readline.h>
25946
25947_ACEOF
25948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25949 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25950
25951cat >>confdefs.h <<\_ACEOF
25952#define HAVE_RL_CATCH_SIGNAL 1
25953_ACEOF
25954
25955fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025956rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025957
25958fi
25959
Martin v. Löwis82bca632006-02-10 20:49:30 +000025960# End of readline checks: restore LIBS
25961LIBS=$LIBS_no_readline
25962
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025963{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25964echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025965if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025966 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025967else
Martin v. Löwis11437992002-04-12 09:54:03 +000025968
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025969if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025970 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025971else
Martin v. Löwis11437992002-04-12 09:54:03 +000025972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025973/* confdefs.h. */
25974_ACEOF
25975cat confdefs.h >>conftest.$ac_ext
25976cat >>conftest.$ac_ext <<_ACEOF
25977/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025978
25979int main()
25980{
25981 int val1 = nice(1);
25982 if (val1 != -1 && val1 == nice(2))
25983 exit(0);
25984 exit(1);
25985}
25986
Martin v. Löwis11437992002-04-12 09:54:03 +000025987_ACEOF
25988rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025989if { (ac_try="$ac_link"
25990case "(($ac_try" in
25991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25992 *) ac_try_echo=$ac_try;;
25993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025996 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025999 { (case "(($ac_try" in
26000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26001 *) ac_try_echo=$ac_try;;
26002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026005 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026007 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026008 ac_cv_broken_nice=yes
26009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026010 echo "$as_me: program exited with status $ac_status" >&5
26011echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026012sed 's/^/| /' conftest.$ac_ext >&5
26013
Martin v. Löwis11437992002-04-12 09:54:03 +000026014( exit $ac_status )
26015ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026017rm -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 +000026018fi
26019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026020
26021fi
26022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026023{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26024echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026025if test "$ac_cv_broken_nice" = yes
26026then
Martin v. Löwis11437992002-04-12 09:54:03 +000026027
26028cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026029#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026030_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026031
26032fi
26033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026034{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26035echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026036if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026037 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026038else
26039 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026040 ac_cv_broken_poll=no
26041else
26042 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026043/* confdefs.h. */
26044_ACEOF
26045cat confdefs.h >>conftest.$ac_ext
26046cat >>conftest.$ac_ext <<_ACEOF
26047/* end confdefs.h. */
26048
26049#include <poll.h>
26050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026051int main()
26052{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026053 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026054 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026055
26056 close (42);
26057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026058 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026059 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026060 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026061 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026062 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026063 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026064 return 1;
26065}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026066
26067_ACEOF
26068rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026069if { (ac_try="$ac_link"
26070case "(($ac_try" in
26071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26072 *) ac_try_echo=$ac_try;;
26073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026075 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026076 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026079 { (case "(($ac_try" in
26080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26081 *) ac_try_echo=$ac_try;;
26082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026084 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026085 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026087 (exit $ac_status); }; }; then
26088 ac_cv_broken_poll=yes
26089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026090 echo "$as_me: program exited with status $ac_status" >&5
26091echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026092sed 's/^/| /' conftest.$ac_ext >&5
26093
26094( exit $ac_status )
26095ac_cv_broken_poll=no
26096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097rm -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 +000026098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026099
26100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026101fi
26102
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026103{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26104echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026105if test "$ac_cv_broken_poll" = yes
26106then
26107
26108cat >>confdefs.h <<\_ACEOF
26109#define HAVE_BROKEN_POLL 1
26110_ACEOF
26111
26112fi
26113
Brett Cannon43802422005-02-10 20:48:03 +000026114# 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 +000026115# (which is not required by ISO C or UNIX spec) and/or if we support
26116# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026117{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26118echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026119if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026120 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026121else
26122 cat >conftest.$ac_ext <<_ACEOF
26123/* confdefs.h. */
26124_ACEOF
26125cat confdefs.h >>conftest.$ac_ext
26126cat >>conftest.$ac_ext <<_ACEOF
26127/* end confdefs.h. */
26128#include <sys/types.h>
26129#include <$ac_cv_struct_tm>
26130
26131
26132int
26133main ()
26134{
26135static struct tm ac_aggr;
26136if (ac_aggr.tm_zone)
26137return 0;
26138 ;
26139 return 0;
26140}
26141_ACEOF
26142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143if { (ac_try="$ac_compile"
26144case "(($ac_try" in
26145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26146 *) ac_try_echo=$ac_try;;
26147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026149 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026150 ac_status=$?
26151 grep -v '^ *+' conftest.er1 >conftest.err
26152 rm -f conftest.er1
26153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026155 (exit $ac_status); } && {
26156 test -z "$ac_c_werror_flag" ||
26157 test ! -s conftest.err
26158 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026159 ac_cv_member_struct_tm_tm_zone=yes
26160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026161 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026162sed 's/^/| /' conftest.$ac_ext >&5
26163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026164 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026165/* confdefs.h. */
26166_ACEOF
26167cat confdefs.h >>conftest.$ac_ext
26168cat >>conftest.$ac_ext <<_ACEOF
26169/* end confdefs.h. */
26170#include <sys/types.h>
26171#include <$ac_cv_struct_tm>
26172
26173
26174int
26175main ()
26176{
26177static struct tm ac_aggr;
26178if (sizeof ac_aggr.tm_zone)
26179return 0;
26180 ;
26181 return 0;
26182}
26183_ACEOF
26184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026185if { (ac_try="$ac_compile"
26186case "(($ac_try" in
26187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26188 *) ac_try_echo=$ac_try;;
26189esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026191 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026192 ac_status=$?
26193 grep -v '^ *+' conftest.er1 >conftest.err
26194 rm -f conftest.er1
26195 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026197 (exit $ac_status); } && {
26198 test -z "$ac_c_werror_flag" ||
26199 test ! -s conftest.err
26200 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026201 ac_cv_member_struct_tm_tm_zone=yes
26202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026203 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026204sed 's/^/| /' conftest.$ac_ext >&5
26205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026206 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026208
26209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211
26212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026213fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026214{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26215echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26216if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026217
26218cat >>confdefs.h <<_ACEOF
26219#define HAVE_STRUCT_TM_TM_ZONE 1
26220_ACEOF
26221
26222
26223fi
26224
26225if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26226
26227cat >>confdefs.h <<\_ACEOF
26228#define HAVE_TM_ZONE 1
26229_ACEOF
26230
26231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026232 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26233echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026234if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026235 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026236else
26237 cat >conftest.$ac_ext <<_ACEOF
26238/* confdefs.h. */
26239_ACEOF
26240cat confdefs.h >>conftest.$ac_ext
26241cat >>conftest.$ac_ext <<_ACEOF
26242/* end confdefs.h. */
26243#include <time.h>
26244
26245int
26246main ()
26247{
26248#ifndef tzname
26249 (void) tzname;
26250#endif
26251
26252 ;
26253 return 0;
26254}
26255_ACEOF
26256rm -f conftest.$ac_objext
26257if { (ac_try="$ac_compile"
26258case "(($ac_try" in
26259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26260 *) ac_try_echo=$ac_try;;
26261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026263 (eval "$ac_compile") 2>conftest.er1
26264 ac_status=$?
26265 grep -v '^ *+' conftest.er1 >conftest.err
26266 rm -f conftest.er1
26267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026269 (exit $ac_status); } && {
26270 test -z "$ac_c_werror_flag" ||
26271 test ! -s conftest.err
26272 } && test -s conftest.$ac_objext; then
26273 ac_cv_have_decl_tzname=yes
26274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026275 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026276sed 's/^/| /' conftest.$ac_ext >&5
26277
26278 ac_cv_have_decl_tzname=no
26279fi
26280
26281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26282fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26284echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26285if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026286
26287cat >>confdefs.h <<_ACEOF
26288#define HAVE_DECL_TZNAME 1
26289_ACEOF
26290
26291
26292else
26293 cat >>confdefs.h <<_ACEOF
26294#define HAVE_DECL_TZNAME 0
26295_ACEOF
26296
26297
26298fi
26299
26300
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026301 { echo "$as_me:$LINENO: checking for tzname" >&5
26302echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026303if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026304 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026305else
26306 cat >conftest.$ac_ext <<_ACEOF
26307/* confdefs.h. */
26308_ACEOF
26309cat confdefs.h >>conftest.$ac_ext
26310cat >>conftest.$ac_ext <<_ACEOF
26311/* end confdefs.h. */
26312#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026313#if !HAVE_DECL_TZNAME
26314extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026315#endif
26316
26317int
26318main ()
26319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026320return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026321 ;
26322 return 0;
26323}
26324_ACEOF
26325rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026326if { (ac_try="$ac_link"
26327case "(($ac_try" in
26328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26329 *) ac_try_echo=$ac_try;;
26330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026333 ac_status=$?
26334 grep -v '^ *+' conftest.er1 >conftest.err
26335 rm -f conftest.er1
26336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026338 (exit $ac_status); } && {
26339 test -z "$ac_c_werror_flag" ||
26340 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026341 } && test -s conftest$ac_exeext &&
26342 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026343 ac_cv_var_tzname=yes
26344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026345 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026346sed 's/^/| /' conftest.$ac_ext >&5
26347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026348 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026350
26351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026352 conftest$ac_exeext conftest.$ac_ext
26353fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026354{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26355echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026356 if test $ac_cv_var_tzname = yes; then
26357
26358cat >>confdefs.h <<\_ACEOF
26359#define HAVE_TZNAME 1
26360_ACEOF
26361
26362 fi
26363fi
26364
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026365
Martin v. Löwis1d459062005-03-14 21:23:33 +000026366# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026367{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26368echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026369if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026371else
26372
26373if test "$cross_compiling" = yes; then
26374 ac_cv_working_tzset=no
26375else
26376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026377/* confdefs.h. */
26378_ACEOF
26379cat confdefs.h >>conftest.$ac_ext
26380cat >>conftest.$ac_ext <<_ACEOF
26381/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026382
26383#include <stdlib.h>
26384#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026385#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026386
26387#if HAVE_TZNAME
26388extern char *tzname[];
26389#endif
26390
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026391int main()
26392{
Brett Cannon18367812003-09-19 00:59:16 +000026393 /* Note that we need to ensure that not only does tzset(3)
26394 do 'something' with localtime, but it works as documented
26395 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026396 This includes making sure that tzname is set properly if
26397 tm->tm_zone does not exist since it is the alternative way
26398 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026399
26400 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026401 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026402 */
26403
Martin v. Löwis1d459062005-03-14 21:23:33 +000026404 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026405 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26406
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026407 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026408 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026409 if (localtime(&groundhogday)->tm_hour != 0)
26410 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026411#if HAVE_TZNAME
26412 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26413 if (strcmp(tzname[0], "UTC") ||
26414 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26415 exit(1);
26416#endif
Brett Cannon18367812003-09-19 00:59:16 +000026417
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026418 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026419 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026420 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026421 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026422#if HAVE_TZNAME
26423 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26424 exit(1);
26425#endif
Brett Cannon18367812003-09-19 00:59:16 +000026426
26427 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26428 tzset();
26429 if (localtime(&groundhogday)->tm_hour != 11)
26430 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026431#if HAVE_TZNAME
26432 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26433 exit(1);
26434#endif
26435
26436#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026437 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26438 exit(1);
26439 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26440 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026441#endif
Brett Cannon18367812003-09-19 00:59:16 +000026442
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026443 exit(0);
26444}
26445
26446_ACEOF
26447rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026448if { (ac_try="$ac_link"
26449case "(($ac_try" in
26450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26451 *) ac_try_echo=$ac_try;;
26452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026454 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026455 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026458 { (case "(($ac_try" in
26459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26460 *) ac_try_echo=$ac_try;;
26461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026463 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026464 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026466 (exit $ac_status); }; }; then
26467 ac_cv_working_tzset=yes
26468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026469 echo "$as_me: program exited with status $ac_status" >&5
26470echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026471sed 's/^/| /' conftest.$ac_ext >&5
26472
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026473( exit $ac_status )
26474ac_cv_working_tzset=no
26475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026476rm -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 +000026477fi
26478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026479
26480fi
26481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026482{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26483echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026484if test "$ac_cv_working_tzset" = yes
26485then
26486
26487cat >>confdefs.h <<\_ACEOF
26488#define HAVE_WORKING_TZSET 1
26489_ACEOF
26490
26491fi
26492
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026493# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026494{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26495echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026496if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026497 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026498else
26499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026500/* confdefs.h. */
26501_ACEOF
26502cat confdefs.h >>conftest.$ac_ext
26503cat >>conftest.$ac_ext <<_ACEOF
26504/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026505#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026506int
26507main ()
26508{
26509
26510struct stat st;
26511st.st_mtim.tv_nsec = 1;
26512
26513 ;
26514 return 0;
26515}
26516_ACEOF
26517rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026518if { (ac_try="$ac_compile"
26519case "(($ac_try" in
26520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26521 *) ac_try_echo=$ac_try;;
26522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026526 grep -v '^ *+' conftest.er1 >conftest.err
26527 rm -f conftest.er1
26528 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530 (exit $ac_status); } && {
26531 test -z "$ac_c_werror_flag" ||
26532 test ! -s conftest.err
26533 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026534 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026537sed 's/^/| /' conftest.$ac_ext >&5
26538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026539 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026540fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26543fi
26544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026545{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26546echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026547if test "$ac_cv_stat_tv_nsec" = yes
26548then
26549
26550cat >>confdefs.h <<\_ACEOF
26551#define HAVE_STAT_TV_NSEC 1
26552_ACEOF
26553
26554fi
26555
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026556# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026557{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26558echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026559if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026561else
26562 cat >conftest.$ac_ext <<_ACEOF
26563/* confdefs.h. */
26564_ACEOF
26565cat confdefs.h >>conftest.$ac_ext
26566cat >>conftest.$ac_ext <<_ACEOF
26567/* end confdefs.h. */
26568#include <sys/stat.h>
26569int
26570main ()
26571{
26572
26573struct stat st;
26574st.st_mtimespec.tv_nsec = 1;
26575
26576 ;
26577 return 0;
26578}
26579_ACEOF
26580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026581if { (ac_try="$ac_compile"
26582case "(($ac_try" in
26583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26584 *) ac_try_echo=$ac_try;;
26585esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026588 ac_status=$?
26589 grep -v '^ *+' conftest.er1 >conftest.err
26590 rm -f conftest.er1
26591 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026593 (exit $ac_status); } && {
26594 test -z "$ac_c_werror_flag" ||
26595 test ! -s conftest.err
26596 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026597 ac_cv_stat_tv_nsec2=yes
26598else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026599 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026600sed 's/^/| /' conftest.$ac_ext >&5
26601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026602 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026603fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26606fi
26607
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026608{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26609echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026610if test "$ac_cv_stat_tv_nsec2" = yes
26611then
26612
26613cat >>confdefs.h <<\_ACEOF
26614#define HAVE_STAT_TV_NSEC2 1
26615_ACEOF
26616
26617fi
26618
Jack Jansen666b1e72001-10-31 12:11:48 +000026619# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026620{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26621echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026622if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026623 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026624else
Martin v. Löwis11437992002-04-12 09:54:03 +000026625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026626/* confdefs.h. */
26627_ACEOF
26628cat confdefs.h >>conftest.$ac_ext
26629cat >>conftest.$ac_ext <<_ACEOF
26630/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026631#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026632int
26633main ()
26634{
Jack Jansen666b1e72001-10-31 12:11:48 +000026635
26636 int rtn;
26637 rtn = mvwdelch(0,0,0);
26638
Martin v. Löwis11437992002-04-12 09:54:03 +000026639 ;
26640 return 0;
26641}
26642_ACEOF
26643rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644if { (ac_try="$ac_compile"
26645case "(($ac_try" in
26646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26647 *) ac_try_echo=$ac_try;;
26648esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026652 grep -v '^ *+' conftest.er1 >conftest.err
26653 rm -f conftest.er1
26654 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656 (exit $ac_status); } && {
26657 test -z "$ac_c_werror_flag" ||
26658 test ! -s conftest.err
26659 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026660 ac_cv_mvwdelch_is_expression=yes
26661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026663sed 's/^/| /' conftest.$ac_ext >&5
26664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026665 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026666fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26669fi
26670
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026671{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26672echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026673
26674if test "$ac_cv_mvwdelch_is_expression" = yes
26675then
Martin v. Löwis11437992002-04-12 09:54:03 +000026676
26677cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026678#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026679_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026680
26681fi
26682
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026683{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26684echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026685if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026686 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026687else
Martin v. Löwis11437992002-04-12 09:54:03 +000026688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026689/* confdefs.h. */
26690_ACEOF
26691cat confdefs.h >>conftest.$ac_ext
26692cat >>conftest.$ac_ext <<_ACEOF
26693/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026694#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026695int
26696main ()
26697{
Jack Jansen666b1e72001-10-31 12:11:48 +000026698
26699 WINDOW *w;
26700 w->_flags = 0;
26701
Martin v. Löwis11437992002-04-12 09:54:03 +000026702 ;
26703 return 0;
26704}
26705_ACEOF
26706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026707if { (ac_try="$ac_compile"
26708case "(($ac_try" in
26709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26710 *) ac_try_echo=$ac_try;;
26711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026715 grep -v '^ *+' conftest.er1 >conftest.err
26716 rm -f conftest.er1
26717 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719 (exit $ac_status); } && {
26720 test -z "$ac_c_werror_flag" ||
26721 test ! -s conftest.err
26722 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026723 ac_cv_window_has_flags=yes
26724else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026726sed 's/^/| /' conftest.$ac_ext >&5
26727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026728 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026729fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26732fi
26733
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026734{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26735echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026736
Jack Jansen666b1e72001-10-31 12:11:48 +000026737
26738if test "$ac_cv_window_has_flags" = yes
26739then
Martin v. Löwis11437992002-04-12 09:54:03 +000026740
26741cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026742#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026743_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026744
26745fi
26746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026747{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26748echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026749cat >conftest.$ac_ext <<_ACEOF
26750/* confdefs.h. */
26751_ACEOF
26752cat confdefs.h >>conftest.$ac_ext
26753cat >>conftest.$ac_ext <<_ACEOF
26754/* end confdefs.h. */
26755#include <curses.h>
26756int
26757main ()
26758{
26759void *x=is_term_resized
26760 ;
26761 return 0;
26762}
26763_ACEOF
26764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026765if { (ac_try="$ac_compile"
26766case "(($ac_try" in
26767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26768 *) ac_try_echo=$ac_try;;
26769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026771 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026772 ac_status=$?
26773 grep -v '^ *+' conftest.er1 >conftest.err
26774 rm -f conftest.er1
26775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026777 (exit $ac_status); } && {
26778 test -z "$ac_c_werror_flag" ||
26779 test ! -s conftest.err
26780 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026781
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026782cat >>confdefs.h <<\_ACEOF
26783#define HAVE_CURSES_IS_TERM_RESIZED 1
26784_ACEOF
26785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026786 { echo "$as_me:$LINENO: result: yes" >&5
26787echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026789 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026790sed 's/^/| /' conftest.$ac_ext >&5
26791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026792 { echo "$as_me:$LINENO: result: no" >&5
26793echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026794
26795fi
26796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26798
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026799{ echo "$as_me:$LINENO: checking for resize_term" >&5
26800echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026801cat >conftest.$ac_ext <<_ACEOF
26802/* confdefs.h. */
26803_ACEOF
26804cat confdefs.h >>conftest.$ac_ext
26805cat >>conftest.$ac_ext <<_ACEOF
26806/* end confdefs.h. */
26807#include <curses.h>
26808int
26809main ()
26810{
26811void *x=resize_term
26812 ;
26813 return 0;
26814}
26815_ACEOF
26816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026817if { (ac_try="$ac_compile"
26818case "(($ac_try" in
26819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26820 *) ac_try_echo=$ac_try;;
26821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026824 ac_status=$?
26825 grep -v '^ *+' conftest.er1 >conftest.err
26826 rm -f conftest.er1
26827 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026829 (exit $ac_status); } && {
26830 test -z "$ac_c_werror_flag" ||
26831 test ! -s conftest.err
26832 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026833
26834cat >>confdefs.h <<\_ACEOF
26835#define HAVE_CURSES_RESIZE_TERM 1
26836_ACEOF
26837
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026838 { echo "$as_me:$LINENO: result: yes" >&5
26839echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026841 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026842sed 's/^/| /' conftest.$ac_ext >&5
26843
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026844 { echo "$as_me:$LINENO: result: no" >&5
26845echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026846
26847fi
26848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26850
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026851{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26852echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026853cat >conftest.$ac_ext <<_ACEOF
26854/* confdefs.h. */
26855_ACEOF
26856cat confdefs.h >>conftest.$ac_ext
26857cat >>conftest.$ac_ext <<_ACEOF
26858/* end confdefs.h. */
26859#include <curses.h>
26860int
26861main ()
26862{
26863void *x=resizeterm
26864 ;
26865 return 0;
26866}
26867_ACEOF
26868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026869if { (ac_try="$ac_compile"
26870case "(($ac_try" in
26871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26872 *) ac_try_echo=$ac_try;;
26873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026875 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026876 ac_status=$?
26877 grep -v '^ *+' conftest.er1 >conftest.err
26878 rm -f conftest.er1
26879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026881 (exit $ac_status); } && {
26882 test -z "$ac_c_werror_flag" ||
26883 test ! -s conftest.err
26884 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026885
26886cat >>confdefs.h <<\_ACEOF
26887#define HAVE_CURSES_RESIZETERM 1
26888_ACEOF
26889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026890 { echo "$as_me:$LINENO: result: yes" >&5
26891echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026892else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026893 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026894sed 's/^/| /' conftest.$ac_ext >&5
26895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026896 { echo "$as_me:$LINENO: result: no" >&5
26897echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026898
26899fi
26900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26902
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026903{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26904echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026905
26906if test -r /dev/ptmx
26907then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026908 { echo "$as_me:$LINENO: result: yes" >&5
26909echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026910
26911cat >>confdefs.h <<\_ACEOF
26912#define HAVE_DEV_PTMX 1
26913_ACEOF
26914
Thomas Wouters89f507f2006-12-13 04:49:30 +000026915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026916 { echo "$as_me:$LINENO: result: no" >&5
26917echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026918fi
26919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026920{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26921echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026922
26923if test -r /dev/ptc
26924then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026925 { echo "$as_me:$LINENO: result: yes" >&5
26926echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026927
26928cat >>confdefs.h <<\_ACEOF
26929#define HAVE_DEV_PTC 1
26930_ACEOF
26931
Thomas Wouters89f507f2006-12-13 04:49:30 +000026932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026933 { echo "$as_me:$LINENO: result: no" >&5
26934echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026935fi
26936
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026937if test "$have_long_long" = yes
26938then
26939 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26940echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26941 if test "${ac_cv_have_long_long_format+set}" = set; then
26942 echo $ECHO_N "(cached) $ECHO_C" >&6
26943else
26944 if test "$cross_compiling" = yes; then
26945 ac_cv_have_long_long_format=no
26946else
26947 cat >conftest.$ac_ext <<_ACEOF
26948/* confdefs.h. */
26949_ACEOF
26950cat confdefs.h >>conftest.$ac_ext
26951cat >>conftest.$ac_ext <<_ACEOF
26952/* end confdefs.h. */
26953
26954 #include <stdio.h>
26955 #include <stddef.h>
26956 #include <string.h>
26957
26958 #ifdef HAVE_SYS_TYPES_H
26959 #include <sys/types.h>
26960 #endif
26961
26962 int main()
26963 {
26964 char buffer[256];
26965
26966 if (sprintf(buffer, "%lld", (long long)123) < 0)
26967 return 1;
26968 if (strcmp(buffer, "123"))
26969 return 1;
26970
26971 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26972 return 1;
26973 if (strcmp(buffer, "-123"))
26974 return 1;
26975
26976 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26977 return 1;
26978 if (strcmp(buffer, "123"))
26979 return 1;
26980
26981 return 0;
26982 }
26983
26984_ACEOF
26985rm -f conftest$ac_exeext
26986if { (ac_try="$ac_link"
26987case "(($ac_try" in
26988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26989 *) ac_try_echo=$ac_try;;
26990esac
26991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26992 (eval "$ac_link") 2>&5
26993 ac_status=$?
26994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26996 { (case "(($ac_try" in
26997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26998 *) ac_try_echo=$ac_try;;
26999esac
27000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27001 (eval "$ac_try") 2>&5
27002 ac_status=$?
27003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27004 (exit $ac_status); }; }; then
27005 ac_cv_have_long_long_format=yes
27006else
27007 echo "$as_me: program exited with status $ac_status" >&5
27008echo "$as_me: failed program was:" >&5
27009sed 's/^/| /' conftest.$ac_ext >&5
27010
27011( exit $ac_status )
27012ac_cv_have_long_long_format=no
27013fi
27014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27015fi
27016
27017
27018
27019fi
27020
27021 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27022echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27023fi
27024
Mark Dickinson89d7d412009-12-31 20:50:59 +000027025if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027026then
27027
27028cat >>confdefs.h <<\_ACEOF
27029#define PY_FORMAT_LONG_LONG "ll"
27030_ACEOF
27031
27032fi
27033
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027034if test $ac_sys_system = Darwin
27035then
27036 LIBS="$LIBS -framework CoreFoundation"
27037fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027039{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27040echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027041if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027042 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027043else
27044 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027045 ac_cv_have_size_t_format="cross -- assuming yes"
27046
Thomas Wouters477c8d52006-05-27 19:21:47 +000027047else
27048 cat >conftest.$ac_ext <<_ACEOF
27049/* confdefs.h. */
27050_ACEOF
27051cat confdefs.h >>conftest.$ac_ext
27052cat >>conftest.$ac_ext <<_ACEOF
27053/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027054
Thomas Wouters477c8d52006-05-27 19:21:47 +000027055#include <stdio.h>
27056#include <stddef.h>
27057#include <string.h>
27058
Christian Heimes2c181612007-12-17 20:04:13 +000027059#ifdef HAVE_SYS_TYPES_H
27060#include <sys/types.h>
27061#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027062
27063#ifdef HAVE_SSIZE_T
27064typedef ssize_t Py_ssize_t;
27065#elif SIZEOF_VOID_P == SIZEOF_LONG
27066typedef long Py_ssize_t;
27067#else
27068typedef int Py_ssize_t;
27069#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027070
Christian Heimes2c181612007-12-17 20:04:13 +000027071int main()
27072{
27073 char buffer[256];
27074
Thomas Wouters477c8d52006-05-27 19:21:47 +000027075 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27076 return 1;
27077
Thomas Wouters89f507f2006-12-13 04:49:30 +000027078 if (strcmp(buffer, "123"))
27079 return 1;
27080
27081 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27082 return 1;
27083
27084 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027085 return 1;
27086
27087 return 0;
27088}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027089
Thomas Wouters477c8d52006-05-27 19:21:47 +000027090_ACEOF
27091rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027092if { (ac_try="$ac_link"
27093case "(($ac_try" in
27094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27095 *) ac_try_echo=$ac_try;;
27096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027098 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027099 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027102 { (case "(($ac_try" in
27103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27104 *) ac_try_echo=$ac_try;;
27105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027107 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027108 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027110 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027111 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027113 echo "$as_me: program exited with status $ac_status" >&5
27114echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027115sed 's/^/| /' conftest.$ac_ext >&5
27116
27117( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027118ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027119fi
27120rm -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 +000027121fi
27122
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027124fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027125{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27126echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027127if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027128
27129cat >>confdefs.h <<\_ACEOF
27130#define PY_FORMAT_SIZE_T "z"
27131_ACEOF
27132
27133fi
27134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027135{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27136echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027137if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027139else
Martin v. Löwis11437992002-04-12 09:54:03 +000027140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027141/* confdefs.h. */
27142_ACEOF
27143cat confdefs.h >>conftest.$ac_ext
27144cat >>conftest.$ac_ext <<_ACEOF
27145/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027146
27147#ifdef HAVE_SYS_TYPES_H
27148#include <sys/types.h>
27149#endif
27150#ifdef HAVE_SYS_SOCKET_H
27151#include <sys/socket.h>
27152#endif
27153
27154
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027155typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027156int
27157main ()
27158{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027159if ((ac__type_new_ *) 0)
27160 return 0;
27161if (sizeof (ac__type_new_))
27162 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027163 ;
27164 return 0;
27165}
27166_ACEOF
27167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027168if { (ac_try="$ac_compile"
27169case "(($ac_try" in
27170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27171 *) ac_try_echo=$ac_try;;
27172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027176 grep -v '^ *+' conftest.er1 >conftest.err
27177 rm -f conftest.er1
27178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027180 (exit $ac_status); } && {
27181 test -z "$ac_c_werror_flag" ||
27182 test ! -s conftest.err
27183 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027184 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027187sed 's/^/| /' conftest.$ac_ext >&5
27188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027189 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027191
27192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027193fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27195echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27196if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027197 :
27198else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027199
Martin v. Löwis01c04012002-11-11 14:58:44 +000027200cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027201#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027202_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027203
27204fi
27205
Michael W. Hudson54241132001-12-07 15:38:26 +000027206
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027207{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27208echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027209if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027210 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027211else
27212 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027213 ac_cv_broken_mbstowcs=no
27214else
27215 cat >conftest.$ac_ext <<_ACEOF
27216/* confdefs.h. */
27217_ACEOF
27218cat confdefs.h >>conftest.$ac_ext
27219cat >>conftest.$ac_ext <<_ACEOF
27220/* end confdefs.h. */
27221
27222#include<stdlib.h>
27223int main() {
27224 size_t len = -1;
27225 const char *str = "text";
27226 len = mbstowcs(NULL, str, 0);
27227 return (len != 4);
27228}
27229
27230_ACEOF
27231rm -f conftest$ac_exeext
27232if { (ac_try="$ac_link"
27233case "(($ac_try" in
27234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27235 *) ac_try_echo=$ac_try;;
27236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027238 (eval "$ac_link") 2>&5
27239 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27242 { (case "(($ac_try" in
27243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27244 *) ac_try_echo=$ac_try;;
27245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027247 (eval "$ac_try") 2>&5
27248 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027250 (exit $ac_status); }; }; then
27251 ac_cv_broken_mbstowcs=no
27252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027253 echo "$as_me: program exited with status $ac_status" >&5
27254echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027255sed 's/^/| /' conftest.$ac_ext >&5
27256
27257( exit $ac_status )
27258ac_cv_broken_mbstowcs=yes
27259fi
27260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27261fi
27262
27263
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027264fi
27265
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027266{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27267echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027268if test "$ac_cv_broken_mbstowcs" = yes
27269then
27270
27271cat >>confdefs.h <<\_ACEOF
27272#define HAVE_BROKEN_MBSTOWCS 1
27273_ACEOF
27274
27275fi
27276
Antoine Pitroub52ec782009-01-25 16:34:23 +000027277# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027278{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27279echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027280
27281# Check whether --with-computed-gotos was given.
27282if test "${with_computed_gotos+set}" = set; then
27283 withval=$with_computed_gotos;
27284if test "$withval" != no
27285then
27286
27287cat >>confdefs.h <<\_ACEOF
27288#define USE_COMPUTED_GOTOS 1
27289_ACEOF
27290
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027291 { echo "$as_me:$LINENO: result: yes" >&5
27292echo "${ECHO_T}yes" >&6; }
27293else { echo "$as_me:$LINENO: result: no" >&5
27294echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027295fi
27296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027297 { echo "$as_me:$LINENO: result: no" >&5
27298echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027299fi
27300
27301
27302
Michael W. Hudson54241132001-12-07 15:38:26 +000027303
27304
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027305for h in `(cd $srcdir;echo Python/thread_*.h)`
27306do
27307 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27308done
27309
Michael W. Hudson54241132001-12-07 15:38:26 +000027310
Neal Norwitzd24499d2005-12-18 21:36:39 +000027311SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027312{ echo "$as_me:$LINENO: checking for build directories" >&5
27313echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027314for dir in $SRCDIRS; do
27315 if test ! -d $dir; then
27316 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027317 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027318done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027319{ echo "$as_me:$LINENO: result: done" >&5
27320echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027321
Guido van Rossum627b2d71993-12-24 10:39:16 +000027322# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027323ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027324
Martin v. Löwis11437992002-04-12 09:54:03 +000027325cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027326# This file is a shell script that caches the results of configure
27327# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027328# scripts and configure runs, see configure's option --config-cache.
27329# It is not useful on other systems. If it contains results you don't
27330# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027331#
Martin v. Löwis11437992002-04-12 09:54:03 +000027332# config.status only pays attention to the cache file if you give it
27333# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027334#
Skip Montanaro6dead952003-09-25 14:50:04 +000027335# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027336# loading this file, other *unset* `ac_cv_foo' will be assigned the
27337# following values.
27338
27339_ACEOF
27340
Guido van Rossumf78abae1997-01-21 22:02:36 +000027341# The following way of writing the cache mishandles newlines in values,
27342# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027343# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027344# Ultrix sh set writes to stderr and can't be redirected directly,
27345# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027346(
27347 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27348 eval ac_val=\$$ac_var
27349 case $ac_val in #(
27350 *${as_nl}*)
27351 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027352 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27353echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027354 esac
27355 case $ac_var in #(
27356 _ | IFS | as_nl) ;; #(
27357 *) $as_unset $ac_var ;;
27358 esac ;;
27359 esac
27360 done
27361
Martin v. Löwis11437992002-04-12 09:54:03 +000027362 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27364 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027365 # `set' does not quote correctly, so add quotes (double-quote
27366 # substitution turns \\\\ into \\, and sed turns \\ into \).
27367 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027368 "s/'/'\\\\''/g;
27369 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027370 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027371 *)
27372 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027373 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027374 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027375 esac |
27376 sort
27377) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027378 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027379 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027381 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027382 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27383 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027384 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27385 :end' >>confcache
27386if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27387 if test -w "$cache_file"; then
27388 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027389 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27390echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027391 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027392 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027393 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27394echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027395 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027396fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027397rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027398
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027399test "x$prefix" = xNONE && prefix=$ac_default_prefix
27400# Let make expand exec_prefix.
27401test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027403DEFS=-DHAVE_CONFIG_H
27404
Skip Montanaro6dead952003-09-25 14:50:04 +000027405ac_libobjs=
27406ac_ltlibobjs=
27407for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27408 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027410 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027411 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27412 # will be set to the directory where LIBOBJS objects are built.
27413 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27414 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027415done
27416LIBOBJS=$ac_libobjs
27417
27418LTLIBOBJS=$ac_ltlibobjs
27419
27420
Martin v. Löwis11437992002-04-12 09:54:03 +000027421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027422: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027423ac_clean_files_save=$ac_clean_files
27424ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027425{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27426echo "$as_me: creating $CONFIG_STATUS" >&6;}
27427cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027428#! $SHELL
27429# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027430# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027431# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027432# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027433
Martin v. Löwis11437992002-04-12 09:54:03 +000027434debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027435ac_cs_recheck=false
27436ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027437SHELL=\${CONFIG_SHELL-$SHELL}
27438_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027439
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027440cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027441## --------------------- ##
27442## M4sh Initialization. ##
27443## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027445# Be more Bourne compatible
27446DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027447if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27448 emulate sh
27449 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027450 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027451 # is contrary to our usage. Disable this feature.
27452 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027453 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027454else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027455 case `(set -o) 2>/dev/null` in
27456 *posix*) set -o posix ;;
27457esac
27458
Michael W. Hudson54241132001-12-07 15:38:26 +000027459fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027460
27461
Michael W. Hudson54241132001-12-07 15:38:26 +000027462
Michael W. Hudson54241132001-12-07 15:38:26 +000027463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027464# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027465# Avoid depending upon Character Ranges.
27466as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27467as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27468as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27469as_cr_digits='0123456789'
27470as_cr_alnum=$as_cr_Letters$as_cr_digits
27471
27472# The user is always right.
27473if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027474 echo "#! /bin/sh" >conf$$.sh
27475 echo "exit 0" >>conf$$.sh
27476 chmod +x conf$$.sh
27477 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27478 PATH_SEPARATOR=';'
27479 else
27480 PATH_SEPARATOR=:
27481 fi
27482 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027483fi
27484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027485# Support unset when possible.
27486if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27487 as_unset=unset
27488else
27489 as_unset=false
27490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027492
27493# IFS
27494# We need space, tab and new line, in precisely that order. Quoting is
27495# there to prevent editors from complaining about space-tab.
27496# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27497# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027498as_nl='
27499'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500IFS=" "" $as_nl"
27501
27502# Find who we are. Look in the path if we contain no directory separator.
27503case $0 in
27504 *[\\/]* ) as_myself=$0 ;;
27505 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027506for as_dir in $PATH
27507do
27508 IFS=$as_save_IFS
27509 test -z "$as_dir" && as_dir=.
27510 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27511done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027512IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514 ;;
27515esac
27516# We did not find ourselves, most probably we were run as `sh COMMAND'
27517# in which case we are not to be found in the path.
27518if test "x$as_myself" = x; then
27519 as_myself=$0
27520fi
27521if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027522 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027523 { (exit 1); exit 1; }
27524fi
27525
27526# Work around bugs in pre-3.0 UWIN ksh.
27527for as_var in ENV MAIL MAILPATH
27528do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27529done
27530PS1='$ '
27531PS2='> '
27532PS4='+ '
27533
27534# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027535for as_var in \
27536 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27537 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27538 LC_TELEPHONE LC_TIME
27539do
27540 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27541 eval $as_var=C; export $as_var
27542 else
27543 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27544 fi
27545done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027546
27547# Required to use basename.
27548if expr a : '\(a\)' >/dev/null 2>&1 &&
27549 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27550 as_expr=expr
27551else
27552 as_expr=false
27553fi
27554
27555if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27556 as_basename=basename
27557else
27558 as_basename=false
27559fi
27560
27561
27562# Name of the executable.
27563as_me=`$as_basename -- "$0" ||
27564$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27565 X"$0" : 'X\(//\)$' \| \
27566 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027567echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027568 sed '/^.*\/\([^/][^/]*\)\/*$/{
27569 s//\1/
27570 q
27571 }
27572 /^X\/\(\/\/\)$/{
27573 s//\1/
27574 q
27575 }
27576 /^X\/\(\/\).*/{
27577 s//\1/
27578 q
27579 }
27580 s/.*/./; q'`
27581
27582# CDPATH.
27583$as_unset CDPATH
27584
27585
27586
Martin v. Löwis11437992002-04-12 09:54:03 +000027587 as_lineno_1=$LINENO
27588 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027589 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027590 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027591
Martin v. Löwis11437992002-04-12 09:54:03 +000027592 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27593 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027594 # line-number line after each line using $LINENO; the second 'sed'
27595 # does the real work. The second script uses 'N' to pair each
27596 # line-number line with the line containing $LINENO, and appends
27597 # trailing '-' during substitution so that $LINENO is not a special
27598 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027599 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027600 # scripts with optimization help from Paolo Bonzini. Blame Lee
27601 # E. McMahon (1931-1989) for sed's syntax. :-)
27602 sed -n '
27603 p
27604 /[$]LINENO/=
27605 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027606 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027607 s/[$]LINENO.*/&-/
27608 t lineno
27609 b
27610 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027611 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027612 :loop
27613 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027614 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027616 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027617 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027618 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027619 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027620
Martin v. Löwis11437992002-04-12 09:54:03 +000027621 # Don't try to exec as it changes $[0], causing all sort of problems
27622 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027623 # original and so on. Autoconf is especially sensitive to this).
27624 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027625 # Exit status is that of the last command.
27626 exit
27627}
27628
27629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027630if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27631 as_dirname=dirname
27632else
27633 as_dirname=false
27634fi
27635
27636ECHO_C= ECHO_N= ECHO_T=
27637case `echo -n x` in
27638-n*)
27639 case `echo 'x\c'` in
27640 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27641 *) ECHO_C='\c';;
27642 esac;;
27643*)
27644 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027647if expr a : '\(a\)' >/dev/null 2>&1 &&
27648 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027649 as_expr=expr
27650else
27651 as_expr=false
27652fi
27653
27654rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027655if test -d conf$$.dir; then
27656 rm -f conf$$.dir/conf$$.file
27657else
27658 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027659 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027660fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027661echo >conf$$.file
27662if ln -s conf$$.file conf$$ 2>/dev/null; then
27663 as_ln_s='ln -s'
27664 # ... but there are two gotchas:
27665 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27666 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27667 # In both cases, we have to default to `cp -p'.
27668 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027669 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027670elif ln conf$$.file conf$$ 2>/dev/null; then
27671 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027672else
27673 as_ln_s='cp -p'
27674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027675rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27676rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027677
Skip Montanaro6dead952003-09-25 14:50:04 +000027678if mkdir -p . 2>/dev/null; then
27679 as_mkdir_p=:
27680else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027681 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027682 as_mkdir_p=false
27683fi
27684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027685if test -x / >/dev/null 2>&1; then
27686 as_test_x='test -x'
27687else
27688 if ls -dL / >/dev/null 2>&1; then
27689 as_ls_L_option=L
27690 else
27691 as_ls_L_option=
27692 fi
27693 as_test_x='
27694 eval sh -c '\''
27695 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027696 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027697 else
27698 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027699 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700 esac;
27701 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27702 ???[sx]*):;;*)false;;esac;fi
27703 '\'' sh
27704 '
27705fi
27706as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027707
27708# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027709as_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 +000027710
27711# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027712as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027713
27714
Martin v. Löwis11437992002-04-12 09:54:03 +000027715exec 6>&1
27716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027717# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027718# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027719# values after options handling.
27720ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027721This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027722generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027723
27724 CONFIG_FILES = $CONFIG_FILES
27725 CONFIG_HEADERS = $CONFIG_HEADERS
27726 CONFIG_LINKS = $CONFIG_LINKS
27727 CONFIG_COMMANDS = $CONFIG_COMMANDS
27728 $ $0 $@
27729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027730on `(hostname || uname -n) 2>/dev/null | sed 1q`
27731"
27732
Martin v. Löwis11437992002-04-12 09:54:03 +000027733_ACEOF
27734
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027735cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027736# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027737config_files="$ac_config_files"
27738config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027740_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027741
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027742cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027743ac_cs_usage="\
27744\`$as_me' instantiates files from templates according to the
27745current configuration.
27746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027747Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027748
27749 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027750 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027751 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027752 -d, --debug don't remove temporary files
27753 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027754 --file=FILE[:TEMPLATE]
27755 instantiate the configuration file FILE
27756 --header=FILE[:TEMPLATE]
27757 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027758
27759Configuration files:
27760$config_files
27761
27762Configuration headers:
27763$config_headers
27764
27765Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027767_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027768cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027769ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027770python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027771configured by $0, generated by GNU Autoconf 2.61,
27772 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027773
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027774Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027775This config.status script is free software; the Free Software Foundation
27776gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027777
27778ac_pwd='$ac_pwd'
27779srcdir='$srcdir'
27780INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027781_ACEOF
27782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027783cat >>$CONFIG_STATUS <<\_ACEOF
27784# If no file are specified by the user, then we need to provide default
27785# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027786ac_need_defaults=:
27787while test $# != 0
27788do
27789 case $1 in
27790 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027791 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27792 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027793 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027794 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027796 ac_option=$1
27797 ac_optarg=$2
27798 ac_shift=shift
27799 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027800 esac
27801
Skip Montanaro6dead952003-09-25 14:50:04 +000027802 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027803 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027804 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27805 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027807 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027809 debug=: ;;
27810 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027811 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027812 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027813 ac_need_defaults=false;;
27814 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027815 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027816 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027817 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027818 --he | --h)
27819 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027820 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027821Try \`$0 --help' for more information." >&2
27822 { (exit 1); exit 1; }; };;
27823 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027824 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027825 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27826 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27827 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027828
27829 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027830 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027831Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027832 { (exit 1); exit 1; }; } ;;
27833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027834 *) ac_config_targets="$ac_config_targets $1"
27835 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027836
27837 esac
27838 shift
27839done
27840
Skip Montanaro6dead952003-09-25 14:50:04 +000027841ac_configure_extra_args=
27842
27843if $ac_cs_silent; then
27844 exec 6>/dev/null
27845 ac_configure_extra_args="$ac_configure_extra_args --silent"
27846fi
27847
27848_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027849cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027850if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027851 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27852 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027853 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027854 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027855fi
27856
Martin v. Löwis11437992002-04-12 09:54:03 +000027857_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027858cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027859exec 5>>config.log
27860{
27861 echo
27862 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27863## Running $as_me. ##
27864_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027865 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027866} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027868_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027869cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027870_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027871
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027872cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027873
27874# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027875for ac_config_target in $ac_config_targets
27876do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027877 case $ac_config_target in
27878 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27879 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27880 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027881 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27882 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027883 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27884 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027885 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027886
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027887 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27888echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027889 { (exit 1); exit 1; }; };;
27890 esac
27891done
27892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027893
Martin v. Löwis11437992002-04-12 09:54:03 +000027894# If the user did not use the arguments to specify the items to instantiate,
27895# then the envvar interface is used. Set only those that are not.
27896# We use the long form for the default assignment because of an extremely
27897# bizarre bug on SunOS 4.1.3.
27898if $ac_need_defaults; then
27899 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27900 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27901fi
27902
Skip Montanaro6dead952003-09-25 14:50:04 +000027903# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027904# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027905# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027906# Hook for its removal unless debugging.
27907# Note that there is a small window in which the directory will not be cleaned:
27908# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027909$debug ||
27910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027911 tmp=
27912 trap 'exit_status=$?
27913 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27914' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027915 trap '{ (exit 1); exit 1; }' 1 2 13 15
27916}
Martin v. Löwis11437992002-04-12 09:54:03 +000027917# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027918
Martin v. Löwis11437992002-04-12 09:54:03 +000027919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027920 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027921 test -n "$tmp" && test -d "$tmp"
27922} ||
27923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027924 tmp=./conf$$-$RANDOM
27925 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027926} ||
27927{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027928 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027929 { (exit 1); exit 1; }
27930}
27931
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027932#
27933# Set up the sed scripts for CONFIG_FILES section.
27934#
27935
27936# No need to generate the scripts if there are no CONFIG_FILES.
27937# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027938if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027939
27940_ACEOF
27941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027944ac_delim='%!_!# '
27945for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027946 cat >conf$$subs.sed <<_ACEOF
27947SHELL!$SHELL$ac_delim
27948PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27949PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27950PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27951PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27952PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27953PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27954exec_prefix!$exec_prefix$ac_delim
27955prefix!$prefix$ac_delim
27956program_transform_name!$program_transform_name$ac_delim
27957bindir!$bindir$ac_delim
27958sbindir!$sbindir$ac_delim
27959libexecdir!$libexecdir$ac_delim
27960datarootdir!$datarootdir$ac_delim
27961datadir!$datadir$ac_delim
27962sysconfdir!$sysconfdir$ac_delim
27963sharedstatedir!$sharedstatedir$ac_delim
27964localstatedir!$localstatedir$ac_delim
27965includedir!$includedir$ac_delim
27966oldincludedir!$oldincludedir$ac_delim
27967docdir!$docdir$ac_delim
27968infodir!$infodir$ac_delim
27969htmldir!$htmldir$ac_delim
27970dvidir!$dvidir$ac_delim
27971pdfdir!$pdfdir$ac_delim
27972psdir!$psdir$ac_delim
27973libdir!$libdir$ac_delim
27974localedir!$localedir$ac_delim
27975mandir!$mandir$ac_delim
27976DEFS!$DEFS$ac_delim
27977ECHO_C!$ECHO_C$ac_delim
27978ECHO_N!$ECHO_N$ac_delim
27979ECHO_T!$ECHO_T$ac_delim
27980LIBS!$LIBS$ac_delim
27981build_alias!$build_alias$ac_delim
27982host_alias!$host_alias$ac_delim
27983target_alias!$target_alias$ac_delim
27984VERSION!$VERSION$ac_delim
27985SOVERSION!$SOVERSION$ac_delim
27986CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27987UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27988ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027989LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027990PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27991PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27992PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27993PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27994PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27995FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27996FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27997FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27998FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27999FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28000MACHDEP!$MACHDEP$ac_delim
28001SGI_ABI!$SGI_ABI$ac_delim
28002CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28003EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28004CC!$CC$ac_delim
28005CFLAGS!$CFLAGS$ac_delim
28006LDFLAGS!$LDFLAGS$ac_delim
28007CPPFLAGS!$CPPFLAGS$ac_delim
28008ac_ct_CC!$ac_ct_CC$ac_delim
28009EXEEXT!$EXEEXT$ac_delim
28010OBJEXT!$OBJEXT$ac_delim
28011CXX!$CXX$ac_delim
28012MAINCC!$MAINCC$ac_delim
28013CPP!$CPP$ac_delim
28014GREP!$GREP$ac_delim
28015EGREP!$EGREP$ac_delim
28016BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28017LIBRARY!$LIBRARY$ac_delim
28018LDLIBRARY!$LDLIBRARY$ac_delim
28019DLLLIBRARY!$DLLLIBRARY$ac_delim
28020BLDLIBRARY!$BLDLIBRARY$ac_delim
28021LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28022INSTSONAME!$INSTSONAME$ac_delim
28023RUNSHARED!$RUNSHARED$ac_delim
28024LINKCC!$LINKCC$ac_delim
28025GNULD!$GNULD$ac_delim
28026RANLIB!$RANLIB$ac_delim
28027AR!$AR$ac_delim
28028ARFLAGS!$ARFLAGS$ac_delim
28029SVNVERSION!$SVNVERSION$ac_delim
28030INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28031INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28032INSTALL_DATA!$INSTALL_DATA$ac_delim
28033LN!$LN$ac_delim
28034OPT!$OPT$ac_delim
28035BASECFLAGS!$BASECFLAGS$ac_delim
28036UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28037OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28038LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28039SO!$SO$ac_delim
28040LDSHARED!$LDSHARED$ac_delim
28041BLDSHARED!$BLDSHARED$ac_delim
28042CCSHARED!$CCSHARED$ac_delim
28043LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028044_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028045
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028046 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028047 break
28048 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028049 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28050echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028051 { (exit 1); exit 1; }; }
28052 else
28053 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028054 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028055done
28056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028057ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28058if test -n "$ac_eof"; then
28059 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28060 ac_eof=`expr $ac_eof + 1`
28061fi
28062
28063cat >>$CONFIG_STATUS <<_ACEOF
28064cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28065/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028066_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028067sed '
28068s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28069s/^/s,@/; s/!/@,|#_!!_#|/
28070:n
28071t n
28072s/'"$ac_delim"'$/,g/; t
28073s/$/\\/; p
28074N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28075' >>$CONFIG_STATUS <conf$$subs.sed
28076rm -f conf$$subs.sed
28077cat >>$CONFIG_STATUS <<_ACEOF
28078CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028079_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028080
28081
28082ac_delim='%!_!# '
28083for ac_last_try in false false false false false :; do
28084 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028085CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028086SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028087PKG_CONFIG!$PKG_CONFIG$ac_delim
28088LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028089USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28090SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28091USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28092LDLAST!$LDLAST$ac_delim
28093THREADOBJ!$THREADOBJ$ac_delim
28094DLINCLDIR!$DLINCLDIR$ac_delim
28095DYNLOADFILE!$DYNLOADFILE$ac_delim
28096MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28097TRUE!$TRUE$ac_delim
28098LIBOBJS!$LIBOBJS$ac_delim
28099HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28100HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28101HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28102HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28103HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28104LIBM!$LIBM$ac_delim
28105LIBC!$LIBC$ac_delim
28106THREADHEADERS!$THREADHEADERS$ac_delim
28107SRCDIRS!$SRCDIRS$ac_delim
28108LTLIBOBJS!$LTLIBOBJS$ac_delim
28109_ACEOF
28110
Benjamin Petersond78735d2010-01-01 16:04:23 +000028111 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028112 break
28113 elif $ac_last_try; then
28114 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28115echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028116 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028117 else
28118 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28119 fi
28120done
28121
28122ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28123if test -n "$ac_eof"; then
28124 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28125 ac_eof=`expr $ac_eof + 1`
28126fi
28127
28128cat >>$CONFIG_STATUS <<_ACEOF
28129cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28130/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028131_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028132sed '
28133s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28134s/^/s,@/; s/!/@,|#_!!_#|/
28135:n
28136t n
28137s/'"$ac_delim"'$/,g/; t
28138s/$/\\/; p
28139N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28140' >>$CONFIG_STATUS <conf$$subs.sed
28141rm -f conf$$subs.sed
28142cat >>$CONFIG_STATUS <<_ACEOF
28143:end
28144s/|#_!!_#|//g
28145CEOF$ac_eof
28146_ACEOF
28147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028148
28149# VPATH may cause trouble with some makes, so we remove $(srcdir),
28150# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28151# trailing colons and then remove the whole line if VPATH becomes empty
28152# (actually we leave an empty line to preserve line numbers).
28153if test "x$srcdir" = x.; then
28154 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28155s/:*\$(srcdir):*/:/
28156s/:*\${srcdir}:*/:/
28157s/:*@srcdir@:*/:/
28158s/^\([^=]*=[ ]*\):*/\1/
28159s/:*$//
28160s/^[^=]*=[ ]*$//
28161}'
28162fi
28163
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028164cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028165fi # test -n "$CONFIG_FILES"
28166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028168for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028169do
28170 case $ac_tag in
28171 :[FHLC]) ac_mode=$ac_tag; continue;;
28172 esac
28173 case $ac_mode$ac_tag in
28174 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028175 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28176echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028177 { (exit 1); exit 1; }; };;
28178 :[FH]-) ac_tag=-:-;;
28179 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28180 esac
28181 ac_save_IFS=$IFS
28182 IFS=:
28183 set x $ac_tag
28184 IFS=$ac_save_IFS
28185 shift
28186 ac_file=$1
28187 shift
28188
28189 case $ac_mode in
28190 :L) ac_source=$1;;
28191 :[FH])
28192 ac_file_inputs=
28193 for ac_f
28194 do
28195 case $ac_f in
28196 -) ac_f="$tmp/stdin";;
28197 *) # Look for the file first in the build tree, then in the source tree
28198 # (if the path is not absolute). The absolute path cannot be DOS-style,
28199 # because $ac_f cannot contain `:'.
28200 test -f "$ac_f" ||
28201 case $ac_f in
28202 [\\/$]*) false;;
28203 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28204 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028205 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28206echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028207 { (exit 1); exit 1; }; };;
28208 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028209 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028210 done
28211
28212 # Let's still pretend it is `configure' which instantiates (i.e., don't
28213 # use $as_me), people would be surprised to read:
28214 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028215 configure_input="Generated from "`IFS=:
28216 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028217 if test x"$ac_file" != x-; then
28218 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028219 { echo "$as_me:$LINENO: creating $ac_file" >&5
28220echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028221 fi
28222
28223 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028224 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028225 esac
28226 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028227 esac
28228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028229 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028230$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028231 X"$ac_file" : 'X\(//\)[^/]' \| \
28232 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028233 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028234echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28236 s//\1/
28237 q
28238 }
28239 /^X\(\/\/\)[^/].*/{
28240 s//\1/
28241 q
28242 }
28243 /^X\(\/\/\)$/{
28244 s//\1/
28245 q
28246 }
28247 /^X\(\/\).*/{
28248 s//\1/
28249 q
28250 }
28251 s/.*/./; q'`
28252 { as_dir="$ac_dir"
28253 case $as_dir in #(
28254 -*) as_dir=./$as_dir;;
28255 esac
28256 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028257 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028258 while :; do
28259 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028260 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028261 *) as_qdir=$as_dir;;
28262 esac
28263 as_dirs="'$as_qdir' $as_dirs"
28264 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028265$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028266 X"$as_dir" : 'X\(//\)[^/]' \| \
28267 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028268 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028269echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028270 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28271 s//\1/
28272 q
28273 }
28274 /^X\(\/\/\)[^/].*/{
28275 s//\1/
28276 q
28277 }
28278 /^X\(\/\/\)$/{
28279 s//\1/
28280 q
28281 }
28282 /^X\(\/\).*/{
28283 s//\1/
28284 q
28285 }
28286 s/.*/./; q'`
28287 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028288 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028289 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028290 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28291echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028292 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028293 ac_builddir=.
28294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028295case "$ac_dir" in
28296.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28297*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028298 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028299 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028300 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028301 case $ac_top_builddir_sub in
28302 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28303 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28304 esac ;;
28305esac
28306ac_abs_top_builddir=$ac_pwd
28307ac_abs_builddir=$ac_pwd$ac_dir_suffix
28308# for backward compatibility:
28309ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028310
28311case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028312 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028313 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028314 ac_top_srcdir=$ac_top_builddir_sub
28315 ac_abs_top_srcdir=$ac_pwd ;;
28316 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028317 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028318 ac_top_srcdir=$srcdir
28319 ac_abs_top_srcdir=$srcdir ;;
28320 *) # Relative name.
28321 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28322 ac_top_srcdir=$ac_top_build_prefix$srcdir
28323 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028324esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028325ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028326
Martin v. Löwis11437992002-04-12 09:54:03 +000028327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028328 case $ac_mode in
28329 :F)
28330 #
28331 # CONFIG_FILE
28332 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028333
28334 case $INSTALL in
28335 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028336 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028337 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028339
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028340cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028341# If the template does not know about datarootdir, expand it.
28342# FIXME: This hack should be removed a few years after 2.60.
28343ac_datarootdir_hack=; ac_datarootdir_seen=
28344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028345case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028346 p
28347 q
28348}
28349/@datadir@/p
28350/@docdir@/p
28351/@infodir@/p
28352/@localedir@/p
28353/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028354' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028355*datarootdir*) ac_datarootdir_seen=yes;;
28356*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028357 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28358echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028359_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028360cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028361 ac_datarootdir_hack='
28362 s&@datadir@&$datadir&g
28363 s&@docdir@&$docdir&g
28364 s&@infodir@&$infodir&g
28365 s&@localedir@&$localedir&g
28366 s&@mandir@&$mandir&g
28367 s&\\\${datarootdir}&$datarootdir&g' ;;
28368esac
28369_ACEOF
28370
28371# Neutralize VPATH when `$srcdir' = `.'.
28372# Shell code in configure.ac might set extrasub.
28373# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028374cat >>$CONFIG_STATUS <<_ACEOF
28375 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028376$extrasub
28377_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028378cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028379:t
28380/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028381s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028382s&@top_builddir@&$ac_top_builddir_sub&;t t
28383s&@srcdir@&$ac_srcdir&;t t
28384s&@abs_srcdir@&$ac_abs_srcdir&;t t
28385s&@top_srcdir@&$ac_top_srcdir&;t t
28386s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28387s&@builddir@&$ac_builddir&;t t
28388s&@abs_builddir@&$ac_abs_builddir&;t t
28389s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28390s&@INSTALL@&$ac_INSTALL&;t t
28391$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028392" $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 +000028393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028394test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28395 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28396 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028397 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028398which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028399echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028400which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028402 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028403 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028404 -) cat "$tmp/out"; rm -f "$tmp/out";;
28405 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028407 ;;
28408 :H)
28409 #
28410 # CONFIG_HEADER
28411 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028412_ACEOF
28413
28414# Transform confdefs.h into a sed script `conftest.defines', that
28415# substitutes the proper values into config.h.in to produce config.h.
28416rm -f conftest.defines conftest.tail
28417# First, append a space to every undef/define line, to ease matching.
28418echo 's/$/ /' >conftest.defines
28419# Then, protect against being on the right side of a sed subst, or in
28420# an unquoted here document, in config.status. If some macros were
28421# called several times there might be several #defines for the same
28422# symbol, which is useless. But do not sort them, since the last
28423# AC_DEFINE must be honored.
28424ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28425# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28426# NAME is the cpp macro being defined, VALUE is the value it is being given.
28427# PARAMS is the parameter list in the macro definition--in most cases, it's
28428# just an empty string.
28429ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28430ac_dB='\\)[ (].*,\\1define\\2'
28431ac_dC=' '
28432ac_dD=' ,'
28433
28434uniq confdefs.h |
28435 sed -n '
28436 t rset
28437 :rset
28438 s/^[ ]*#[ ]*define[ ][ ]*//
28439 t ok
28440 d
28441 :ok
28442 s/[\\&,]/\\&/g
28443 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28444 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28445 ' >>conftest.defines
28446
28447# Remove the space that was appended to ease matching.
28448# Then replace #undef with comments. This is necessary, for
28449# example, in the case of _POSIX_SOURCE, which is predefined and required
28450# on some systems where configure will not decide to define it.
28451# (The regexp can be short, since the line contains either #define or #undef.)
28452echo 's/ $//
28453s,^[ #]*u.*,/* & */,' >>conftest.defines
28454
28455# Break up conftest.defines:
28456ac_max_sed_lines=50
28457
28458# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28459# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28460# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28461# et cetera.
28462ac_in='$ac_file_inputs'
28463ac_out='"$tmp/out1"'
28464ac_nxt='"$tmp/out2"'
28465
28466while :
28467do
28468 # Write a here document:
28469 cat >>$CONFIG_STATUS <<_ACEOF
28470 # First, check the format of the line:
28471 cat >"\$tmp/defines.sed" <<\\CEOF
28472/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28473/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28474b
28475:def
28476_ACEOF
28477 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28478 echo 'CEOF
28479 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28480 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28481 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28482 grep . conftest.tail >/dev/null || break
28483 rm -f conftest.defines
28484 mv conftest.tail conftest.defines
28485done
28486rm -f conftest.defines conftest.tail
28487
28488echo "ac_result=$ac_in" >>$CONFIG_STATUS
28489cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028490 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028491 echo "/* $configure_input */" >"$tmp/config.h"
28492 cat "$ac_result" >>"$tmp/config.h"
28493 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28494 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28495echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028496 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028497 rm -f $ac_file
28498 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028499 fi
28500 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028501 echo "/* $configure_input */"
28502 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028503 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028504 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028505 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028507
28508 esac
28509
28510done # for ac_tag
28511
Guido van Rossum627b2d71993-12-24 10:39:16 +000028512
Martin v. Löwis11437992002-04-12 09:54:03 +000028513{ (exit 0); exit 0; }
28514_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028515chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028516ac_clean_files=$ac_clean_files_save
28517
28518
28519# configure is writing to config.log, and then calls config.status.
28520# config.status does its own redirection, appending to config.log.
28521# Unfortunately, on DOS this fails, as config.log is still kept open
28522# by configure, so config.status won't be able to write to it; its
28523# output is simply discarded. So we exec the FD to /dev/null,
28524# effectively closing config.log, so it can be properly (re)opened and
28525# appended to by config.status. When coming back to configure, we
28526# need to make the FD available again.
28527if test "$no_create" != yes; then
28528 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028529 ac_config_status_args=
28530 test "$silent" = yes &&
28531 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028532 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028533 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028534 exec 5>>config.log
28535 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28536 # would make configure fail if this is the last instruction.
28537 $ac_cs_success || { (exit 1); exit 1; }
28538fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028539
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028540
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028541echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028542if test ! -f Modules/Setup
28543then
28544 cp $srcdir/Modules/Setup.dist Modules/Setup
28545fi
28546
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028547echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028548if test ! -f Modules/Setup.local
28549then
28550 echo "# Edit this file for local setup changes" >Modules/Setup.local
28551fi
28552
28553echo "creating Makefile"
28554$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28555 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028556 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028557mv config.c Modules