blob: 831cdda7bc14cfa3d105e16c15ce26b99ab6659c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersoned68afa2010-01-30 19:36:43 +00002# From configure.in Revision: 77216 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001889# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001890if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892 case $enableval in
1893 yes)
1894 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1895 ;;
1896 esac
1897 case $enableval in
1898 no)
1899 UNIVERSALSDK=
1900 enable_universalsdk=
1901 ;;
1902 *)
1903 UNIVERSALSDK=$enableval
1904 ;;
1905 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001906
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907else
1908
1909 UNIVERSALSDK=
1910 enable_universalsdk=
1911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001912fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001913
1914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001915
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001916
1917
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001918UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001920{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1921echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922
1923# Check whether --with-universal-archs was given.
1924if test "${with_universal_archs+set}" = set; then
1925 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001926 { echo "$as_me:$LINENO: result: $withval" >&5
1927echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928 UNIVERSAL_ARCHS="$withval"
1929
1930else
1931
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001932 { echo "$as_me:$LINENO: result: 32-bit" >&5
1933echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001934
1935fi
1936
1937
1938
1939
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001940
1941# Check whether --with-framework-name was given.
1942if test "${with_framework_name+set}" = set; then
1943 withval=$with_framework_name;
1944 PYTHONFRAMEWORK=${withval}
1945 PYTHONFRAMEWORKDIR=${withval}.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1947
1948else
1949
1950 PYTHONFRAMEWORK=Python
1951 PYTHONFRAMEWORKDIR=Python.framework
1952 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1953
1954fi
1955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001956# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001957if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001958 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001959 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001960 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001961 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001962 esac
1963 case $enableval in
1964 no)
1965 PYTHONFRAMEWORK=
1966 PYTHONFRAMEWORKDIR=no-framework
1967 PYTHONFRAMEWORKPREFIX=
1968 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001969 FRAMEWORKINSTALLFIRST=
1970 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001971 FRAMEWORKALTINSTALLFIRST=
1972 FRAMEWORKALTINSTALLLAST=
1973 if test "x${prefix}" = "xNONE"; then
1974 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1975 else
1976 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1977 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001979 ;;
1980 *)
1981 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001982 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001983 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001984 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
1986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002025fi
2026
Thomas Wouters477c8d52006-05-27 19:21:47 +00002027
2028
Michael W. Hudson54241132001-12-07 15:38:26 +00002029
2030
2031
2032
Jack Jansene578a632001-08-15 01:27:14 +00002033
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002034
2035
2036
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002037
Jack Jansene578a632001-08-15 01:27:14 +00002038##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002039## AC_HELP_STRING(--with-dyld,
2040## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002041##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042# Set name for machine-dependent library files
2043
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002044{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2045echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046if test -z "$MACHDEP"
2047then
Guido van Rossum563e7081996-09-10 18:20:48 +00002048 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002049 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002050 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002054 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_md_system=`echo $ac_sys_system |
2056 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2057 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002058 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002059 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002060
Guido van Rossum07397971997-04-29 21:49:50 +00002061 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002062 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002063 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002064 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002065 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066 esac
2067fi
Guido van Rossum91922671997-10-09 20:24:13 +00002068
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002069# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2070# disable features if it is defined, without any means to access these
2071# features as extensions. For these systems, we skip the definition of
2072# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2073# some feature, make sure there is no alternative way to access this
2074# feature. Also, when using wildcards, make sure you have verified the
2075# need for not defining _XOPEN_SOURCE on all systems matching the
2076# wildcard, and that the wildcard does not include future systems
2077# (which may remove their limitations).
2078case $ac_sys_system/$ac_sys_release in
2079 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2080 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002081 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002082 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002083 define_xopen_source=no
2084 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2085 # also defined. This can be overridden by defining _BSD_SOURCE
2086 # As this has a different meaning on Linux, only define it on OpenBSD
2087
2088cat >>confdefs.h <<\_ACEOF
2089#define _BSD_SOURCE 1
2090_ACEOF
2091
2092 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002093 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2094 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2095 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002096 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002097 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002098 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2099 # of union __?sigval. Reported by Stuart Bishop.
2100 SunOS/5.6)
2101 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002102 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2103 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002104 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002105 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 define_xopen_source=no;;
2107 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002108 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002109 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002110 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002111 # On FreeBSD 4, the math functions C89 does not cover are never defined
2112 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2113 FreeBSD/4.*)
2114 define_xopen_source=no;;
2115 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2116 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2117 # identifies itself as Darwin/7.*
2118 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2119 # disables platform specific features beyond repair.
2120 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2121 # has no effect, don't bother defining them
2122 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002123 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002124 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2125 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2126 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002127 AIX/4)
2128 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002129 AIX/5)
2130 if test `uname -r` -eq 1; then
2131 define_xopen_source=no
2132 fi
2133 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002134 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2135 # defining NI_NUMERICHOST.
2136 QNX/6.3.2)
2137 define_xopen_source=no
2138 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002139
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002140esac
2141
2142if test $define_xopen_source = yes
2143then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002144 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2145 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002146 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2147 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002149 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150
2151cat >>confdefs.h <<\_ACEOF
2152#define _XOPEN_SOURCE 500
2153_ACEOF
2154
2155 ;;
2156 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002157
2158cat >>confdefs.h <<\_ACEOF
2159#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002160_ACEOF
2161
Skip Montanarof0d5f792004-08-15 14:08:23 +00002162 ;;
2163 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002164
2165 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2166 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2167 # several APIs are not declared. Since this is also needed in some
2168 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002169 # except for Solaris 10, where it must not be defined,
2170 # as it implies XPG4.2
2171 case $ac_sys_system/$ac_sys_release in
2172 SunOS/5.10)
2173 ;;
2174 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE_EXTENDED 1
2178_ACEOF
2179
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 ;;
2181 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002183
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002184cat >>confdefs.h <<\_ACEOF
2185#define _POSIX_C_SOURCE 200112L
2186_ACEOF
2187
2188
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002189fi
2190
Guido van Rossum91922671997-10-09 20:24:13 +00002191#
2192# SGI compilers allow the specification of the both the ABI and the
2193# ISA on the command line. Depending on the values of these switches,
2194# different and often incompatable code will be generated.
2195#
2196# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2197# thus supply support for various ABI/ISA combinations. The MACHDEP
2198# variable is also adjusted.
2199#
2200
2201if test ! -z "$SGI_ABI"
2202then
2203 CC="cc $SGI_ABI"
2204 LDFLAGS="$SGI_ABI $LDFLAGS"
2205 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2206fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002207{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2208echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002209
Jack Jansen6b08a402004-06-03 12:41:45 +00002210# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2211# it may influence the way we can build extensions, so distutils
2212# needs to check it
2213
Thomas Wouters477c8d52006-05-27 19:21:47 +00002214
Jack Jansen6b08a402004-06-03 12:41:45 +00002215CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002216EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002217
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002218{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2219echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002220ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002221{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2222echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002223
Guido van Rossum627b2d71993-12-24 10:39:16 +00002224# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002225
2226# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2227# for debug/optimization stuff. BASECFLAGS is for flags that are required
2228# just to get things to compile and link. Users are free to override OPT
2229# when running configure or make. The build should not break if they do.
2230# BASECFLAGS should generally not be messed with, however.
2231
2232# XXX shouldn't some/most/all of this code be merged with the stuff later
2233# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002234{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2235echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002237# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002238if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002239 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002240 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002241 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002242 without_gcc=yes;;
2243 yes) CC=gcc
2244 without_gcc=no;;
2245 *) CC=$withval
2246 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002247 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248else
Martin v. Löwis11437992002-04-12 09:54:03 +00002249
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002250 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002251 AIX*) CC=cc_r
2252 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002253 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002255fi
2256
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002257{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2258echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002259
Guido van Rossum8b131c51995-03-09 14:10:13 +00002260# If the user switches compilers, we can't believe the cache
2261if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2262then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002263 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002264(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002265echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002266(it is also a good idea to do 'make clean' before compiling)" >&2;}
2267 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002268fi
2269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270ac_ext=c
2271ac_cpp='$CPP $CPPFLAGS'
2272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2274ac_compiler_gnu=$ac_cv_c_compiler_gnu
2275if test -n "$ac_tool_prefix"; then
2276 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2277set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002282else
2283 if test -n "$CC"; then
2284 ac_cv_prog_CC="$CC" # Let the user override the test.
2285else
Martin v. Löwis11437992002-04-12 09:54:03 +00002286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002295 break 2
2296 fi
2297done
2298done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
Jack Jansendd19cf82001-12-06 22:36:17 +00002301fi
2302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002303CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002304if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002305 { echo "$as_me:$LINENO: result: $CC" >&5
2306echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002312
Martin v. Löwis11437992002-04-12 09:54:03 +00002313fi
2314if test -z "$ac_cv_prog_CC"; then
2315 ac_ct_CC=$CC
2316 # Extract the first word of "gcc", so it can be a program name with args.
2317set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002322else
2323 if test -n "$ac_ct_CC"; then
2324 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2325else
2326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002333 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002335 break 2
2336 fi
2337done
2338done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341fi
2342fi
2343ac_ct_CC=$ac_cv_prog_ac_ct_CC
2344if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002345 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2346echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002348 { echo "$as_me:$LINENO: result: no" >&5
2349echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002352 if test "x$ac_ct_CC" = x; then
2353 CC=""
2354 else
2355 case $cross_compiling:$ac_tool_warned in
2356yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002357{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2358whose name does not start with the host triplet. If you think this
2359configuration is useful to you, please write to autoconf@gnu.org." >&5
2360echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2361whose name does not start with the host triplet. If you think this
2362configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363ac_tool_warned=yes ;;
2364esac
2365 CC=$ac_ct_CC
2366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002367else
2368 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002369fi
2370
Jack Jansendd19cf82001-12-06 22:36:17 +00002371if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372 if test -n "$ac_tool_prefix"; then
2373 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002374set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002378 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Martin v. Löwis11437992002-04-12 09:54:03 +00002383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
2388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002392 break 2
2393 fi
2394done
2395done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398fi
2399fi
2400CC=$ac_cv_prog_CC
2401if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002402 { echo "$as_me:$LINENO: result: $CC" >&5
2403echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002405 { echo "$as_me:$LINENO: result: no" >&5
2406echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002407fi
2408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412if test -z "$CC"; then
2413 # Extract the first word of "cc", so it can be a program name with args.
2414set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002419else
2420 if test -n "$CC"; then
2421 ac_cv_prog_CC="$CC" # Let the user override the test.
2422else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425for as_dir in $PATH
2426do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2432 ac_prog_rejected=yes
2433 continue
2434 fi
2435 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 break 2
2438 fi
2439done
2440done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002443if test $ac_prog_rejected = yes; then
2444 # We found a bogon in the path, so make sure we never use it.
2445 set dummy $ac_cv_prog_CC
2446 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448 # We chose a different compiler from the bogus one.
2449 # However, it has the same basename, so the bogon will be chosen
2450 # first if we set CC to just the basename; use the full file name.
2451 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 fi
2454fi
2455fi
2456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002457CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002459 { echo "$as_me:$LINENO: result: $CC" >&5
2460echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002462 { echo "$as_me:$LINENO: result: no" >&5
2463echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464fi
2465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466
Martin v. Löwis11437992002-04-12 09:54:03 +00002467fi
2468if test -z "$CC"; then
2469 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 do
2472 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2473set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002478else
2479 if test -n "$CC"; then
2480 ac_cv_prog_CC="$CC" # Let the user override the test.
2481else
Martin v. Löwis11437992002-04-12 09:54:03 +00002482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
2487 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493done
2494done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002496
2497fi
2498fi
2499CC=$ac_cv_prog_CC
2500if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002501 { echo "$as_me:$LINENO: result: $CC" >&5
2502echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002504 { echo "$as_me:$LINENO: result: no" >&5
2505echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002506fi
2507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 test -n "$CC" && break
2510 done
2511fi
2512if test -z "$CC"; then
2513 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
2516 # Extract the first word of "$ac_prog", so it can be a program name with args.
2517set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002522else
2523 if test -n "$ac_ct_CC"; then
2524 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2525else
2526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 break 2
2536 fi
2537done
2538done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541fi
2542fi
2543ac_ct_CC=$ac_cv_prog_ac_ct_CC
2544if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002545 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2546echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 test -n "$ac_ct_CC" && break
2554done
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 if test "x$ac_ct_CC" = x; then
2557 CC=""
2558 else
2559 case $cross_compiling:$ac_tool_warned in
2560yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002561{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2562whose name does not start with the host triplet. If you think this
2563configuration is useful to you, please write to autoconf@gnu.org." >&5
2564echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2565whose name does not start with the host triplet. If you think this
2566configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567ac_tool_warned=yes ;;
2568esac
2569 CC=$ac_ct_CC
2570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002571fi
2572
2573fi
2574
2575
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002577See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002578echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002579See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583echo "$as_me:$LINENO: checking for C compiler version" >&5
2584ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585{ (ac_try="$ac_compiler --version >&5"
2586case "(($ac_try" in
2587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2588 *) ac_try_echo=$ac_try;;
2589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595{ (ac_try="$ac_compiler -v >&5"
2596case "(($ac_try" in
2597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2598 *) ac_try_echo=$ac_try;;
2599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605{ (ac_try="$ac_compiler -V >&5"
2606case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 (exit $ac_status); }
2615
2616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002617/* confdefs.h. */
2618_ACEOF
2619cat confdefs.h >>conftest.$ac_ext
2620cat >>conftest.$ac_ext <<_ACEOF
2621/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623int
2624main ()
2625{
2626
2627 ;
2628 return 0;
2629}
2630_ACEOF
2631ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002632ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633# Try to create an executable without -o first, disregard a.out.
2634# It will help us diagnose broken compilers, and finding out an intuition
2635# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2637echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2638ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2639#
2640# List of possible output files, starting from the most likely.
2641# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2642# only as a last resort. b.out is created by i960 compilers.
2643ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2644#
2645# The IRIX 6 linker writes into existing files which may not be
2646# executable, retaining their permissions. Remove them first so a
2647# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648ac_rmfiles=
2649for ac_file in $ac_files
2650do
2651 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002652 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2654 esac
2655done
2656rm -f $ac_rmfiles
2657
2658if { (ac_try="$ac_link_default"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2669# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2670# in a Makefile. We should not override ac_cv_exeext if it was cached,
2671# so that the user can short-circuit this test for compilers unknown to
2672# Autoconf.
2673for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002674do
2675 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002677 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002678 ;;
2679 [ab].out )
2680 # We found the default executable, but exeext='' is most
2681 # certainly right.
2682 break;;
2683 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2685 then :; else
2686 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2687 fi
2688 # We set ac_cv_exeext here because the later test for it is not
2689 # safe: cross compilers may not add the suffix if given an `-o'
2690 # argument, so we may need to know it at that point already.
2691 # Even if this section looks crufty: it has the advantage of
2692 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002693 break;;
2694 * )
2695 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 esac
2697done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698test "$ac_cv_exeext" = no && ac_cv_exeext=
2699
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002700else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 ac_file=''
2702fi
2703
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002704{ echo "$as_me:$LINENO: result: $ac_file" >&5
2705echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002708sed 's/^/| /' conftest.$ac_ext >&5
2709
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002711See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002713See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002715fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002716
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002717ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002720# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002721{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2722echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002723# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2724# If not cross compiling, check that we can run a simple program.
2725if test "$cross_compiling" != yes; then
2726 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002727 { (case "(($ac_try" in
2728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2729 *) ac_try_echo=$ac_try;;
2730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 (exit $ac_status); }; }; then
2736 cross_compiling=no
2737 else
2738 if test "$cross_compiling" = maybe; then
2739 cross_compiling=yes
2740 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002741 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002742If you meant to cross compile, use \`--host'.
2743See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002744echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002745If you meant to cross compile, use \`--host'.
2746See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 fi
2749 fi
2750fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751{ echo "$as_me:$LINENO: result: yes" >&5
2752echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002753
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002754rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002757# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2759echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2760{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2761echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002763{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2764echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765if { (ac_try="$ac_link"
2766case "(($ac_try" in
2767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2768 *) ac_try_echo=$ac_try;;
2769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002775 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2776# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2777# work properly (i.e., refer to `conftest.exe'), while it won't with
2778# `rm'.
2779for ac_file in conftest.exe conftest conftest.*; do
2780 test -f "$ac_file" || continue
2781 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002782 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002783 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2784 break;;
2785 * ) break;;
2786 esac
2787done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002790See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002792See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002794fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2798echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002799
2800rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002801EXEEXT=$ac_cv_exeext
2802ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2804echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002805if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002806 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002807else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808 cat >conftest.$ac_ext <<_ACEOF
2809/* confdefs.h. */
2810_ACEOF
2811cat confdefs.h >>conftest.$ac_ext
2812cat >>conftest.$ac_ext <<_ACEOF
2813/* end confdefs.h. */
2814
2815int
2816main ()
2817{
2818
2819 ;
2820 return 0;
2821}
2822_ACEOF
2823rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824if { (ac_try="$ac_compile"
2825case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 for ac_file in conftest.o conftest.obj conftest.*; do
2835 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2839 break;;
2840 esac
2841done
2842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002844sed 's/^/| /' conftest.$ac_ext >&5
2845
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002846{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002849See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851fi
2852
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002853rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002855{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2856echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857OBJEXT=$ac_cv_objext
2858ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2860echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002863else
2864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002865/* confdefs.h. */
2866_ACEOF
2867cat confdefs.h >>conftest.$ac_ext
2868cat >>conftest.$ac_ext <<_ACEOF
2869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002870
Martin v. Löwis11437992002-04-12 09:54:03 +00002871int
2872main ()
2873{
2874#ifndef __GNUC__
2875 choke me
2876#endif
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002891 grep -v '^ *+' conftest.er1 >conftest.err
2892 rm -f conftest.er1
2893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (exit $ac_status); } && {
2896 test -z "$ac_c_werror_flag" ||
2897 test ! -s conftest.err
2898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_compiler_gnu=yes
2900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002902sed 's/^/| /' conftest.$ac_ext >&5
2903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906
2907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002908ac_cv_c_compiler_gnu=$ac_compiler_gnu
2909
2910fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002911{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2912echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2913GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_test_CFLAGS=${CFLAGS+set}
2915ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002916{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2917echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002920else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002921 ac_save_c_werror_flag=$ac_c_werror_flag
2922 ac_c_werror_flag=yes
2923 ac_cv_prog_cc_g=no
2924 CFLAGS="-g"
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932int
2933main ()
2934{
2935
2936 ;
2937 return 0;
2938}
2939_ACEOF
2940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941if { (ac_try="$ac_compile"
2942case "(($ac_try" in
2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 *) ac_try_echo=$ac_try;;
2945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002949 grep -v '^ *+' conftest.er1 >conftest.err
2950 rm -f conftest.er1
2951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (exit $ac_status); } && {
2954 test -z "$ac_c_werror_flag" ||
2955 test ! -s conftest.err
2956 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002957 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002960sed 's/^/| /' conftest.$ac_ext >&5
2961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 CFLAGS=""
2963 cat >conftest.$ac_ext <<_ACEOF
2964/* confdefs.h. */
2965_ACEOF
2966cat confdefs.h >>conftest.$ac_ext
2967cat >>conftest.$ac_ext <<_ACEOF
2968/* end confdefs.h. */
2969
2970int
2971main ()
2972{
2973
2974 ;
2975 return 0;
2976}
2977_ACEOF
2978rm -f conftest.$ac_objext
2979if { (ac_try="$ac_compile"
2980case "(($ac_try" in
2981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2982 *) ac_try_echo=$ac_try;;
2983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002985 (eval "$ac_compile") 2>conftest.er1
2986 ac_status=$?
2987 grep -v '^ *+' conftest.er1 >conftest.err
2988 rm -f conftest.er1
2989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (exit $ac_status); } && {
2992 test -z "$ac_c_werror_flag" ||
2993 test ! -s conftest.err
2994 } && test -s conftest.$ac_objext; then
2995 :
2996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002997 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998sed 's/^/| /' conftest.$ac_ext >&5
2999
3000 ac_c_werror_flag=$ac_save_c_werror_flag
3001 CFLAGS="-g"
3002 cat >conftest.$ac_ext <<_ACEOF
3003/* confdefs.h. */
3004_ACEOF
3005cat confdefs.h >>conftest.$ac_ext
3006cat >>conftest.$ac_ext <<_ACEOF
3007/* end confdefs.h. */
3008
3009int
3010main ()
3011{
3012
3013 ;
3014 return 0;
3015}
3016_ACEOF
3017rm -f conftest.$ac_objext
3018if { (ac_try="$ac_compile"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 (eval "$ac_compile") 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (exit $ac_status); } && {
3031 test -z "$ac_c_werror_flag" ||
3032 test ! -s conftest.err
3033 } && test -s conftest.$ac_objext; then
3034 ac_cv_prog_cc_g=yes
3035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003036 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037sed 's/^/| /' conftest.$ac_ext >&5
3038
3039
Guido van Rossum627b2d71993-12-24 10:39:16 +00003040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041
3042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
3045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3046fi
3047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3049 ac_c_werror_flag=$ac_save_c_werror_flag
3050fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003051{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3052echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055elif test $ac_cv_prog_cc_g = yes; then
3056 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003057 CFLAGS="-g -O2"
3058 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060 fi
3061else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003062 if test "$GCC" = yes; then
3063 CFLAGS="-O2"
3064 else
3065 CFLAGS=
3066 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003068{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3069echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003071 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003072else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003074ac_save_CC=$CC
3075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003076/* confdefs.h. */
3077_ACEOF
3078cat confdefs.h >>conftest.$ac_ext
3079cat >>conftest.$ac_ext <<_ACEOF
3080/* end confdefs.h. */
3081#include <stdarg.h>
3082#include <stdio.h>
3083#include <sys/types.h>
3084#include <sys/stat.h>
3085/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3086struct buf { int x; };
3087FILE * (*rcsopen) (struct buf *, struct stat *, int);
3088static char *e (p, i)
3089 char **p;
3090 int i;
3091{
3092 return p[i];
3093}
3094static char *f (char * (*g) (char **, int), char **p, ...)
3095{
3096 char *s;
3097 va_list v;
3098 va_start (v,p);
3099 s = g (p, va_arg (v,int));
3100 va_end (v);
3101 return s;
3102}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003103
3104/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3105 function prototypes and stuff, but not '\xHH' hex character constants.
3106 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3109 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003111int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3114 inside strings and character constants. */
3115#define FOO(x) 'x'
3116int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3117
Skip Montanaro6dead952003-09-25 14:50:04 +00003118int test (int i, double x);
3119struct s1 {int (*f) (int a);};
3120struct s2 {int (*f) (double a);};
3121int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3122int argc;
3123char **argv;
3124int
3125main ()
3126{
3127return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3128 ;
3129 return 0;
3130}
3131_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003132for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3133 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003134do
3135 CC="$ac_save_CC $ac_arg"
3136 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137if { (ac_try="$ac_compile"
3138case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 grep -v '^ *+' conftest.er1 >conftest.err
3146 rm -f conftest.er1
3147 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (exit $ac_status); } && {
3150 test -z "$ac_c_werror_flag" ||
3151 test ! -s conftest.err
3152 } && test -s conftest.$ac_objext; then
3153 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003156sed 's/^/| /' conftest.$ac_ext >&5
3157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158
Skip Montanaro6dead952003-09-25 14:50:04 +00003159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160
3161rm -f core conftest.err conftest.$ac_objext
3162 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003163done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003165CC=$ac_save_CC
3166
3167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168# AC_CACHE_VAL
3169case "x$ac_cv_prog_cc_c89" in
3170 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003171 { echo "$as_me:$LINENO: result: none needed" >&5
3172echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003174 { echo "$as_me:$LINENO: result: unsupported" >&5
3175echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003176 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3179echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180esac
3181
Skip Montanaro6dead952003-09-25 14:50:04 +00003182
Martin v. Löwis11437992002-04-12 09:54:03 +00003183ac_ext=c
3184ac_cpp='$CPP $CPPFLAGS'
3185ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3186ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3187ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003189
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003190
3191
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3193echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
3199 case $withval in
3200 no) with_cxx_main=no
3201 MAINCC='$(CC)';;
3202 yes) with_cxx_main=yes
3203 MAINCC='$(CXX)';;
3204 *) with_cxx_main=yes
3205 MAINCC=$withval
3206 if test -z "$CXX"
3207 then
3208 CXX=$withval
3209 fi;;
3210 esac
3211else
3212
3213 with_cxx_main=no
3214 MAINCC='$(CC)'
3215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216fi
3217
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003218{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3219echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003220
3221preset_cxx="$CXX"
3222if test -z "$CXX"
3223then
3224 case "$CC" in
3225 gcc) # Extract the first word of "g++", so it can be a program name with args.
3226set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003227{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3228echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003230 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231else
3232 case $CXX in
3233 [\\/]* | ?:[\\/]*)
3234 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3235 ;;
3236 *)
3237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in notfound
3239do
3240 IFS=$as_save_IFS
3241 test -z "$as_dir" && as_dir=.
3242 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003244 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003246 break 2
3247 fi
3248done
3249done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003251
3252 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3253 ;;
3254esac
3255fi
3256CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003257if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003258 { echo "$as_me:$LINENO: result: $CXX" >&5
3259echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003261 { echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003265 ;;
3266 cc) # Extract the first word of "c++", so it can be a program name with args.
3267set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003268{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003271 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272else
3273 case $CXX in
3274 [\\/]* | ?:[\\/]*)
3275 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3276 ;;
3277 *)
3278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in notfound
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
3283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003285 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003287 break 2
3288 fi
3289done
3290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292
3293 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3294 ;;
3295esac
3296fi
3297CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003299 { echo "$as_me:$LINENO: result: $CXX" >&5
3300echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003306 ;;
3307 esac
3308 if test "$CXX" = "notfound"
3309 then
3310 CXX=""
3311 fi
3312fi
3313if test -z "$CXX"
3314then
3315 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3316do
3317 # Extract the first word of "$ac_prog", so it can be a program name with args.
3318set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003319{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003321if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003322 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003323else
3324 if test -n "$CXX"; then
3325 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3326else
3327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003336 break 2
3337 fi
3338done
3339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341
3342fi
3343fi
3344CXX=$ac_cv_prog_CXX
3345if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003351fi
3352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354 test -n "$CXX" && break
3355done
3356test -n "$CXX" || CXX="notfound"
3357
3358 if test "$CXX" = "notfound"
3359 then
3360 CXX=""
3361 fi
3362fi
3363if test "$preset_cxx" != "$CXX"
3364then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003365 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003366
3367 By default, distutils will build C++ extension modules with \"$CXX\".
3368 If this is not intended, then set CXX on the configure command line.
3369 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&2;}
3375fi
3376
3377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003378# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003379
3380ac_ext=c
3381ac_cpp='$CPP $CPPFLAGS'
3382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3384ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003385{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3386echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387# On Suns, sometimes $CPP names a directory.
3388if test -n "$CPP" && test -d "$CPP"; then
3389 CPP=
3390fi
3391if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003394else
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 # Double quotes because CPP needs to be expanded
3396 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3397 do
3398 ac_preproc_ok=false
3399for ac_c_preproc_warn_flag in '' yes
3400do
3401 # Use a header file that comes with gcc, so configuring glibc
3402 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003403 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3404 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003405 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 # not just through cpp. "Syntax error" is here to catch this case.
3407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003408/* confdefs.h. */
3409_ACEOF
3410cat confdefs.h >>conftest.$ac_ext
3411cat >>conftest.$ac_ext <<_ACEOF
3412/* end confdefs.h. */
3413#ifdef __STDC__
3414# include <limits.h>
3415#else
3416# include <assert.h>
3417#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003418 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420if { (ac_try="$ac_cpp conftest.$ac_ext"
3421case "(($ac_try" in
3422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423 *) ac_try_echo=$ac_try;;
3424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 rm -f conftest.er1
3430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (exit $ac_status); } >/dev/null && {
3433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3434 test ! -s conftest.err
3435 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003436 :
3437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003439sed 's/^/| /' conftest.$ac_ext >&5
3440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # Broken: fails on valid input.
3442continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 # can be detected and how.
3449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003450/* confdefs.h. */
3451_ACEOF
3452cat confdefs.h >>conftest.$ac_ext
3453cat >>conftest.$ac_ext <<_ACEOF
3454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003455#include <ac_nonexistent.h>
3456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 # Broken: success on invalid input.
3474continue
3475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003477sed 's/^/| /' conftest.$ac_ext >&5
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Passes both tests.
3480ac_preproc_ok=:
3481break
3482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484rm -f conftest.err conftest.$ac_ext
3485
3486done
3487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3488rm -f conftest.err conftest.$ac_ext
3489if $ac_preproc_ok; then
3490 break
3491fi
3492
3493 done
3494 ac_cv_prog_CPP=$CPP
3495
3496fi
3497 CPP=$ac_cv_prog_CPP
3498else
3499 ac_cv_prog_CPP=$CPP
3500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003501{ echo "$as_me:$LINENO: result: $CPP" >&5
3502echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503ac_preproc_ok=false
3504for ac_c_preproc_warn_flag in '' yes
3505do
3506 # Use a header file that comes with gcc, so configuring glibc
3507 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003508 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3509 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # On the NeXT, cc -E runs the code through the compiler's parser,
3511 # not just through cpp. "Syntax error" is here to catch this case.
3512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
3518#ifdef __STDC__
3519# include <limits.h>
3520#else
3521# include <assert.h>
3522#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003523 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525if { (ac_try="$ac_cpp conftest.$ac_ext"
3526case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003533 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 rm -f conftest.er1
3535 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (exit $ac_status); } >/dev/null && {
3538 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3539 test ! -s conftest.err
3540 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 :
3542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003544sed 's/^/| /' conftest.$ac_ext >&5
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 # Broken: fails on valid input.
3547continue
3548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550rm -f conftest.err conftest.$ac_ext
3551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 # can be detected and how.
3554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003555/* confdefs.h. */
3556_ACEOF
3557cat confdefs.h >>conftest.$ac_ext
3558cat >>conftest.$ac_ext <<_ACEOF
3559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003560#include <ac_nonexistent.h>
3561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # Broken: success on invalid input.
3579continue
3580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Passes both tests.
3585ac_preproc_ok=:
3586break
3587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589rm -f conftest.err conftest.$ac_ext
3590
3591done
3592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3593rm -f conftest.err conftest.$ac_ext
3594if $ac_preproc_ok; then
3595 :
3596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003597 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003598See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003599echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003600See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
3604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609
3610
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003611{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3612echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003614 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616 # Extract the first word of "grep ggrep" to use in msg output
3617if test -z "$GREP"; then
3618set dummy grep ggrep; ac_prog_name=$2
3619if test "${ac_cv_path_GREP+set}" = set; then
3620 echo $ECHO_N "(cached) $ECHO_C" >&6
3621else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003623# Loop through the user's path and test for each of PROGNAME-LIST
3624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
3629 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
3631 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3632 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3633 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634 # Check for GNU $ac_path_GREP
3635case `"$ac_path_GREP" --version 2>&1` in
3636*GNU*)
3637 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3638*)
3639 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003640 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641 while :
3642 do
3643 cat "conftest.in" "conftest.in" >"conftest.tmp"
3644 mv "conftest.tmp" "conftest.in"
3645 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003646 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649 ac_count=`expr $ac_count + 1`
3650 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3651 # Best one so far, save it but keep looking for a better one
3652 ac_cv_path_GREP="$ac_path_GREP"
3653 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 # 10*(2^10) chars as input seems more than enough
3656 test $ac_count -gt 10 && break
3657 done
3658 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659esac
3660
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661
3662 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 done
3664done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003668
3669
3670fi
3671
3672GREP="$ac_cv_path_GREP"
3673if test -z "$GREP"; then
3674 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3675echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003677fi
3678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679else
3680 ac_cv_path_GREP=$GREP
3681fi
3682
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003685{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3686echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 GREP="$ac_cv_path_GREP"
3688
3689
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003690{ echo "$as_me:$LINENO: checking for egrep" >&5
3691echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003693 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694else
3695 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3696 then ac_cv_path_EGREP="$GREP -E"
3697 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698 # Extract the first word of "egrep" to use in msg output
3699if test -z "$EGREP"; then
3700set dummy egrep; ac_prog_name=$2
3701if test "${ac_cv_path_EGREP+set}" = set; then
3702 echo $ECHO_N "(cached) $ECHO_C" >&6
3703else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003705# Loop through the user's path and test for each of PROGNAME-LIST
3706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
3711 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003712 for ac_exec_ext in '' $ac_executable_extensions; do
3713 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3714 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3715 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716 # Check for GNU $ac_path_EGREP
3717case `"$ac_path_EGREP" --version 2>&1` in
3718*GNU*)
3719 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3720*)
3721 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003722 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 while :
3724 do
3725 cat "conftest.in" "conftest.in" >"conftest.tmp"
3726 mv "conftest.tmp" "conftest.in"
3727 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3730 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3731 ac_count=`expr $ac_count + 1`
3732 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3733 # Best one so far, save it but keep looking for a better one
3734 ac_cv_path_EGREP="$ac_path_EGREP"
3735 ac_path_EGREP_max=$ac_count
3736 fi
3737 # 10*(2^10) chars as input seems more than enough
3738 test $ac_count -gt 10 && break
3739 done
3740 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3741esac
3742
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743
3744 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 done
3746done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003750
3751
3752fi
3753
3754EGREP="$ac_cv_path_EGREP"
3755if test -z "$EGREP"; then
3756 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3757echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003759fi
3760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761else
3762 ac_cv_path_EGREP=$EGREP
3763fi
3764
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 fi
3767fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003768{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3769echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003771
3772
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003773
3774{ echo "$as_me:$LINENO: checking for AIX" >&5
3775echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3776cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003782#ifdef _AIX
3783 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003784#endif
3785
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003786_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3788 $EGREP "yes" >/dev/null 2>&1; then
3789 { echo "$as_me:$LINENO: result: yes" >&5
3790echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003791cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003792#define _ALL_SOURCE 1
3793_ACEOF
3794
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003795else
3796 { echo "$as_me:$LINENO: result: no" >&5
3797echo "${ECHO_T}no" >&6; }
3798fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00003799rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003800
3801
3802
3803# Check for unsupported systems
3804case $ac_sys_system/$ac_sys_release in
3805atheos*|Linux*/1*)
3806 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3807 echo See README for details.
3808 exit 1;;
3809esac
3810
3811
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003812{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3813echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003814
3815# Check whether --with-suffix was given.
3816if test "${with_suffix+set}" = set; then
3817 withval=$with_suffix;
3818 case $withval in
3819 no) EXEEXT=;;
3820 yes) EXEEXT=.exe;;
3821 *) EXEEXT=$withval;;
3822 esac
3823fi
3824
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003825{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3826echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003827
3828# Test whether we're running on a non-case-sensitive system, in which
3829# case we give a warning if no ext is given
3830
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003831{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3832echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003833if test ! -d CaseSensitiveTestDir; then
3834mkdir CaseSensitiveTestDir
3835fi
3836
3837if test -d casesensitivetestdir
3838then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003839 { echo "$as_me:$LINENO: result: yes" >&5
3840echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003841 BUILDEXEEXT=.exe
3842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=$EXEEXT
3846fi
3847rmdir CaseSensitiveTestDir
3848
3849case $MACHDEP in
3850bsdos*)
3851 case $CC in
3852 gcc) CC="$CC -D_HAVE_BSDI";;
3853 esac;;
3854esac
3855
3856case $ac_sys_system in
3857hp*|HP*)
3858 case $CC in
3859 cc|*/cc) CC="$CC -Ae";;
3860 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003861SunOS*)
3862 # Some functions have a prototype only with that define, e.g. confstr
3863
3864cat >>confdefs.h <<\_ACEOF
3865#define __EXTENSIONS__ 1
3866_ACEOF
3867
3868 ;;
3869esac
3870
3871
3872
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003873{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3874echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003875if test -z "$LIBRARY"
3876then
3877 LIBRARY='libpython$(VERSION).a'
3878fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003879{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3880echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003881
3882# LDLIBRARY is the name of the library to link against (as opposed to the
3883# name of the library into which to insert object files). BLDLIBRARY is also
3884# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3885# is blank as the main program is not linked directly against LDLIBRARY.
3886# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3887# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3888# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3889# DLLLIBRARY is the shared (i.e., DLL) library.
3890#
3891# RUNSHARED is used to run shared python without installed libraries
3892#
3893# INSTSONAME is the name of the shared library that will be use to install
3894# on the system - some systems like version suffix, others don't
3895
3896
3897
3898
3899
3900
3901LDLIBRARY="$LIBRARY"
3902BLDLIBRARY='$(LDLIBRARY)'
3903INSTSONAME='$(LDLIBRARY)'
3904DLLLIBRARY=''
3905LDLIBRARYDIR=''
3906RUNSHARED=''
3907
3908# LINKCC is the command that links the python executable -- default is $(CC).
3909# If CXX is set, and if it is needed to link a main function that was
3910# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3911# python might then depend on the C++ runtime
3912# This is altered for AIX in order to build the export list before
3913# linking.
3914
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003915{ echo "$as_me:$LINENO: checking LINKCC" >&5
3916echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003917if test -z "$LINKCC"
3918then
3919 LINKCC='$(PURIFY) $(MAINCC)'
3920 case $ac_sys_system in
3921 AIX*)
3922 exp_extra="\"\""
3923 if test $ac_sys_release -ge 5 -o \
3924 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3925 exp_extra="."
3926 fi
3927 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003928 QNX*)
3929 # qcc must be used because the other compilers do not
3930 # support -N.
3931 LINKCC=qcc;;
3932 esac
3933fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003934{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3935echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003936
3937# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3938# make sure we default having it set to "no": this is used by
3939# distutils.unixccompiler to know if it should add --enable-new-dtags
3940# to linker command lines, and failing to detect GNU ld simply results
3941# in the same bahaviour as before.
3942
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003943{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3944echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003945ac_prog=ld
3946if test "$GCC" = yes; then
3947 ac_prog=`$CC -print-prog-name=ld`
3948fi
3949case `"$ac_prog" -V 2>&1 < /dev/null` in
3950 *GNU*)
3951 GNULD=yes;;
3952 *)
3953 GNULD=no;;
3954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003955{ echo "$as_me:$LINENO: result: $GNULD" >&5
3956echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003957
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003958{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3959echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003960# Check whether --enable-shared was given.
3961if test "${enable_shared+set}" = set; then
3962 enableval=$enable_shared;
3963fi
3964
3965
3966if test -z "$enable_shared"
3967then
3968 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003969 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003970 enable_shared="yes";;
3971 *)
3972 enable_shared="no";;
3973 esac
3974fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003975{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3976echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003977
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003978{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3979echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003980# Check whether --enable-profiling was given.
3981if test "${enable_profiling+set}" = set; then
3982 enableval=$enable_profiling; ac_save_cc="$CC"
3983 CC="$CC -pg"
3984 if test "$cross_compiling" = yes; then
3985 ac_enable_profiling="no"
3986else
3987 cat >conftest.$ac_ext <<_ACEOF
3988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
3993int main() { return 0; }
3994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (ac_try="$ac_link"
3997case "(($ac_try" in
3998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3999 *) ac_try_echo=$ac_try;;
4000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004002 (eval "$ac_link") 2>&5
4003 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4006 { (case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004011 (eval "$ac_try") 2>&5
4012 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004014 (exit $ac_status); }; }; then
4015 ac_enable_profiling="yes"
4016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me: program exited with status $ac_status" >&5
4018echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004019sed 's/^/| /' conftest.$ac_ext >&5
4020
4021( exit $ac_status )
4022ac_enable_profiling="no"
4023fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4025fi
4026
4027
4028 CC="$ac_save_cc"
4029fi
4030
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004031{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4032echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004033
4034case "$ac_enable_profiling" in
4035 "yes")
4036 BASECFLAGS="-pg $BASECFLAGS"
4037 LDFLAGS="-pg $LDFLAGS"
4038 ;;
4039esac
4040
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004041{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4042echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004043
4044# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4045# library that we build, but we do not want to link against it (we
4046# will find it with a -framework option). For this reason there is an
4047# extra variable BLDLIBRARY against which Python and the extension
4048# modules are linked, BLDLIBRARY. This is normally the same as
4049# LDLIBRARY, but empty for MacOSX framework builds.
4050if test "$enable_framework"
4051then
4052 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4053 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4054 BLDLIBRARY=''
4055else
4056 BLDLIBRARY='$(LDLIBRARY)'
4057fi
4058
4059# Other platforms follow
4060if test $enable_shared = "yes"; then
4061
4062cat >>confdefs.h <<\_ACEOF
4063#define Py_ENABLE_SHARED 1
4064_ACEOF
4065
4066 case $ac_sys_system in
4067 CYGWIN*)
4068 LDLIBRARY='libpython$(VERSION).dll.a'
4069 DLLLIBRARY='libpython$(VERSION).dll'
4070 ;;
4071 SunOS*)
4072 LDLIBRARY='libpython$(VERSION).so'
4073 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4074 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4075 INSTSONAME="$LDLIBRARY".$SOVERSION
4076 ;;
4077 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 case $ac_sys_system in
4082 FreeBSD*)
4083 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4084 ;;
4085 esac
4086 INSTSONAME="$LDLIBRARY".$SOVERSION
4087 ;;
4088 hp*|HP*)
4089 case `uname -m` in
4090 ia64)
4091 LDLIBRARY='libpython$(VERSION).so'
4092 ;;
4093 *)
4094 LDLIBRARY='libpython$(VERSION).sl'
4095 ;;
4096 esac
4097 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4098 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4099 ;;
4100 OSF*)
4101 LDLIBRARY='libpython$(VERSION).so'
4102 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4103 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4104 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004105 Darwin*)
4106 LDLIBRARY='libpython$(VERSION).dylib'
4107 BLDLIBRARY='-L. -lpython$(VERSION)'
4108 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4109 ;;
4110
4111 esac
4112else # shared is disabled
4113 case $ac_sys_system in
4114 CYGWIN*)
4115 BLDLIBRARY='$(LIBRARY)'
4116 LDLIBRARY='libpython$(VERSION).dll.a'
4117 ;;
4118 esac
4119fi
4120
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004121{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4122echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004123
4124if test -n "$ac_tool_prefix"; then
4125 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4126set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004127{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4128echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004129if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004130 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004131else
4132 if test -n "$RANLIB"; then
4133 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4134else
4135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4136for as_dir in $PATH
4137do
4138 IFS=$as_save_IFS
4139 test -z "$as_dir" && as_dir=.
4140 for ac_exec_ext in '' $ac_executable_extensions; do
4141 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4142 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004143 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004144 break 2
4145 fi
4146done
4147done
4148IFS=$as_save_IFS
4149
4150fi
4151fi
4152RANLIB=$ac_cv_prog_RANLIB
4153if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004154 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4155echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004157 { echo "$as_me:$LINENO: result: no" >&5
4158echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004159fi
4160
4161
4162fi
4163if test -z "$ac_cv_prog_RANLIB"; then
4164 ac_ct_RANLIB=$RANLIB
4165 # Extract the first word of "ranlib", so it can be a program name with args.
4166set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004167{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004170 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004171else
4172 if test -n "$ac_ct_RANLIB"; then
4173 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4174else
4175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH
4177do
4178 IFS=$as_save_IFS
4179 test -z "$as_dir" && as_dir=.
4180 for ac_exec_ext in '' $ac_executable_extensions; do
4181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4182 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004183 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004184 break 2
4185 fi
4186done
4187done
4188IFS=$as_save_IFS
4189
4190fi
4191fi
4192ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4193if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004194 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4195echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004197 { echo "$as_me:$LINENO: result: no" >&5
4198echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004199fi
4200
4201 if test "x$ac_ct_RANLIB" = x; then
4202 RANLIB=":"
4203 else
4204 case $cross_compiling:$ac_tool_warned in
4205yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004206{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4207whose name does not start with the host triplet. If you think this
4208configuration is useful to you, please write to autoconf@gnu.org." >&5
4209echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4210whose name does not start with the host triplet. If you think this
4211configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004212ac_tool_warned=yes ;;
4213esac
4214 RANLIB=$ac_ct_RANLIB
4215 fi
4216else
4217 RANLIB="$ac_cv_prog_RANLIB"
4218fi
4219
4220
4221for ac_prog in ar aal
4222do
4223 # Extract the first word of "$ac_prog", so it can be a program name with args.
4224set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004227if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004228 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004229else
4230 if test -n "$AR"; then
4231 ac_cv_prog_AR="$AR" # Let the user override the test.
4232else
4233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234for as_dir in $PATH
4235do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_exec_ext in '' $ac_executable_extensions; do
4239 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4240 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004242 break 2
4243 fi
4244done
4245done
4246IFS=$as_save_IFS
4247
4248fi
4249fi
4250AR=$ac_cv_prog_AR
4251if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004252 { echo "$as_me:$LINENO: result: $AR" >&5
4253echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004255 { echo "$as_me:$LINENO: result: no" >&5
4256echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004257fi
4258
4259
4260 test -n "$AR" && break
4261done
4262test -n "$AR" || AR="ar"
4263
4264
4265# tweak ARFLAGS only if the user didn't set it on the command line
4266
4267if test -z "$ARFLAGS"
4268then
4269 ARFLAGS="rc"
4270fi
4271
4272
4273# Extract the first word of "svnversion", so it can be a program name with args.
4274set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004278 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004279else
4280 if test -n "$SVNVERSION"; then
4281 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4282else
4283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284for as_dir in $PATH
4285do
4286 IFS=$as_save_IFS
4287 test -z "$as_dir" && as_dir=.
4288 for ac_exec_ext in '' $ac_executable_extensions; do
4289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4290 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292 break 2
4293 fi
4294done
4295done
4296IFS=$as_save_IFS
4297
4298 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4299fi
4300fi
4301SVNVERSION=$ac_cv_prog_SVNVERSION
4302if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004303 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4304echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004306 { echo "$as_me:$LINENO: result: no" >&5
4307echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004308fi
4309
4310
4311if test $SVNVERSION = found
4312then
4313 SVNVERSION="svnversion \$(srcdir)"
4314else
4315 SVNVERSION="echo Unversioned directory"
4316fi
4317
4318case $MACHDEP in
4319bsdos*|hp*|HP*)
4320 # install -d does not work on BSDI or HP-UX
4321 if test -z "$INSTALL"
4322 then
4323 INSTALL="${srcdir}/install-sh -c"
4324 fi
4325esac
4326ac_aux_dir=
4327for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4328 if test -f "$ac_dir/install-sh"; then
4329 ac_aux_dir=$ac_dir
4330 ac_install_sh="$ac_aux_dir/install-sh -c"
4331 break
4332 elif test -f "$ac_dir/install.sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install.sh -c"
4335 break
4336 elif test -f "$ac_dir/shtool"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/shtool install -c"
4339 break
4340 fi
4341done
4342if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004343 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4344echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004345 { (exit 1); exit 1; }; }
4346fi
4347
4348# These three variables are undocumented and unsupported,
4349# and are intended to be withdrawn in a future Autoconf release.
4350# They can cause serious problems if a builder's source tree is in a directory
4351# whose full name contains unusual characters.
4352ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4353ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4354ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4355
4356
4357# Find a good install program. We prefer a C program (faster),
4358# so one script is as good as another. But avoid the broken or
4359# incompatible versions:
4360# SysV /etc/install, /usr/sbin/install
4361# SunOS /usr/etc/install
4362# IRIX /sbin/install
4363# AIX /bin/install
4364# AmigaOS /C/install, which installs bootblocks on floppy discs
4365# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4366# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4367# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4368# OS/2's system install, which has a completely different semantic
4369# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004370{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4371echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004372if test -z "$INSTALL"; then
4373if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004375else
4376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4377for as_dir in $PATH
4378do
4379 IFS=$as_save_IFS
4380 test -z "$as_dir" && as_dir=.
4381 # Account for people who put trailing slashes in PATH elements.
4382case $as_dir/ in
4383 ./ | .// | /cC/* | \
4384 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4385 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4386 /usr/ucb/* ) ;;
4387 *)
4388 # OSF1 and SCO ODT 3.0 have their own names for install.
4389 # Don't use installbsd from OSF since it installs stuff as root
4390 # by default.
4391 for ac_prog in ginstall scoinst install; do
4392 for ac_exec_ext in '' $ac_executable_extensions; do
4393 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4394 if test $ac_prog = install &&
4395 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4396 # AIX install. It has an incompatible calling convention.
4397 :
4398 elif test $ac_prog = install &&
4399 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # program-specific install script used by HP pwplus--don't use.
4401 :
4402 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004403 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4404 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004405 fi
4406 fi
4407 done
4408 done
4409 ;;
4410esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004411done
4412IFS=$as_save_IFS
4413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004414
4415fi
4416 if test "${ac_cv_path_install+set}" = set; then
4417 INSTALL=$ac_cv_path_install
4418 else
4419 # As a last resort, use the slow shell script. Don't cache a
4420 # value for INSTALL within a source directory, because that will
4421 # break other packages using the cache if that directory is
4422 # removed, or if the value is a relative name.
4423 INSTALL=$ac_install_sh
4424 fi
4425fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004426{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4427echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004428
4429# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4430# It thinks the first close brace ends the variable substitution.
4431test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4432
4433test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4434
4435test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4436
4437
4438# Not every filesystem supports hard links
4439
4440if test -z "$LN" ; then
4441 case $ac_sys_system in
4442 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004443 *) LN=ln;;
4444 esac
4445fi
4446
4447# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004448{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4449echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004450
4451# Check whether --with-pydebug was given.
4452if test "${with_pydebug+set}" = set; then
4453 withval=$with_pydebug;
4454if test "$withval" != no
4455then
4456
4457cat >>confdefs.h <<\_ACEOF
4458#define Py_DEBUG 1
4459_ACEOF
4460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461 { echo "$as_me:$LINENO: result: yes" >&5
4462echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004463 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464else { echo "$as_me:$LINENO: result: no" >&5
4465echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466fi
4467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468 { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471
4472
4473# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4474# merged with this chunk of code?
4475
4476# Optimizer/debugger flags
4477# ------------------------
4478# (The following bit of code is complicated enough - please keep things
4479# indented properly. Just pretend you're editing Python code. ;-)
4480
4481# There are two parallel sets of case statements below, one that checks to
4482# see if OPT was set and one that does BASECFLAGS setting based upon
4483# compiler and platform. BASECFLAGS tweaks need to be made even if the
4484# user set OPT.
4485
4486# tweak OPT based on compiler and platform, only if the user didn't set
4487# it on the command line
4488
4489if test -z "$OPT"
4490then
4491 case $GCC in
4492 yes)
4493 if test "$CC" != 'g++' ; then
4494 STRICT_PROTO="-Wstrict-prototypes"
4495 fi
4496 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4497 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4498 WRAP="-fwrapv"
4499 fi
4500 case $ac_cv_prog_cc_g in
4501 yes)
4502 if test "$Py_DEBUG" = 'true' ; then
4503 # Optimization messes up debuggers, so turn it off for
4504 # debug builds.
4505 OPT="-g -Wall $STRICT_PROTO"
4506 else
4507 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4508 fi
4509 ;;
4510 *)
4511 OPT="-O3 -Wall $STRICT_PROTO"
4512 ;;
4513 esac
4514 case $ac_sys_system in
4515 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4516 ;;
4517 esac
4518 ;;
4519
4520 *)
4521 OPT="-O"
4522 ;;
4523 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004524fi
4525
4526
4527
4528# The -arch flags for universal builds on OSX
4529UNIVERSAL_ARCH_FLAGS=
4530
4531
4532# tweak BASECFLAGS based on compiler and platform
4533case $GCC in
4534yes)
4535 # Python violates C99 rules, by casting between incompatible
4536 # pointer types. GCC may generate bad code as a result of that,
4537 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004538 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4539echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004540 ac_save_cc="$CC"
4541 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004542 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004543 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004544else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545 cat >conftest.$ac_ext <<_ACEOF
4546/* confdefs.h. */
4547_ACEOF
4548cat confdefs.h >>conftest.$ac_ext
4549cat >>conftest.$ac_ext <<_ACEOF
4550/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004551
4552int
4553main ()
4554{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004555int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004556 ;
4557 return 0;
4558}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004560rm -f conftest.$ac_objext
4561if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562case "(($ac_try" in
4563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564 *) ac_try_echo=$ac_try;;
4565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004567 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004568 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004569 grep -v '^ *+' conftest.er1 >conftest.err
4570 rm -f conftest.er1
4571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004573 (exit $ac_status); } && {
4574 test -z "$ac_c_werror_flag" ||
4575 test ! -s conftest.err
4576 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004577 ac_cv_no_strict_aliasing_ok=yes
4578else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004579 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580sed 's/^/| /' conftest.$ac_ext >&5
4581
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004582 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583fi
4584
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004586fi
4587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004588 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004589 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4590echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004591 if test $ac_cv_no_strict_aliasing_ok = yes
4592 then
4593 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4594 fi
4595
4596 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4597 # support. Without this, treatment of subnormals doesn't follow
4598 # the standard.
4599 case $ac_sys_machine in
4600 alpha*)
4601 BASECFLAGS="$BASECFLAGS -mieee"
4602 ;;
4603 esac
4604
4605 case $ac_sys_system in
4606 SCO_SV*)
4607 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4608 ;;
4609 # is there any other compiler on Darwin besides gcc?
4610 Darwin*)
4611 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4612 # used to be here, but non-Apple gcc doesn't accept them.
4613
4614
4615 if test "${enable_universalsdk}"; then
4616 UNIVERSAL_ARCH_FLAGS=""
4617 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4618 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4619 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004620 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621
4622 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4623 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004624 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004625 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626
4627 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4628 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004629 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 ARCH_RUN_32BIT="arch -i386 -ppc"
4631
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004632 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4633 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004634 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004635 ARCH_RUN_32BIT="arch -i386"
4636
4637 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4638 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004639 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4640 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004643 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4644echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004645 { (exit 1); exit 1; }; }
4646
4647 fi
4648
4649
4650 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4651 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4652 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4653 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4654 fi
4655 fi
4656
4657 # Calculate the right deployment target for this build.
4658 #
4659 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4660 if test ${cur_target} '>' 10.2; then
4661 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004662 if test ${enable_universalsdk}; then
4663 if test "${UNIVERSAL_ARCHS}" = "all"; then
4664 # Ensure that the default platform for a
4665 # 4-way universal build is OSX 10.5,
4666 # that's the first OS release where
4667 # 4-way builds make sense.
4668 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004669
4670 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4671 cur_target='10.5'
4672
4673 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4674 cur_target='10.5'
4675
4676 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4677 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004678 fi
4679 else
4680 if test `arch` = "i386"; then
4681 # On Intel macs default to a deployment
4682 # target of 10.4, that's the first OSX
4683 # release with Intel support.
4684 cur_target="10.4"
4685 fi
4686 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687 fi
4688 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4689
4690 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4691 # environment with a value that is the same as what we'll use
4692 # in the Makefile to ensure that we'll get the same compiler
4693 # environment during configure and build time.
4694 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4695 export MACOSX_DEPLOYMENT_TARGET
4696 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4697
4698 ;;
4699 OSF*)
4700 BASECFLAGS="$BASECFLAGS -mieee"
4701 ;;
4702 esac
4703 ;;
4704
4705*)
4706 case $ac_sys_system in
4707 OpenUNIX*|UnixWare*)
4708 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4709 ;;
4710 OSF*)
4711 BASECFLAGS="$BASECFLAGS -ieee -std"
4712 ;;
4713 SCO_SV*)
4714 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4715 ;;
4716 esac
4717 ;;
4718esac
4719
4720if test "$Py_DEBUG" = 'true'; then
4721 :
4722else
4723 OPT="-DNDEBUG $OPT"
4724fi
4725
4726if test "$ac_arch_flags"
4727then
4728 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4729fi
4730
4731# disable check for icc since it seems to pass, but generates a warning
4732if test "$CC" = icc
4733then
4734 ac_cv_opt_olimit_ok=no
4735fi
4736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004737{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4738echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004740 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741else
4742 ac_save_cc="$CC"
4743CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004744cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745/* confdefs.h. */
4746_ACEOF
4747cat confdefs.h >>conftest.$ac_ext
4748cat >>conftest.$ac_ext <<_ACEOF
4749/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004750
4751int
4752main ()
4753{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004755 ;
4756 return 0;
4757}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004759rm -f conftest.$ac_objext
4760if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761case "(($ac_try" in
4762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4763 *) ac_try_echo=$ac_try;;
4764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004766 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004768 grep -v '^ *+' conftest.er1 >conftest.err
4769 rm -f conftest.er1
4770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004772 (exit $ac_status); } && {
4773 test -z "$ac_c_werror_flag" ||
4774 test ! -s conftest.err
4775 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776 ac_cv_opt_olimit_ok=yes
4777else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004778 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779sed 's/^/| /' conftest.$ac_ext >&5
4780
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004781 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782fi
4783
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785CC="$ac_save_cc"
4786fi
4787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004788{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4789echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790if test $ac_cv_opt_olimit_ok = yes; then
4791 case $ac_sys_system in
4792 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4793 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4794 # environment?
4795 Darwin*)
4796 ;;
4797 *)
4798 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4799 ;;
4800 esac
4801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004802 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4803echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004805 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806else
4807 ac_save_cc="$CC"
4808 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809 cat >conftest.$ac_ext <<_ACEOF
4810/* confdefs.h. */
4811_ACEOF
4812cat confdefs.h >>conftest.$ac_ext
4813cat >>conftest.$ac_ext <<_ACEOF
4814/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004815
4816int
4817main ()
4818{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004820 ;
4821 return 0;
4822}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004824rm -f conftest.$ac_objext
4825if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826case "(($ac_try" in
4827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4828 *) ac_try_echo=$ac_try;;
4829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 grep -v '^ *+' conftest.er1 >conftest.err
4834 rm -f conftest.er1
4835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 (exit $ac_status); } && {
4838 test -z "$ac_c_werror_flag" ||
4839 test ! -s conftest.err
4840 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 ac_cv_olimit_ok=yes
4842else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004843 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844sed 's/^/| /' conftest.$ac_ext >&5
4845
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004846 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
4848
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004853 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4854echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 if test $ac_cv_olimit_ok = yes; then
4856 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4857 fi
4858fi
4859
4860# Check whether GCC supports PyArg_ParseTuple format
4861if test "$GCC" = "yes"
4862then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004863 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4864echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 save_CFLAGS=$CFLAGS
4866 CFLAGS="$CFLAGS -Werror"
4867 cat >conftest.$ac_ext <<_ACEOF
4868/* confdefs.h. */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h. */
4873
4874 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4875
4876int
4877main ()
4878{
4879
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884rm -f conftest.$ac_objext
4885if { (ac_try="$ac_compile"
4886case "(($ac_try" in
4887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4888 *) ac_try_echo=$ac_try;;
4889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891 (eval "$ac_compile") 2>conftest.er1
4892 ac_status=$?
4893 grep -v '^ *+' conftest.er1 >conftest.err
4894 rm -f conftest.er1
4895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 (exit $ac_status); } && {
4898 test -z "$ac_c_werror_flag" ||
4899 test ! -s conftest.err
4900 } && test -s conftest.$ac_objext; then
4901
4902cat >>confdefs.h <<\_ACEOF
4903#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4904_ACEOF
4905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004906 { echo "$as_me:$LINENO: result: yes" >&5
4907echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004909 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004912 { echo "$as_me:$LINENO: result: no" >&5
4913echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914
4915fi
4916
4917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918 CFLAGS=$save_CFLAGS
4919fi
4920
4921# On some compilers, pthreads are available without further options
4922# (e.g. MacOS X). On some of these systems, the compiler will not
4923# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4924# So we have to see first whether pthreads are available without
4925# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004926{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4927echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004929 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930else
4931 if test "$cross_compiling" = yes; then
4932 ac_cv_pthread_is_default=no
4933else
4934 cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940
4941#include <pthread.h>
4942
4943void* routine(void* p){return NULL;}
4944
4945int main(){
4946 pthread_t p;
4947 if(pthread_create(&p,NULL,routine,NULL)!=0)
4948 return 1;
4949 (void)pthread_detach(p);
4950 return 0;
4951}
4952
4953_ACEOF
4954rm -f conftest$ac_exeext
4955if { (ac_try="$ac_link"
4956case "(($ac_try" in
4957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4958 *) ac_try_echo=$ac_try;;
4959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 (eval "$ac_link") 2>&5
4962 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4965 { (case "(($ac_try" in
4966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4967 *) ac_try_echo=$ac_try;;
4968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 (eval "$ac_try") 2>&5
4971 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 (exit $ac_status); }; }; then
4974
4975 ac_cv_pthread_is_default=yes
4976 ac_cv_kthread=no
4977 ac_cv_pthread=no
4978
4979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004980 echo "$as_me: program exited with status $ac_status" >&5
4981echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982sed 's/^/| /' conftest.$ac_ext >&5
4983
4984( exit $ac_status )
4985ac_cv_pthread_is_default=no
4986fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4988fi
4989
4990
4991
4992fi
4993
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004994{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4995echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996
4997
4998if test $ac_cv_pthread_is_default = yes
4999then
5000 ac_cv_kpthread=no
5001else
5002# -Kpthread, if available, provides the right #defines
5003# and linker options to make pthread_create available
5004# Some compilers won't report that they do not support -Kpthread,
5005# so we need to run a program to see whether it really made the
5006# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005007{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5008echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005010 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
5012 ac_save_cc="$CC"
5013CC="$CC -Kpthread"
5014if test "$cross_compiling" = yes; then
5015 ac_cv_kpthread=no
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023
5024#include <pthread.h>
5025
5026void* routine(void* p){return NULL;}
5027
5028int main(){
5029 pthread_t p;
5030 if(pthread_create(&p,NULL,routine,NULL)!=0)
5031 return 1;
5032 (void)pthread_detach(p);
5033 return 0;
5034}
5035
5036_ACEOF
5037rm -f conftest$ac_exeext
5038if { (ac_try="$ac_link"
5039case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 (eval "$ac_link") 2>&5
5045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5048 { (case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 (eval "$ac_try") 2>&5
5054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056 (exit $ac_status); }; }; then
5057 ac_cv_kpthread=yes
5058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005059 echo "$as_me: program exited with status $ac_status" >&5
5060echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061sed 's/^/| /' conftest.$ac_ext >&5
5062
5063( exit $ac_status )
5064ac_cv_kpthread=no
5065fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5067fi
5068
5069
5070CC="$ac_save_cc"
5071fi
5072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005073{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5074echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075fi
5076
5077if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5078then
5079# -Kthread, if available, provides the right #defines
5080# and linker options to make pthread_create available
5081# Some compilers won't report that they do not support -Kthread,
5082# so we need to run a program to see whether it really made the
5083# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005084{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5085echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005087 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088else
5089 ac_save_cc="$CC"
5090CC="$CC -Kthread"
5091if test "$cross_compiling" = yes; then
5092 ac_cv_kthread=no
5093else
5094 cat >conftest.$ac_ext <<_ACEOF
5095/* confdefs.h. */
5096_ACEOF
5097cat confdefs.h >>conftest.$ac_ext
5098cat >>conftest.$ac_ext <<_ACEOF
5099/* end confdefs.h. */
5100
5101#include <pthread.h>
5102
5103void* routine(void* p){return NULL;}
5104
5105int main(){
5106 pthread_t p;
5107 if(pthread_create(&p,NULL,routine,NULL)!=0)
5108 return 1;
5109 (void)pthread_detach(p);
5110 return 0;
5111}
5112
5113_ACEOF
5114rm -f conftest$ac_exeext
5115if { (ac_try="$ac_link"
5116case "(($ac_try" in
5117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5118 *) ac_try_echo=$ac_try;;
5119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121 (eval "$ac_link") 2>&5
5122 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5125 { (case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 (eval "$ac_try") 2>&5
5131 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 (exit $ac_status); }; }; then
5134 ac_cv_kthread=yes
5135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005136 echo "$as_me: program exited with status $ac_status" >&5
5137echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138sed 's/^/| /' conftest.$ac_ext >&5
5139
5140( exit $ac_status )
5141ac_cv_kthread=no
5142fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5144fi
5145
5146
5147CC="$ac_save_cc"
5148fi
5149
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5151echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152fi
5153
5154if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5155then
5156# -pthread, if available, provides the right #defines
5157# and linker options to make pthread_create available
5158# Some compilers won't report that they do not support -pthread,
5159# so we need to run a program to see whether it really made the
5160# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005161{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5162echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005164 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165else
5166 ac_save_cc="$CC"
5167CC="$CC -pthread"
5168if test "$cross_compiling" = yes; then
5169 ac_cv_pthread=no
5170else
5171 cat >conftest.$ac_ext <<_ACEOF
5172/* confdefs.h. */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h. */
5177
5178#include <pthread.h>
5179
5180void* routine(void* p){return NULL;}
5181
5182int main(){
5183 pthread_t p;
5184 if(pthread_create(&p,NULL,routine,NULL)!=0)
5185 return 1;
5186 (void)pthread_detach(p);
5187 return 0;
5188}
5189
5190_ACEOF
5191rm -f conftest$ac_exeext
5192if { (ac_try="$ac_link"
5193case "(($ac_try" in
5194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5195 *) ac_try_echo=$ac_try;;
5196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198 (eval "$ac_link") 2>&5
5199 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5202 { (case "(($ac_try" in
5203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204 *) ac_try_echo=$ac_try;;
5205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 (eval "$ac_try") 2>&5
5208 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 (exit $ac_status); }; }; then
5211 ac_cv_pthread=yes
5212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005213 echo "$as_me: program exited with status $ac_status" >&5
5214echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215sed 's/^/| /' conftest.$ac_ext >&5
5216
5217( exit $ac_status )
5218ac_cv_pthread=no
5219fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5221fi
5222
5223
5224CC="$ac_save_cc"
5225fi
5226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005227{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5228echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229fi
5230
5231# If we have set a CC compiler flag for thread support then
5232# check if it works for CXX, too.
5233ac_cv_cxx_thread=no
5234if test ! -z "$CXX"
5235then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005236{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5237echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238ac_save_cxx="$CXX"
5239
5240if test "$ac_cv_kpthread" = "yes"
5241then
5242 CXX="$CXX -Kpthread"
5243 ac_cv_cxx_thread=yes
5244elif test "$ac_cv_kthread" = "yes"
5245then
5246 CXX="$CXX -Kthread"
5247 ac_cv_cxx_thread=yes
5248elif test "$ac_cv_pthread" = "yes"
5249then
5250 CXX="$CXX -pthread"
5251 ac_cv_cxx_thread=yes
5252fi
5253
5254if test $ac_cv_cxx_thread = yes
5255then
5256 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5257 $CXX -c conftest.$ac_ext 2>&5
5258 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5259 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5260 then
5261 ac_cv_cxx_thread=yes
5262 else
5263 ac_cv_cxx_thread=no
5264 fi
5265 rm -fr conftest*
5266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005267{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5268echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269fi
5270CXX="$ac_save_cxx"
5271
5272
5273# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005274{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5275echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005277 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278else
5279 cat >conftest.$ac_ext <<_ACEOF
5280/* confdefs.h. */
5281_ACEOF
5282cat confdefs.h >>conftest.$ac_ext
5283cat >>conftest.$ac_ext <<_ACEOF
5284/* end confdefs.h. */
5285#include <stdlib.h>
5286#include <stdarg.h>
5287#include <string.h>
5288#include <float.h>
5289
5290int
5291main ()
5292{
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (ac_try="$ac_compile"
5300case "(($ac_try" in
5301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5302 *) ac_try_echo=$ac_try;;
5303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 (eval "$ac_compile") 2>conftest.er1
5306 ac_status=$?
5307 grep -v '^ *+' conftest.er1 >conftest.err
5308 rm -f conftest.er1
5309 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311 (exit $ac_status); } && {
5312 test -z "$ac_c_werror_flag" ||
5313 test ! -s conftest.err
5314 } && test -s conftest.$ac_objext; then
5315 ac_cv_header_stdc=yes
5316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005317 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318sed 's/^/| /' conftest.$ac_ext >&5
5319
5320 ac_cv_header_stdc=no
5321fi
5322
5323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5324
5325if test $ac_cv_header_stdc = yes; then
5326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5327 cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
5333#include <string.h>
5334
5335_ACEOF
5336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5337 $EGREP "memchr" >/dev/null 2>&1; then
5338 :
5339else
5340 ac_cv_header_stdc=no
5341fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005342rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343
5344fi
5345
5346if test $ac_cv_header_stdc = yes; then
5347 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355
5356_ACEOF
5357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 $EGREP "free" >/dev/null 2>&1; then
5359 :
5360else
5361 ac_cv_header_stdc=no
5362fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005363rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5369 if test "$cross_compiling" = yes; then
5370 :
5371else
5372 cat >conftest.$ac_ext <<_ACEOF
5373/* confdefs.h. */
5374_ACEOF
5375cat confdefs.h >>conftest.$ac_ext
5376cat >>conftest.$ac_ext <<_ACEOF
5377/* end confdefs.h. */
5378#include <ctype.h>
5379#include <stdlib.h>
5380#if ((' ' & 0x0FF) == 0x020)
5381# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5382# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5383#else
5384# define ISLOWER(c) \
5385 (('a' <= (c) && (c) <= 'i') \
5386 || ('j' <= (c) && (c) <= 'r') \
5387 || ('s' <= (c) && (c) <= 'z'))
5388# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5389#endif
5390
5391#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5392int
5393main ()
5394{
5395 int i;
5396 for (i = 0; i < 256; i++)
5397 if (XOR (islower (i), ISLOWER (i))
5398 || toupper (i) != TOUPPER (i))
5399 return 2;
5400 return 0;
5401}
5402_ACEOF
5403rm -f conftest$ac_exeext
5404if { (ac_try="$ac_link"
5405case "(($ac_try" in
5406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5407 *) ac_try_echo=$ac_try;;
5408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410 (eval "$ac_link") 2>&5
5411 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5414 { (case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 (eval "$ac_try") 2>&5
5420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 (exit $ac_status); }; }; then
5423 :
5424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005425 echo "$as_me: program exited with status $ac_status" >&5
5426echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427sed 's/^/| /' conftest.$ac_ext >&5
5428
5429( exit $ac_status )
5430ac_cv_header_stdc=no
5431fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5433fi
5434
5435
5436fi
5437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005438{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5439echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440if test $ac_cv_header_stdc = yes; then
5441
5442cat >>confdefs.h <<\_ACEOF
5443#define STDC_HEADERS 1
5444_ACEOF
5445
5446fi
5447
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005448# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5459 inttypes.h stdint.h unistd.h
5460do
5461as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5462{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5464if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
5466else
5467 cat >conftest.$ac_ext <<_ACEOF
5468/* confdefs.h. */
5469_ACEOF
5470cat confdefs.h >>conftest.$ac_ext
5471cat >>conftest.$ac_ext <<_ACEOF
5472/* end confdefs.h. */
5473$ac_includes_default
5474
5475#include <$ac_header>
5476_ACEOF
5477rm -f conftest.$ac_objext
5478if { (ac_try="$ac_compile"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
5483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5484 (eval "$ac_compile") 2>conftest.er1
5485 ac_status=$?
5486 grep -v '^ *+' conftest.er1 >conftest.err
5487 rm -f conftest.er1
5488 cat conftest.err >&5
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); } && {
5491 test -z "$ac_c_werror_flag" ||
5492 test ! -s conftest.err
5493 } && test -s conftest.$ac_objext; then
5494 eval "$as_ac_Header=yes"
5495else
5496 echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499 eval "$as_ac_Header=no"
5500fi
5501
5502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5503fi
5504ac_res=`eval echo '${'$as_ac_Header'}'`
5505 { echo "$as_me:$LINENO: result: $ac_res" >&5
5506echo "${ECHO_T}$ac_res" >&6; }
5507if test `eval echo '${'$as_ac_Header'}'` = yes; then
5508 cat >>confdefs.h <<_ACEOF
5509#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5510_ACEOF
5511
5512fi
5513
5514done
5515
5516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Martin v. Löwis11437992002-04-12 09:54:03 +00005518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
Anthony Baxter8a560de2004-10-13 15:30:56 +00005553
Martin v. Löwisc3001752005-01-23 09:27:24 +00005554
Martin v. Löwis11017b12006-01-14 18:12:57 +00005555
Thomas Wouters477c8d52006-05-27 19:21:47 +00005556
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005557
5558
5559
5560
5561
5562
5563
5564
Thomas Wouters89f507f2006-12-13 04:49:30 +00005565
Christian Heimes043d6f62008-01-07 17:19:16 +00005566
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005567
5568
Christian Heimesbbe741d2008-03-28 10:53:29 +00005569
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005570
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005571for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5572fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005573ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005574shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005575unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005576sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5577sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005579sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005580sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005581sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005582bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005583do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005584as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005586 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005588if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005590fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005591ac_res=`eval echo '${'$as_ac_Header'}'`
5592 { echo "$as_me:$LINENO: result: $ac_res" >&5
5593echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594else
Martin v. Löwis11437992002-04-12 09:54:03 +00005595 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005596{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5597echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005599/* confdefs.h. */
5600_ACEOF
5601cat confdefs.h >>conftest.$ac_ext
5602cat >>conftest.$ac_ext <<_ACEOF
5603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005604$ac_includes_default
5605#include <$ac_header>
5606_ACEOF
5607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005627sed 's/^/| /' conftest.$ac_ext >&5
5628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005633{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5634echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005635
5636# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005637{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5638echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005639cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005645#include <$ac_header>
5646_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005647if { (ac_try="$ac_cpp conftest.$ac_ext"
5648case "(($ac_try" in
5649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5650 *) ac_try_echo=$ac_try;;
5651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005655 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 rm -f conftest.er1
5657 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005659 (exit $ac_status); } >/dev/null && {
5660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5661 test ! -s conftest.err
5662 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 ac_header_preproc=yes
5664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005666sed 's/^/| /' conftest.$ac_ext >&5
5667
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670
Martin v. Löwis11437992002-04-12 09:54:03 +00005671rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005672{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5673echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005674
5675# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005676case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5677 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005678 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5679echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5680 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5681echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005683 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005685 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5686echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5688echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5690echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5692echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5694echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5696echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005697 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005698## -------------------------------------- ##
5699## Report this to http://bugs.python.org/ ##
5700## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005701_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005705{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5706echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005707if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005708 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005709else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005712ac_res=`eval echo '${'$as_ac_Header'}'`
5713 { echo "$as_me:$LINENO: result: $ac_res" >&5
5714echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715
5716fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005719#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005720_ACEOF
5721
5722fi
5723
Guido van Rossum627b2d71993-12-24 10:39:16 +00005724done
5725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727
5728
5729
5730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005732for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5734{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5735echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005736if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738else
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005740/* confdefs.h. */
5741_ACEOF
5742cat confdefs.h >>conftest.$ac_ext
5743cat >>conftest.$ac_ext <<_ACEOF
5744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745#include <sys/types.h>
5746#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
Martin v. Löwis11437992002-04-12 09:54:03 +00005748int
5749main ()
5750{
5751if ((DIR *) 0)
5752return 0;
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005758if { (ac_try="$ac_compile"
5759case "(($ac_try" in
5760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5761 *) ac_try_echo=$ac_try;;
5762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005766 grep -v '^ *+' conftest.er1 >conftest.err
5767 rm -f conftest.er1
5768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005770 (exit $ac_status); } && {
5771 test -z "$ac_c_werror_flag" ||
5772 test ! -s conftest.err
5773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005774 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005777sed 's/^/| /' conftest.$ac_ext >&5
5778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781
5782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784ac_res=`eval echo '${'$as_ac_Header'}'`
5785 { echo "$as_me:$LINENO: result: $ac_res" >&5
5786echo "${ECHO_T}$ac_res" >&6; }
5787if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005789#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005790_ACEOF
5791
5792ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795done
5796# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5797if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005798 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5799echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005800if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802else
Martin v. Löwis11437992002-04-12 09:54:03 +00005803 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005811/* Override any GCC internal prototype to avoid an error.
5812 Use char because int might match the return type of a GCC
5813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005814#ifdef __cplusplus
5815extern "C"
5816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005817char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005818int
5819main ()
5820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005821return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005822 ;
5823 return 0;
5824}
5825_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005826for ac_lib in '' dir; do
5827 if test -z "$ac_lib"; then
5828 ac_res="none required"
5829 else
5830 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832 fi
5833 rm -f conftest.$ac_objext conftest$ac_exeext
5834if { (ac_try="$ac_link"
5835case "(($ac_try" in
5836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837 *) ac_try_echo=$ac_try;;
5838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005841 ac_status=$?
5842 grep -v '^ *+' conftest.er1 >conftest.err
5843 rm -f conftest.er1
5844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 (exit $ac_status); } && {
5847 test -z "$ac_c_werror_flag" ||
5848 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849 } && test -s conftest$ac_exeext &&
5850 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856
Thomas Wouters477c8d52006-05-27 19:21:47 +00005857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858
5859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5860 conftest$ac_exeext
5861 if test "${ac_cv_search_opendir+set}" = set; then
5862 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005864done
5865if test "${ac_cv_search_opendir+set}" = set; then
5866 :
5867else
5868 ac_cv_search_opendir=no
5869fi
5870rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005871LIBS=$ac_func_search_save_LIBS
5872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005873{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5874echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875ac_res=$ac_cv_search_opendir
5876if test "$ac_res" != no; then
5877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005880
Michael W. Hudson54241132001-12-07 15:38:26 +00005881else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005882 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5883echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005884if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005885 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005886else
5887 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005889/* confdefs.h. */
5890_ACEOF
5891cat confdefs.h >>conftest.$ac_ext
5892cat >>conftest.$ac_ext <<_ACEOF
5893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895/* Override any GCC internal prototype to avoid an error.
5896 Use char because int might match the return type of a GCC
5897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005898#ifdef __cplusplus
5899extern "C"
5900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005901char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005905return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 ;
5907 return 0;
5908}
5909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005910for ac_lib in '' x; do
5911 if test -z "$ac_lib"; then
5912 ac_res="none required"
5913 else
5914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918if { (ac_try="$ac_link"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005924 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005925 ac_status=$?
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005933 } && test -s conftest$ac_exeext &&
5934 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
Thomas Wouters477c8d52006-05-27 19:21:47 +00005941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942
5943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5944 conftest$ac_exeext
5945 if test "${ac_cv_search_opendir+set}" = set; then
5946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948done
5949if test "${ac_cv_search_opendir+set}" = set; then
5950 :
5951else
5952 ac_cv_search_opendir=no
5953fi
5954rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005955LIBS=$ac_func_search_save_LIBS
5956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005957{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5958echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959ac_res=$ac_cv_search_opendir
5960if test "$ac_res" != no; then
5961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963fi
5964
5965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005967{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5968echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971else
5972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979int
5980main ()
5981{
5982return makedev(0, 0);
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005988if { (ac_try="$ac_link"
5989case "(($ac_try" in
5990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5991 *) ac_try_echo=$ac_try;;
5992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005996 grep -v '^ *+' conftest.er1 >conftest.err
5997 rm -f conftest.er1
5998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 (exit $ac_status); } && {
6001 test -z "$ac_c_werror_flag" ||
6002 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006003 } && test -s conftest$ac_exeext &&
6004 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005 ac_cv_header_sys_types_h_makedev=yes
6006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006008sed 's/^/| /' conftest.$ac_ext >&5
6009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006012
6013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015
6016fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6018echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019
6020if test $ac_cv_header_sys_types_h_makedev = no; then
6021if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006022 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6023echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006027{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6028echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029else
6030 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006031{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6032echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039$ac_includes_default
6040#include <sys/mkdev.h>
6041_ACEOF
6042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043if { (ac_try="$ac_compile"
6044case "(($ac_try" in
6045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6046 *) ac_try_echo=$ac_try;;
6047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055 (exit $ac_status); } && {
6056 test -z "$ac_c_werror_flag" ||
6057 test ! -s conftest.err
6058 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059 ac_header_compiler=yes
6060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006062sed 's/^/| /' conftest.$ac_ext >&5
6063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066
6067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6069echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070
6071# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6073echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080#include <sys/mkdev.h>
6081_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082if { (ac_try="$ac_cpp conftest.$ac_ext"
6083case "(($ac_try" in
6084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6085 *) ac_try_echo=$ac_try;;
6086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006090 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 rm -f conftest.er1
6092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 (exit $ac_status); } >/dev/null && {
6095 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6096 test ! -s conftest.err
6097 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 ac_header_preproc=yes
6099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006101sed 's/^/| /' conftest.$ac_ext >&5
6102
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_header_preproc=no
6104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006107{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6108echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109
6110# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006111case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6112 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6116echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006118 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006133## -------------------------------------- ##
6134## Report this to http://bugs.python.org/ ##
6135## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006136_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006138 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006140{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6141echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144else
6145 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006147{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6148echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006151if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152
6153cat >>confdefs.h <<\_ACEOF
6154#define MAJOR_IN_MKDEV 1
6155_ACEOF
6156
6157fi
6158
6159
6160
6161 if test $ac_cv_header_sys_mkdev_h = no; then
6162 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006163 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6164echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170else
6171 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6173echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180$ac_includes_default
6181#include <sys/sysmacros.h>
6182_ACEOF
6183rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184if { (ac_try="$ac_compile"
6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 grep -v '^ *+' conftest.er1 >conftest.err
6193 rm -f conftest.er1
6194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 (exit $ac_status); } && {
6197 test -z "$ac_c_werror_flag" ||
6198 test ! -s conftest.err
6199 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200 ac_header_compiler=yes
6201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006203sed 's/^/| /' conftest.$ac_ext >&5
6204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207
6208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6210echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006213{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6214echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221#include <sys/sysmacros.h>
6222_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223if { (ac_try="$ac_cpp conftest.$ac_ext"
6224case "(($ac_try" in
6225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6226 *) ac_try_echo=$ac_try;;
6227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006231 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 rm -f conftest.er1
6233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235 (exit $ac_status); } >/dev/null && {
6236 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6237 test ! -s conftest.err
6238 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239 ac_header_preproc=yes
6240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006242sed 's/^/| /' conftest.$ac_ext >&5
6243
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_header_preproc=no
6245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006248{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6249echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250
6251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6253 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006254 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6255echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6257echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006274## -------------------------------------- ##
6275## Report this to http://bugs.python.org/ ##
6276## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006277_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006279 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006281{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6282echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285else
6286 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006288{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6289echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290
6291fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006292if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293
6294cat >>confdefs.h <<\_ACEOF
6295#define MAJOR_IN_SYSMACROS 1
6296_ACEOF
6297
6298fi
6299
6300
6301 fi
6302fi
6303
Michael W. Hudson54241132001-12-07 15:38:26 +00006304
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006305# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006306
6307for ac_header in term.h
6308do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6310{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006313 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006314else
6315 cat >conftest.$ac_ext <<_ACEOF
6316/* confdefs.h. */
6317_ACEOF
6318cat confdefs.h >>conftest.$ac_ext
6319cat >>conftest.$ac_ext <<_ACEOF
6320/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006322#ifdef HAVE_CURSES_H
6323#include <curses.h>
6324#endif
6325
6326
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006327#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328_ACEOF
6329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006330if { (ac_try="$ac_compile"
6331case "(($ac_try" in
6332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6333 *) ac_try_echo=$ac_try;;
6334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337 ac_status=$?
6338 grep -v '^ *+' conftest.er1 >conftest.err
6339 rm -f conftest.er1
6340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 (exit $ac_status); } && {
6343 test -z "$ac_c_werror_flag" ||
6344 test ! -s conftest.err
6345 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006346 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006348 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353
6354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356ac_res=`eval echo '${'$as_ac_Header'}'`
6357 { echo "$as_me:$LINENO: result: $ac_res" >&5
6358echo "${ECHO_T}$ac_res" >&6; }
6359if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006361#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364fi
6365
6366done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
6368
Martin v. Löwis11017b12006-01-14 18:12:57 +00006369# On Linux, netlink.h requires asm/types.h
6370
6371for ac_header in linux/netlink.h
6372do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006373as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6374{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378else
6379 cat >conftest.$ac_ext <<_ACEOF
6380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
6385
6386#ifdef HAVE_ASM_TYPES_H
6387#include <asm/types.h>
6388#endif
6389#ifdef HAVE_SYS_SOCKET_H
6390#include <sys/socket.h>
6391#endif
6392
6393
6394#include <$ac_header>
6395_ACEOF
6396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397if { (ac_try="$ac_compile"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413 eval "$as_ac_Header=yes"
6414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006415 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006416sed 's/^/| /' conftest.$ac_ext >&5
6417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423ac_res=`eval echo '${'$as_ac_Header'}'`
6424 { echo "$as_me:$LINENO: result: $ac_res" >&5
6425echo "${ECHO_T}$ac_res" >&6; }
6426if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429_ACEOF
6430
6431fi
6432
6433done
6434
6435
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006438{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6439echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006441/* confdefs.h. */
6442_ACEOF
6443cat confdefs.h >>conftest.$ac_ext
6444cat >>conftest.$ac_ext <<_ACEOF
6445/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006450 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006451 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452else
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454
6455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006459
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6464echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465
Neal Norwitz11690112002-07-30 01:08:28 +00006466# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006467{ echo "$as_me:$LINENO: checking for makedev" >&5
6468echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006475#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006476int
6477main ()
6478{
6479 makedev(0, 0)
6480 ;
6481 return 0;
6482}
6483_ACEOF
6484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485if { (ac_try="$ac_link"
6486case "(($ac_try" in
6487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6488 *) ac_try_echo=$ac_try;;
6489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006491 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006493 grep -v '^ *+' conftest.er1 >conftest.err
6494 rm -f conftest.er1
6495 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497 (exit $ac_status); } && {
6498 test -z "$ac_c_werror_flag" ||
6499 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006500 } && test -s conftest$ac_exeext &&
6501 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006502 ac_cv_has_makedev=yes
6503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006505sed 's/^/| /' conftest.$ac_ext >&5
6506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509
6510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006511 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006512if test "$ac_cv_has_makedev" = "no"; then
6513 # we didn't link, try if _OSF_SOURCE will allow us to link
6514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006520
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006521#define _OSF_SOURCE 1
6522#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006523
Neal Norwitz11690112002-07-30 01:08:28 +00006524int
6525main ()
6526{
6527 makedev(0, 0)
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006533if { (ac_try="$ac_link"
6534case "(($ac_try" in
6535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6536 *) ac_try_echo=$ac_try;;
6537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006541 grep -v '^ *+' conftest.er1 >conftest.err
6542 rm -f conftest.er1
6543 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006545 (exit $ac_status); } && {
6546 test -z "$ac_c_werror_flag" ||
6547 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006548 } && test -s conftest$ac_exeext &&
6549 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006550 ac_cv_has_makedev=yes
6551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006553sed 's/^/| /' conftest.$ac_ext >&5
6554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557
6558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006559 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006560 if test "$ac_cv_has_makedev" = "yes"; then
6561
6562cat >>confdefs.h <<\_ACEOF
6563#define _OSF_SOURCE 1
6564_ACEOF
6565
6566 fi
6567fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006568{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6569echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006570if test "$ac_cv_has_makedev" = "yes"; then
6571
6572cat >>confdefs.h <<\_ACEOF
6573#define HAVE_MAKEDEV 1
6574_ACEOF
6575
6576fi
6577
Martin v. Löwis399a6892002-10-04 10:22:02 +00006578# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6579# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6580# defined, but the compiler does not support pragma redefine_extname,
6581# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6582# structures (such as rlimit64) without declaring them. As a
6583# work-around, disable LFS on such configurations
6584
6585use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006586{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6587echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594
6595#define _LARGEFILE_SOURCE 1
6596#define _FILE_OFFSET_BITS 64
6597#include <sys/resource.h>
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599int
6600main ()
6601{
6602struct rlimit foo;
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608if { (ac_try="$ac_compile"
6609case "(($ac_try" in
6610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6611 *) ac_try_echo=$ac_try;;
6612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620 (exit $ac_status); } && {
6621 test -z "$ac_c_werror_flag" ||
6622 test ! -s conftest.err
6623 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624 sol_lfs_bug=no
6625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006633{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6634echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635if test "$sol_lfs_bug" = "yes"; then
6636 use_lfs=no
6637fi
6638
6639if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006640# Two defines needed to enable largefile support on various platforms
6641# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643cat >>confdefs.h <<\_ACEOF
6644#define _LARGEFILE_SOURCE 1
6645_ACEOF
6646
6647
6648cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006649#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006653
Guido van Rossum84e7b241996-08-19 21:59:00 +00006654# Add some code to confdefs.h so that the test for off_t works on SCO
6655cat >> confdefs.h <<\EOF
6656#if defined(SCO_DS)
6657#undef _OFF_T
6658#endif
6659EOF
6660
Guido van Rossumef2255b2000-03-10 22:30:29 +00006661# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006662{ echo "$as_me:$LINENO: checking for mode_t" >&5
6663echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006664if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006666else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006667 cat >conftest.$ac_ext <<_ACEOF
6668/* confdefs.h. */
6669_ACEOF
6670cat confdefs.h >>conftest.$ac_ext
6671cat >>conftest.$ac_ext <<_ACEOF
6672/* end confdefs.h. */
6673$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006675int
6676main ()
6677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006678if ((ac__type_new_ *) 0)
6679 return 0;
6680if (sizeof (ac__type_new_))
6681 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
6687if { (ac_try="$ac_compile"
6688case "(($ac_try" in
6689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6690 *) ac_try_echo=$ac_try;;
6691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006693 (eval "$ac_compile") 2>conftest.er1
6694 ac_status=$?
6695 grep -v '^ *+' conftest.er1 >conftest.err
6696 rm -f conftest.er1
6697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006699 (exit $ac_status); } && {
6700 test -z "$ac_c_werror_flag" ||
6701 test ! -s conftest.err
6702 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006706sed 's/^/| /' conftest.$ac_ext >&5
6707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006708 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710
6711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006713{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6714echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6715if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717else
Martin v. Löwis11437992002-04-12 09:54:03 +00006718
6719cat >>confdefs.h <<_ACEOF
6720#define mode_t int
6721_ACEOF
6722
6723fi
6724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006725{ echo "$as_me:$LINENO: checking for off_t" >&5
6726echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006727if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006730 cat >conftest.$ac_ext <<_ACEOF
6731/* confdefs.h. */
6732_ACEOF
6733cat confdefs.h >>conftest.$ac_ext
6734cat >>conftest.$ac_ext <<_ACEOF
6735/* end confdefs.h. */
6736$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006737typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006738int
6739main ()
6740{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006741if ((ac__type_new_ *) 0)
6742 return 0;
6743if (sizeof (ac__type_new_))
6744 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006745 ;
6746 return 0;
6747}
6748_ACEOF
6749rm -f conftest.$ac_objext
6750if { (ac_try="$ac_compile"
6751case "(($ac_try" in
6752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6753 *) ac_try_echo=$ac_try;;
6754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006756 (eval "$ac_compile") 2>conftest.er1
6757 ac_status=$?
6758 grep -v '^ *+' conftest.er1 >conftest.err
6759 rm -f conftest.er1
6760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006762 (exit $ac_status); } && {
6763 test -z "$ac_c_werror_flag" ||
6764 test ! -s conftest.err
6765 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006766 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006769sed 's/^/| /' conftest.$ac_ext >&5
6770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006771 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6777echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6778if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006780else
Martin v. Löwis11437992002-04-12 09:54:03 +00006781
6782cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
6785
6786fi
6787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006788{ echo "$as_me:$LINENO: checking for pid_t" >&5
6789echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006790if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006793 cat >conftest.$ac_ext <<_ACEOF
6794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
6799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801int
6802main ()
6803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006804if ((ac__type_new_ *) 0)
6805 return 0;
6806if (sizeof (ac__type_new_))
6807 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (ac_try="$ac_compile"
6814case "(($ac_try" in
6815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6816 *) ac_try_echo=$ac_try;;
6817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006819 (eval "$ac_compile") 2>conftest.er1
6820 ac_status=$?
6821 grep -v '^ *+' conftest.er1 >conftest.err
6822 rm -f conftest.er1
6823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006825 (exit $ac_status); } && {
6826 test -z "$ac_c_werror_flag" ||
6827 test ! -s conftest.err
6828 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006832sed 's/^/| /' conftest.$ac_ext >&5
6833
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006834 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836
6837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006838fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6840echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6841if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844
6845cat >>confdefs.h <<_ACEOF
6846#define pid_t int
6847_ACEOF
6848
6849fi
6850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006851{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6852echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006853if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006854 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
6856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006857/* confdefs.h. */
6858_ACEOF
6859cat confdefs.h >>conftest.$ac_ext
6860cat >>conftest.$ac_ext <<_ACEOF
6861/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006862#include <sys/types.h>
6863#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865int
6866main ()
6867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874if { (ac_try="$ac_compile"
6875case "(($ac_try" in
6876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6877 *) ac_try_echo=$ac_try;;
6878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006882 grep -v '^ *+' conftest.er1 >conftest.err
6883 rm -f conftest.er1
6884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 (exit $ac_status); } && {
6887 test -z "$ac_c_werror_flag" ||
6888 test ! -s conftest.err
6889 } && test -s conftest.$ac_objext; then
6890 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006893sed 's/^/| /' conftest.$ac_ext >&5
6894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6901echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006904#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: checking for size_t" >&5
6909echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006910if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006913 cat >conftest.$ac_ext <<_ACEOF
6914/* confdefs.h. */
6915_ACEOF
6916cat confdefs.h >>conftest.$ac_ext
6917cat >>conftest.$ac_ext <<_ACEOF
6918/* end confdefs.h. */
6919$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006921int
6922main ()
6923{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006924if ((ac__type_new_ *) 0)
6925 return 0;
6926if (sizeof (ac__type_new_))
6927 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006928 ;
6929 return 0;
6930}
6931_ACEOF
6932rm -f conftest.$ac_objext
6933if { (ac_try="$ac_compile"
6934case "(($ac_try" in
6935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6936 *) ac_try_echo=$ac_try;;
6937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006939 (eval "$ac_compile") 2>conftest.er1
6940 ac_status=$?
6941 grep -v '^ *+' conftest.er1 >conftest.err
6942 rm -f conftest.er1
6943 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006945 (exit $ac_status); } && {
6946 test -z "$ac_c_werror_flag" ||
6947 test ! -s conftest.err
6948 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006949 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956
6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6960echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6961if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006963else
Martin v. Löwis11437992002-04-12 09:54:03 +00006964
6965cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006967_ACEOF
6968
6969fi
6970
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006971{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6972echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006973if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006975else
6976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006977/* confdefs.h. */
6978_ACEOF
6979cat confdefs.h >>conftest.$ac_ext
6980cat >>conftest.$ac_ext <<_ACEOF
6981/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006983
6984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006986 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987 ac_cv_type_uid_t=yes
6988else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989 ac_cv_type_uid_t=no
6990fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006991rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006994{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6995echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006996if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998cat >>confdefs.h <<\_ACEOF
6999#define uid_t int
7000_ACEOF
7001
7002
7003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006
7007fi
7008
Mark Dickinsonbd792642009-03-18 20:06:12 +00007009
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007010 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7011echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007012if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007014else
7015 ac_cv_c_uint32_t=no
7016 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7017 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7018 cat >conftest.$ac_ext <<_ACEOF
7019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
7024$ac_includes_default
7025int
7026main ()
7027{
7028static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7029test_array [0] = 0
7030
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035rm -f conftest.$ac_objext
7036if { (ac_try="$ac_compile"
7037case "(($ac_try" in
7038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7039 *) ac_try_echo=$ac_try;;
7040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007042 (eval "$ac_compile") 2>conftest.er1
7043 ac_status=$?
7044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007048 (exit $ac_status); } && {
7049 test -z "$ac_c_werror_flag" ||
7050 test ! -s conftest.err
7051 } && test -s conftest.$ac_objext; then
7052 case $ac_type in
7053 uint32_t) ac_cv_c_uint32_t=yes ;;
7054 *) ac_cv_c_uint32_t=$ac_type ;;
7055esac
7056
7057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007058 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059sed 's/^/| /' conftest.$ac_ext >&5
7060
7061
7062fi
7063
7064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7065 test "$ac_cv_c_uint32_t" != no && break
7066 done
7067fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7069echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070 case $ac_cv_c_uint32_t in #(
7071 no|yes) ;; #(
7072 *)
7073
7074cat >>confdefs.h <<\_ACEOF
7075#define _UINT32_T 1
7076_ACEOF
7077
7078
7079cat >>confdefs.h <<_ACEOF
7080#define uint32_t $ac_cv_c_uint32_t
7081_ACEOF
7082;;
7083 esac
7084
7085
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007086 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7087echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007089 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090else
7091 ac_cv_c_uint64_t=no
7092 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7093 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7094 cat >conftest.$ac_ext <<_ACEOF
7095/* confdefs.h. */
7096_ACEOF
7097cat confdefs.h >>conftest.$ac_ext
7098cat >>conftest.$ac_ext <<_ACEOF
7099/* end confdefs.h. */
7100$ac_includes_default
7101int
7102main ()
7103{
7104static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7105test_array [0] = 0
7106
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007118 (eval "$ac_compile") 2>conftest.er1
7119 ac_status=$?
7120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
7128 case $ac_type in
7129 uint64_t) ac_cv_c_uint64_t=yes ;;
7130 *) ac_cv_c_uint64_t=$ac_type ;;
7131esac
7132
7133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007134 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135sed 's/^/| /' conftest.$ac_ext >&5
7136
7137
7138fi
7139
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 test "$ac_cv_c_uint64_t" != no && break
7142 done
7143fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7145echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146 case $ac_cv_c_uint64_t in #(
7147 no|yes) ;; #(
7148 *)
7149
7150cat >>confdefs.h <<\_ACEOF
7151#define _UINT64_T 1
7152_ACEOF
7153
7154
7155cat >>confdefs.h <<_ACEOF
7156#define uint64_t $ac_cv_c_uint64_t
7157_ACEOF
7158;;
7159 esac
7160
7161
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007162 { echo "$as_me:$LINENO: checking for int32_t" >&5
7163echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007165 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166else
7167 ac_cv_c_int32_t=no
7168 for ac_type in 'int32_t' 'int' 'long int' \
7169 'long long int' 'short int' 'signed char'; do
7170 cat >conftest.$ac_ext <<_ACEOF
7171/* confdefs.h. */
7172_ACEOF
7173cat confdefs.h >>conftest.$ac_ext
7174cat >>conftest.$ac_ext <<_ACEOF
7175/* end confdefs.h. */
7176$ac_includes_default
7177int
7178main ()
7179{
7180static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
7188if { (ac_try="$ac_compile"
7189case "(($ac_try" in
7190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7191 *) ac_try_echo=$ac_try;;
7192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007194 (eval "$ac_compile") 2>conftest.er1
7195 ac_status=$?
7196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200 (exit $ac_status); } && {
7201 test -z "$ac_c_werror_flag" ||
7202 test ! -s conftest.err
7203 } && test -s conftest.$ac_objext; then
7204 cat >conftest.$ac_ext <<_ACEOF
7205/* confdefs.h. */
7206_ACEOF
7207cat confdefs.h >>conftest.$ac_ext
7208cat >>conftest.$ac_ext <<_ACEOF
7209/* end confdefs.h. */
7210$ac_includes_default
7211int
7212main ()
7213{
7214static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007215 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007216test_array [0] = 0
7217
7218 ;
7219 return 0;
7220}
7221_ACEOF
7222rm -f conftest.$ac_objext
7223if { (ac_try="$ac_compile"
7224case "(($ac_try" in
7225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7226 *) ac_try_echo=$ac_try;;
7227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007229 (eval "$ac_compile") 2>conftest.er1
7230 ac_status=$?
7231 grep -v '^ *+' conftest.er1 >conftest.err
7232 rm -f conftest.er1
7233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235 (exit $ac_status); } && {
7236 test -z "$ac_c_werror_flag" ||
7237 test ! -s conftest.err
7238 } && test -s conftest.$ac_objext; then
7239 :
7240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007241 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242sed 's/^/| /' conftest.$ac_ext >&5
7243
7244 case $ac_type in
7245 int32_t) ac_cv_c_int32_t=yes ;;
7246 *) ac_cv_c_int32_t=$ac_type ;;
7247esac
7248
7249fi
7250
7251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007253 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
7256
7257fi
7258
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260 test "$ac_cv_c_int32_t" != no && break
7261 done
7262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007263{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7264echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265 case $ac_cv_c_int32_t in #(
7266 no|yes) ;; #(
7267 *)
7268
7269cat >>confdefs.h <<_ACEOF
7270#define int32_t $ac_cv_c_int32_t
7271_ACEOF
7272;;
7273 esac
7274
7275
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007276 { echo "$as_me:$LINENO: checking for int64_t" >&5
7277echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007279 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007280else
7281 ac_cv_c_int64_t=no
7282 for ac_type in 'int64_t' 'int' 'long int' \
7283 'long long int' 'short int' 'signed char'; do
7284 cat >conftest.$ac_ext <<_ACEOF
7285/* confdefs.h. */
7286_ACEOF
7287cat confdefs.h >>conftest.$ac_ext
7288cat >>conftest.$ac_ext <<_ACEOF
7289/* end confdefs.h. */
7290$ac_includes_default
7291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (ac_try="$ac_compile"
7303case "(($ac_try" in
7304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7305 *) ac_try_echo=$ac_try;;
7306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007308 (eval "$ac_compile") 2>conftest.er1
7309 ac_status=$?
7310 grep -v '^ *+' conftest.er1 >conftest.err
7311 rm -f conftest.er1
7312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007314 (exit $ac_status); } && {
7315 test -z "$ac_c_werror_flag" ||
7316 test ! -s conftest.err
7317 } && test -s conftest.$ac_objext; then
7318 cat >conftest.$ac_ext <<_ACEOF
7319/* confdefs.h. */
7320_ACEOF
7321cat confdefs.h >>conftest.$ac_ext
7322cat >>conftest.$ac_ext <<_ACEOF
7323/* end confdefs.h. */
7324$ac_includes_default
7325int
7326main ()
7327{
7328static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007329 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330test_array [0] = 0
7331
7332 ;
7333 return 0;
7334}
7335_ACEOF
7336rm -f conftest.$ac_objext
7337if { (ac_try="$ac_compile"
7338case "(($ac_try" in
7339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7340 *) ac_try_echo=$ac_try;;
7341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007343 (eval "$ac_compile") 2>conftest.er1
7344 ac_status=$?
7345 grep -v '^ *+' conftest.er1 >conftest.err
7346 rm -f conftest.er1
7347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349 (exit $ac_status); } && {
7350 test -z "$ac_c_werror_flag" ||
7351 test ! -s conftest.err
7352 } && test -s conftest.$ac_objext; then
7353 :
7354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007355 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
7358 case $ac_type in
7359 int64_t) ac_cv_c_int64_t=yes ;;
7360 *) ac_cv_c_int64_t=$ac_type ;;
7361esac
7362
7363fi
7364
7365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007367 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007368sed 's/^/| /' conftest.$ac_ext >&5
7369
7370
7371fi
7372
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 test "$ac_cv_c_int64_t" != no && break
7375 done
7376fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007377{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7378echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379 case $ac_cv_c_int64_t in #(
7380 no|yes) ;; #(
7381 *)
7382
7383cat >>confdefs.h <<_ACEOF
7384#define int64_t $ac_cv_c_int64_t
7385_ACEOF
7386;;
7387 esac
7388
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007389{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7390echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007391if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007393else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007394 cat >conftest.$ac_ext <<_ACEOF
7395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
7400$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007401typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007402int
7403main ()
7404{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007405if ((ac__type_new_ *) 0)
7406 return 0;
7407if (sizeof (ac__type_new_))
7408 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (ac_try="$ac_compile"
7415case "(($ac_try" in
7416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7417 *) ac_try_echo=$ac_try;;
7418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007420 (eval "$ac_compile") 2>conftest.er1
7421 ac_status=$?
7422 grep -v '^ *+' conftest.er1 >conftest.err
7423 rm -f conftest.er1
7424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007426 (exit $ac_status); } && {
7427 test -z "$ac_c_werror_flag" ||
7428 test ! -s conftest.err
7429 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007430 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007435 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007440{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7441echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7442if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007443
7444cat >>confdefs.h <<\_ACEOF
7445#define HAVE_SSIZE_T 1
7446_ACEOF
7447
7448fi
7449
Jack Jansendd19cf82001-12-06 22:36:17 +00007450
Michael W. Hudson54241132001-12-07 15:38:26 +00007451# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007452# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007453{ echo "$as_me:$LINENO: checking for int" >&5
7454echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7455if test "${ac_cv_type_int+set}" = set; then
7456 echo $ECHO_N "(cached) $ECHO_C" >&6
7457else
7458 cat >conftest.$ac_ext <<_ACEOF
7459/* confdefs.h. */
7460_ACEOF
7461cat confdefs.h >>conftest.$ac_ext
7462cat >>conftest.$ac_ext <<_ACEOF
7463/* end confdefs.h. */
7464$ac_includes_default
7465typedef int ac__type_new_;
7466int
7467main ()
7468{
7469if ((ac__type_new_ *) 0)
7470 return 0;
7471if (sizeof (ac__type_new_))
7472 return 0;
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477rm -f conftest.$ac_objext
7478if { (ac_try="$ac_compile"
7479case "(($ac_try" in
7480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7481 *) ac_try_echo=$ac_try;;
7482esac
7483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7484 (eval "$ac_compile") 2>conftest.er1
7485 ac_status=$?
7486 grep -v '^ *+' conftest.er1 >conftest.err
7487 rm -f conftest.er1
7488 cat conftest.err >&5
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); } && {
7491 test -z "$ac_c_werror_flag" ||
7492 test ! -s conftest.err
7493 } && test -s conftest.$ac_objext; then
7494 ac_cv_type_int=yes
7495else
7496 echo "$as_me: failed program was:" >&5
7497sed 's/^/| /' conftest.$ac_ext >&5
7498
7499 ac_cv_type_int=no
7500fi
7501
7502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7503fi
7504{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7505echo "${ECHO_T}$ac_cv_type_int" >&6; }
7506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507# The cast to long int works around a bug in the HP C Compiler
7508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7510# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007511{ echo "$as_me:$LINENO: checking size of int" >&5
7512echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007513if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007515else
Martin v. Löwis11437992002-04-12 09:54:03 +00007516 if test "$cross_compiling" = yes; then
7517 # Depending upon the size, compute the lo and hi bounds.
7518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007519/* confdefs.h. */
7520_ACEOF
7521cat confdefs.h >>conftest.$ac_ext
7522cat >>conftest.$ac_ext <<_ACEOF
7523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007524$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007525 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007526int
7527main ()
7528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007530test_array [0] = 0
7531
7532 ;
7533 return 0;
7534}
7535_ACEOF
7536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537if { (ac_try="$ac_compile"
7538case "(($ac_try" in
7539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7540 *) ac_try_echo=$ac_try;;
7541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549 (exit $ac_status); } && {
7550 test -z "$ac_c_werror_flag" ||
7551 test ! -s conftest.err
7552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_lo=0 ac_mid=0
7554 while :; do
7555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007561$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007562 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007563int
7564main ()
7565{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007567test_array [0] = 0
7568
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574if { (ac_try="$ac_compile"
7575case "(($ac_try" in
7576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7577 *) ac_try_echo=$ac_try;;
7578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007582 grep -v '^ *+' conftest.er1 >conftest.err
7583 rm -f conftest.er1
7584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586 (exit $ac_status); } && {
7587 test -z "$ac_c_werror_flag" ||
7588 test ! -s conftest.err
7589 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_hi=$ac_mid; break
7591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 ac_lo=`expr $ac_mid + 1`
7596 if test $ac_lo -le $ac_mid; then
7597 ac_lo= ac_hi=
7598 break
7599 fi
7600 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602
7603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 done
7605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007607sed 's/^/| /' conftest.$ac_ext >&5
7608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007610/* confdefs.h. */
7611_ACEOF
7612cat confdefs.h >>conftest.$ac_ext
7613cat >>conftest.$ac_ext <<_ACEOF
7614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007616 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007617int
7618main ()
7619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007621test_array [0] = 0
7622
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628if { (ac_try="$ac_compile"
7629case "(($ac_try" in
7630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631 *) ac_try_echo=$ac_try;;
7632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007636 grep -v '^ *+' conftest.er1 >conftest.err
7637 rm -f conftest.er1
7638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640 (exit $ac_status); } && {
7641 test -z "$ac_c_werror_flag" ||
7642 test ! -s conftest.err
7643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_hi=-1 ac_mid=-1
7645 while :; do
7646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007653 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007658test_array [0] = 0
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665if { (ac_try="$ac_compile"
7666case "(($ac_try" in
7667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7668 *) ac_try_echo=$ac_try;;
7669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007673 grep -v '^ *+' conftest.er1 >conftest.err
7674 rm -f conftest.er1
7675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677 (exit $ac_status); } && {
7678 test -z "$ac_c_werror_flag" ||
7679 test ! -s conftest.err
7680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_lo=$ac_mid; break
7682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007684sed 's/^/| /' conftest.$ac_ext >&5
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 ac_hi=`expr '(' $ac_mid ')' - 1`
7687 if test $ac_mid -le $ac_hi; then
7688 ac_lo= ac_hi=
7689 break
7690 fi
7691 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693
7694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 done
7696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007698sed 's/^/| /' conftest.$ac_ext >&5
7699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705
7706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007707# Binary search between lo and hi bounds.
7708while test "x$ac_lo" != "x$ac_hi"; do
7709 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007711/* confdefs.h. */
7712_ACEOF
7713cat confdefs.h >>conftest.$ac_ext
7714cat >>conftest.$ac_ext <<_ACEOF
7715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007716$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007717 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007718int
7719main ()
7720{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007722test_array [0] = 0
7723
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729if { (ac_try="$ac_compile"
7730case "(($ac_try" in
7731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7732 *) ac_try_echo=$ac_try;;
7733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007737 grep -v '^ *+' conftest.er1 >conftest.err
7738 rm -f conftest.er1
7739 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741 (exit $ac_status); } && {
7742 test -z "$ac_c_werror_flag" ||
7743 test ! -s conftest.err
7744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_hi=$ac_mid
7746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007748sed 's/^/| /' conftest.$ac_ext >&5
7749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752
7753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007754done
7755case $ac_lo in
7756?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007761See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007762 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 else
7764 ac_cv_sizeof_int=0
7765 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007766esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007769/* confdefs.h. */
7770_ACEOF
7771cat confdefs.h >>conftest.$ac_ext
7772cat >>conftest.$ac_ext <<_ACEOF
7773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007775 typedef int ac__type_sizeof_;
7776static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7777static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007778#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007780int
7781main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007782{
Martin v. Löwis11437992002-04-12 09:54:03 +00007783
7784 FILE *f = fopen ("conftest.val", "w");
7785 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007787 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007792 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 }
7794 else
7795 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007797 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
7803 ;
7804 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007805}
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
7807rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808if { (ac_try="$ac_link"
7809case "(($ac_try" in
7810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7811 *) ac_try_echo=$ac_try;;
7812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 { (case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 (exit $ac_status); }; }; then
7827 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829 echo "$as_me: program exited with status $ac_status" >&5
7830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007838See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007839 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 else
7841 ac_cv_sizeof_int=0
7842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
7846rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007848{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7849echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850
7851
7852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007855_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856
7857
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007858{ echo "$as_me:$LINENO: checking for long" >&5
7859echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7860if test "${ac_cv_type_long+set}" = set; then
7861 echo $ECHO_N "(cached) $ECHO_C" >&6
7862else
7863 cat >conftest.$ac_ext <<_ACEOF
7864/* confdefs.h. */
7865_ACEOF
7866cat confdefs.h >>conftest.$ac_ext
7867cat >>conftest.$ac_ext <<_ACEOF
7868/* end confdefs.h. */
7869$ac_includes_default
7870typedef long ac__type_new_;
7871int
7872main ()
7873{
7874if ((ac__type_new_ *) 0)
7875 return 0;
7876if (sizeof (ac__type_new_))
7877 return 0;
7878 ;
7879 return 0;
7880}
7881_ACEOF
7882rm -f conftest.$ac_objext
7883if { (ac_try="$ac_compile"
7884case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
7888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7889 (eval "$ac_compile") 2>conftest.er1
7890 ac_status=$?
7891 grep -v '^ *+' conftest.er1 >conftest.err
7892 rm -f conftest.er1
7893 cat conftest.err >&5
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); } && {
7896 test -z "$ac_c_werror_flag" ||
7897 test ! -s conftest.err
7898 } && test -s conftest.$ac_objext; then
7899 ac_cv_type_long=yes
7900else
7901 echo "$as_me: failed program was:" >&5
7902sed 's/^/| /' conftest.$ac_ext >&5
7903
7904 ac_cv_type_long=no
7905fi
7906
7907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7908fi
7909{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7910echo "${ECHO_T}$ac_cv_type_long" >&6; }
7911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912# The cast to long int works around a bug in the HP C Compiler
7913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7915# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007916{ echo "$as_me:$LINENO: checking size of long" >&5
7917echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007918if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 if test "$cross_compiling" = yes; then
7922 # Depending upon the size, compute the lo and hi bounds.
7923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* confdefs.h. */
7925_ACEOF
7926cat confdefs.h >>conftest.$ac_ext
7927cat >>conftest.$ac_ext <<_ACEOF
7928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007930 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007935test_array [0] = 0
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942if { (ac_try="$ac_compile"
7943case "(($ac_try" in
7944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7945 *) ac_try_echo=$ac_try;;
7946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007950 grep -v '^ *+' conftest.er1 >conftest.err
7951 rm -f conftest.er1
7952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954 (exit $ac_status); } && {
7955 test -z "$ac_c_werror_flag" ||
7956 test ! -s conftest.err
7957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_lo=0 ac_mid=0
7959 while :; do
7960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* confdefs.h. */
7962_ACEOF
7963cat confdefs.h >>conftest.$ac_ext
7964cat >>conftest.$ac_ext <<_ACEOF
7965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007967 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007972test_array [0] = 0
7973
7974 ;
7975 return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979if { (ac_try="$ac_compile"
7980case "(($ac_try" in
7981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7982 *) ac_try_echo=$ac_try;;
7983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007987 grep -v '^ *+' conftest.er1 >conftest.err
7988 rm -f conftest.er1
7989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 (exit $ac_status); } && {
7992 test -z "$ac_c_werror_flag" ||
7993 test ! -s conftest.err
7994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_hi=$ac_mid; break
7996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007998sed 's/^/| /' conftest.$ac_ext >&5
7999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 ac_lo=`expr $ac_mid + 1`
8001 if test $ac_lo -le $ac_mid; then
8002 ac_lo= ac_hi=
8003 break
8004 fi
8005 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007
8008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 done
8010else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008012sed 's/^/| /' conftest.$ac_ext >&5
8013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* confdefs.h. */
8016_ACEOF
8017cat confdefs.h >>conftest.$ac_ext
8018cat >>conftest.$ac_ext <<_ACEOF
8019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008021 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008022int
8023main ()
8024{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008026test_array [0] = 0
8027
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033if { (ac_try="$ac_compile"
8034case "(($ac_try" in
8035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8036 *) ac_try_echo=$ac_try;;
8037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041 grep -v '^ *+' conftest.er1 >conftest.err
8042 rm -f conftest.er1
8043 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045 (exit $ac_status); } && {
8046 test -z "$ac_c_werror_flag" ||
8047 test ! -s conftest.err
8048 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_hi=-1 ac_mid=-1
8050 while :; do
8051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008058 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008059int
8060main ()
8061{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008063test_array [0] = 0
8064
8065 ;
8066 return 0;
8067}
8068_ACEOF
8069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070if { (ac_try="$ac_compile"
8071case "(($ac_try" in
8072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8073 *) ac_try_echo=$ac_try;;
8074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008078 grep -v '^ *+' conftest.er1 >conftest.err
8079 rm -f conftest.er1
8080 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 (exit $ac_status); } && {
8083 test -z "$ac_c_werror_flag" ||
8084 test ! -s conftest.err
8085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_lo=$ac_mid; break
8087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008089sed 's/^/| /' conftest.$ac_ext >&5
8090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091 ac_hi=`expr '(' $ac_mid ')' - 1`
8092 if test $ac_mid -le $ac_hi; then
8093 ac_lo= ac_hi=
8094 break
8095 fi
8096 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098
8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 done
8101else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110
8111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008112# Binary search between lo and hi bounds.
8113while test "x$ac_lo" != "x$ac_hi"; do
8114 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008116/* confdefs.h. */
8117_ACEOF
8118cat confdefs.h >>conftest.$ac_ext
8119cat >>conftest.$ac_ext <<_ACEOF
8120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008122 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008127test_array [0] = 0
8128
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134if { (ac_try="$ac_compile"
8135case "(($ac_try" in
8136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8137 *) ac_try_echo=$ac_try;;
8138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008142 grep -v '^ *+' conftest.er1 >conftest.err
8143 rm -f conftest.er1
8144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146 (exit $ac_status); } && {
8147 test -z "$ac_c_werror_flag" ||
8148 test ! -s conftest.err
8149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_hi=$ac_mid
8151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157
8158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008159done
8160case $ac_lo in
8161?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008166See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008167 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168 else
8169 ac_cv_sizeof_long=0
8170 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008171esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008172else
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* confdefs.h. */
8175_ACEOF
8176cat confdefs.h >>conftest.$ac_ext
8177cat >>conftest.$ac_ext <<_ACEOF
8178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008179$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008180 typedef long ac__type_sizeof_;
8181static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8182static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008185int
8186main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008187{
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
8189 FILE *f = fopen ("conftest.val", "w");
8190 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008192 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008197 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 }
8199 else
8200 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208 ;
8209 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008210}
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
8212rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213if { (ac_try="$ac_link"
8214case "(($ac_try" in
8215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8216 *) ac_try_echo=$ac_try;;
8217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 { (case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 (exit $ac_status); }; }; then
8232 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234 echo "$as_me: program exited with status $ac_status" >&5
8235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008243See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008244 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 else
8246 ac_cv_sizeof_long=0
8247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
8251rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008253{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8254echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255
8256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261
8262
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008263{ echo "$as_me:$LINENO: checking for void *" >&5
8264echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8265if test "${ac_cv_type_void_p+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
8267else
8268 cat >conftest.$ac_ext <<_ACEOF
8269/* confdefs.h. */
8270_ACEOF
8271cat confdefs.h >>conftest.$ac_ext
8272cat >>conftest.$ac_ext <<_ACEOF
8273/* end confdefs.h. */
8274$ac_includes_default
8275typedef void * ac__type_new_;
8276int
8277main ()
8278{
8279if ((ac__type_new_ *) 0)
8280 return 0;
8281if (sizeof (ac__type_new_))
8282 return 0;
8283 ;
8284 return 0;
8285}
8286_ACEOF
8287rm -f conftest.$ac_objext
8288if { (ac_try="$ac_compile"
8289case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
8293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8294 (eval "$ac_compile") 2>conftest.er1
8295 ac_status=$?
8296 grep -v '^ *+' conftest.er1 >conftest.err
8297 rm -f conftest.er1
8298 cat conftest.err >&5
8299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8300 (exit $ac_status); } && {
8301 test -z "$ac_c_werror_flag" ||
8302 test ! -s conftest.err
8303 } && test -s conftest.$ac_objext; then
8304 ac_cv_type_void_p=yes
8305else
8306 echo "$as_me: failed program was:" >&5
8307sed 's/^/| /' conftest.$ac_ext >&5
8308
8309 ac_cv_type_void_p=no
8310fi
8311
8312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8313fi
8314{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8315echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008321{ echo "$as_me:$LINENO: checking size of void *" >&5
8322echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008323if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 if test "$cross_compiling" = yes; then
8327 # Depending upon the size, compute the lo and hi bounds.
8328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* confdefs.h. */
8330_ACEOF
8331cat confdefs.h >>conftest.$ac_ext
8332cat >>conftest.$ac_ext <<_ACEOF
8333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008334$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008335 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008336int
8337main ()
8338{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008340test_array [0] = 0
8341
8342 ;
8343 return 0;
8344}
8345_ACEOF
8346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347if { (ac_try="$ac_compile"
8348case "(($ac_try" in
8349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8350 *) ac_try_echo=$ac_try;;
8351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008355 grep -v '^ *+' conftest.er1 >conftest.err
8356 rm -f conftest.er1
8357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359 (exit $ac_status); } && {
8360 test -z "$ac_c_werror_flag" ||
8361 test ! -s conftest.err
8362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_lo=0 ac_mid=0
8364 while :; do
8365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008371$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008372 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008377test_array [0] = 0
8378
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384if { (ac_try="$ac_compile"
8385case "(($ac_try" in
8386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8387 *) ac_try_echo=$ac_try;;
8388esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008392 grep -v '^ *+' conftest.er1 >conftest.err
8393 rm -f conftest.er1
8394 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 (exit $ac_status); } && {
8397 test -z "$ac_c_werror_flag" ||
8398 test ! -s conftest.err
8399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_hi=$ac_mid; break
8401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008403sed 's/^/| /' conftest.$ac_ext >&5
8404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 ac_lo=`expr $ac_mid + 1`
8406 if test $ac_lo -le $ac_mid; then
8407 ac_lo= ac_hi=
8408 break
8409 fi
8410 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412
8413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 done
8415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008417sed 's/^/| /' conftest.$ac_ext >&5
8418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008420/* confdefs.h. */
8421_ACEOF
8422cat confdefs.h >>conftest.$ac_ext
8423cat >>conftest.$ac_ext <<_ACEOF
8424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008425$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008426 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008431test_array [0] = 0
8432
8433 ;
8434 return 0;
8435}
8436_ACEOF
8437rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438if { (ac_try="$ac_compile"
8439case "(($ac_try" in
8440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8441 *) ac_try_echo=$ac_try;;
8442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008446 grep -v '^ *+' conftest.er1 >conftest.err
8447 rm -f conftest.er1
8448 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 (exit $ac_status); } && {
8451 test -z "$ac_c_werror_flag" ||
8452 test ! -s conftest.err
8453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_hi=-1 ac_mid=-1
8455 while :; do
8456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008463 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008483 grep -v '^ *+' conftest.er1 >conftest.err
8484 rm -f conftest.er1
8485 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 (exit $ac_status); } && {
8488 test -z "$ac_c_werror_flag" ||
8489 test ! -s conftest.err
8490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_lo=$ac_mid; break
8492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008494sed 's/^/| /' conftest.$ac_ext >&5
8495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 ac_hi=`expr '(' $ac_mid ')' - 1`
8497 if test $ac_mid -le $ac_hi; then
8498 ac_lo= ac_hi=
8499 break
8500 fi
8501 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 done
8506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008508sed 's/^/| /' conftest.$ac_ext >&5
8509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008517# Binary search between lo and hi bounds.
8518while test "x$ac_lo" != "x$ac_hi"; do
8519 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008521/* confdefs.h. */
8522_ACEOF
8523cat confdefs.h >>conftest.$ac_ext
8524cat >>conftest.$ac_ext <<_ACEOF
8525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008526$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008527 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
8530{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008532test_array [0] = 0
8533
8534 ;
8535 return 0;
8536}
8537_ACEOF
8538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539if { (ac_try="$ac_compile"
8540case "(($ac_try" in
8541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8542 *) ac_try_echo=$ac_try;;
8543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008547 grep -v '^ *+' conftest.er1 >conftest.err
8548 rm -f conftest.er1
8549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 (exit $ac_status); } && {
8552 test -z "$ac_c_werror_flag" ||
8553 test ! -s conftest.err
8554 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_hi=$ac_mid
8556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008558sed 's/^/| /' conftest.$ac_ext >&5
8559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008564done
8565case $ac_lo in
8566?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008571See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008572 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_void_p=0
8575 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008576esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008579/* confdefs.h. */
8580_ACEOF
8581cat confdefs.h >>conftest.$ac_ext
8582cat >>conftest.$ac_ext <<_ACEOF
8583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008584$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008585 typedef void * ac__type_sizeof_;
8586static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8587static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008588#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008590int
8591main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008592{
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
8594 FILE *f = fopen ("conftest.val", "w");
8595 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008597 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008602 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 }
8604 else
8605 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008607 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
8613 ;
8614 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008615}
Martin v. Löwis11437992002-04-12 09:54:03 +00008616_ACEOF
8617rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618if { (ac_try="$ac_link"
8619case "(($ac_try" in
8620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8621 *) ac_try_echo=$ac_try;;
8622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 { (case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 (exit $ac_status); }; }; then
8637 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639 echo "$as_me: program exited with status $ac_status" >&5
8640echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008648See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008649 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_void_p=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
8656rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008657fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008658{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8659echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660
8661
8662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008664#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008666
8667
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008668{ echo "$as_me:$LINENO: checking for short" >&5
8669echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8670if test "${ac_cv_type_short+set}" = set; then
8671 echo $ECHO_N "(cached) $ECHO_C" >&6
8672else
8673 cat >conftest.$ac_ext <<_ACEOF
8674/* confdefs.h. */
8675_ACEOF
8676cat confdefs.h >>conftest.$ac_ext
8677cat >>conftest.$ac_ext <<_ACEOF
8678/* end confdefs.h. */
8679$ac_includes_default
8680typedef short ac__type_new_;
8681int
8682main ()
8683{
8684if ((ac__type_new_ *) 0)
8685 return 0;
8686if (sizeof (ac__type_new_))
8687 return 0;
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
8693if { (ac_try="$ac_compile"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
8698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8699 (eval "$ac_compile") 2>conftest.er1
8700 ac_status=$?
8701 grep -v '^ *+' conftest.er1 >conftest.err
8702 rm -f conftest.er1
8703 cat conftest.err >&5
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); } && {
8706 test -z "$ac_c_werror_flag" ||
8707 test ! -s conftest.err
8708 } && test -s conftest.$ac_objext; then
8709 ac_cv_type_short=yes
8710else
8711 echo "$as_me: failed program was:" >&5
8712sed 's/^/| /' conftest.$ac_ext >&5
8713
8714 ac_cv_type_short=no
8715fi
8716
8717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8718fi
8719{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8720echo "${ECHO_T}$ac_cv_type_short" >&6; }
8721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722# The cast to long int works around a bug in the HP C Compiler
8723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8725# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008726{ echo "$as_me:$LINENO: checking size of short" >&5
8727echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008728if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 if test "$cross_compiling" = yes; then
8732 # Depending upon the size, compute the lo and hi bounds.
8733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* confdefs.h. */
8735_ACEOF
8736cat confdefs.h >>conftest.$ac_ext
8737cat >>conftest.$ac_ext <<_ACEOF
8738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008740 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008745test_array [0] = 0
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752if { (ac_try="$ac_compile"
8753case "(($ac_try" in
8754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8755 *) ac_try_echo=$ac_try;;
8756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008760 grep -v '^ *+' conftest.er1 >conftest.err
8761 rm -f conftest.er1
8762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764 (exit $ac_status); } && {
8765 test -z "$ac_c_werror_flag" ||
8766 test ! -s conftest.err
8767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_lo=0 ac_mid=0
8769 while :; do
8770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* confdefs.h. */
8772_ACEOF
8773cat confdefs.h >>conftest.$ac_ext
8774cat >>conftest.$ac_ext <<_ACEOF
8775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008777 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789if { (ac_try="$ac_compile"
8790case "(($ac_try" in
8791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8792 *) ac_try_echo=$ac_try;;
8793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008797 grep -v '^ *+' conftest.er1 >conftest.err
8798 rm -f conftest.er1
8799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 (exit $ac_status); } && {
8802 test -z "$ac_c_werror_flag" ||
8803 test ! -s conftest.err
8804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_hi=$ac_mid; break
8806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 ac_lo=`expr $ac_mid + 1`
8811 if test $ac_lo -le $ac_mid; then
8812 ac_lo= ac_hi=
8813 break
8814 fi
8815 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
8818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 done
8820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008822sed 's/^/| /' conftest.$ac_ext >&5
8823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008831 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008836test_array [0] = 0
8837
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843if { (ac_try="$ac_compile"
8844case "(($ac_try" in
8845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8846 *) ac_try_echo=$ac_try;;
8847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008851 grep -v '^ *+' conftest.er1 >conftest.err
8852 rm -f conftest.er1
8853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855 (exit $ac_status); } && {
8856 test -z "$ac_c_werror_flag" ||
8857 test ! -s conftest.err
8858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_hi=-1 ac_mid=-1
8860 while :; do
8861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008868 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008873test_array [0] = 0
8874
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880if { (ac_try="$ac_compile"
8881case "(($ac_try" in
8882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883 *) ac_try_echo=$ac_try;;
8884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008888 grep -v '^ *+' conftest.er1 >conftest.err
8889 rm -f conftest.er1
8890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892 (exit $ac_status); } && {
8893 test -z "$ac_c_werror_flag" ||
8894 test ! -s conftest.err
8895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_lo=$ac_mid; break
8897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 ac_hi=`expr '(' $ac_mid ')' - 1`
8902 if test $ac_mid -le $ac_hi; then
8903 ac_lo= ac_hi=
8904 break
8905 fi
8906 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908
8909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 done
8911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920
8921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008922# Binary search between lo and hi bounds.
8923while test "x$ac_lo" != "x$ac_hi"; do
8924 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* confdefs.h. */
8927_ACEOF
8928cat confdefs.h >>conftest.$ac_ext
8929cat >>conftest.$ac_ext <<_ACEOF
8930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008932 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008937test_array [0] = 0
8938
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944if { (ac_try="$ac_compile"
8945case "(($ac_try" in
8946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8947 *) ac_try_echo=$ac_try;;
8948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008952 grep -v '^ *+' conftest.er1 >conftest.err
8953 rm -f conftest.er1
8954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 (exit $ac_status); } && {
8957 test -z "$ac_c_werror_flag" ||
8958 test ! -s conftest.err
8959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_hi=$ac_mid
8961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008963sed 's/^/| /' conftest.$ac_ext >&5
8964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967
8968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008969done
8970case $ac_lo in
8971?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008976See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008977 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978 else
8979 ac_cv_sizeof_short=0
8980 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008990 typedef short ac__type_sizeof_;
8991static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8992static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008995int
8996main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008997{
Martin v. Löwis11437992002-04-12 09:54:03 +00008998
8999 FILE *f = fopen ("conftest.val", "w");
9000 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009002 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009007 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 }
9009 else
9010 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
9018 ;
9019 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009020}
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
9022rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023if { (ac_try="$ac_link"
9024case "(($ac_try" in
9025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9026 *) ac_try_echo=$ac_try;;
9027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 { (case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 (exit $ac_status); }; }; then
9042 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044 echo "$as_me: program exited with status $ac_status" >&5
9045echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009053See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009054 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 else
9056 ac_cv_sizeof_short=0
9057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009060fi
9061rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009063{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9064echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065
9066
9067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071
9072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009073{ echo "$as_me:$LINENO: checking for float" >&5
9074echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9075if test "${ac_cv_type_float+set}" = set; then
9076 echo $ECHO_N "(cached) $ECHO_C" >&6
9077else
9078 cat >conftest.$ac_ext <<_ACEOF
9079/* confdefs.h. */
9080_ACEOF
9081cat confdefs.h >>conftest.$ac_ext
9082cat >>conftest.$ac_ext <<_ACEOF
9083/* end confdefs.h. */
9084$ac_includes_default
9085typedef float ac__type_new_;
9086int
9087main ()
9088{
9089if ((ac__type_new_ *) 0)
9090 return 0;
9091if (sizeof (ac__type_new_))
9092 return 0;
9093 ;
9094 return 0;
9095}
9096_ACEOF
9097rm -f conftest.$ac_objext
9098if { (ac_try="$ac_compile"
9099case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
9103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9104 (eval "$ac_compile") 2>conftest.er1
9105 ac_status=$?
9106 grep -v '^ *+' conftest.er1 >conftest.err
9107 rm -f conftest.er1
9108 cat conftest.err >&5
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } && {
9111 test -z "$ac_c_werror_flag" ||
9112 test ! -s conftest.err
9113 } && test -s conftest.$ac_objext; then
9114 ac_cv_type_float=yes
9115else
9116 echo "$as_me: failed program was:" >&5
9117sed 's/^/| /' conftest.$ac_ext >&5
9118
9119 ac_cv_type_float=no
9120fi
9121
9122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123fi
9124{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9125echo "${ECHO_T}$ac_cv_type_float" >&6; }
9126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127# The cast to long int works around a bug in the HP C Compiler
9128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9130# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009131{ echo "$as_me:$LINENO: checking size of float" >&5
9132echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009135else
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 if test "$cross_compiling" = yes; then
9137 # Depending upon the size, compute the lo and hi bounds.
9138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009145 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009150test_array [0] = 0
9151
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157if { (ac_try="$ac_compile"
9158case "(($ac_try" in
9159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9160 *) ac_try_echo=$ac_try;;
9161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009165 grep -v '^ *+' conftest.er1 >conftest.err
9166 rm -f conftest.er1
9167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 (exit $ac_status); } && {
9170 test -z "$ac_c_werror_flag" ||
9171 test ! -s conftest.err
9172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_lo=0 ac_mid=0
9174 while :; do
9175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* confdefs.h. */
9177_ACEOF
9178cat confdefs.h >>conftest.$ac_ext
9179cat >>conftest.$ac_ext <<_ACEOF
9180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009182 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009183int
9184main ()
9185{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009187test_array [0] = 0
9188
9189 ;
9190 return 0;
9191}
9192_ACEOF
9193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194if { (ac_try="$ac_compile"
9195case "(($ac_try" in
9196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9197 *) ac_try_echo=$ac_try;;
9198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 (exit $ac_status); } && {
9207 test -z "$ac_c_werror_flag" ||
9208 test ! -s conftest.err
9209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_hi=$ac_mid; break
9211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009213sed 's/^/| /' conftest.$ac_ext >&5
9214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 ac_lo=`expr $ac_mid + 1`
9216 if test $ac_lo -le $ac_mid; then
9217 ac_lo= ac_hi=
9218 break
9219 fi
9220 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222
9223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 done
9225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009230/* confdefs.h. */
9231_ACEOF
9232cat confdefs.h >>conftest.$ac_ext
9233cat >>conftest.$ac_ext <<_ACEOF
9234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009235$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009236 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009237int
9238main ()
9239{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009241test_array [0] = 0
9242
9243 ;
9244 return 0;
9245}
9246_ACEOF
9247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248if { (ac_try="$ac_compile"
9249case "(($ac_try" in
9250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9251 *) ac_try_echo=$ac_try;;
9252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009256 grep -v '^ *+' conftest.er1 >conftest.err
9257 rm -f conftest.er1
9258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 (exit $ac_status); } && {
9261 test -z "$ac_c_werror_flag" ||
9262 test ! -s conftest.err
9263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 ac_hi=-1 ac_mid=-1
9265 while :; do
9266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009273 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009274int
9275main ()
9276{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009278test_array [0] = 0
9279
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285if { (ac_try="$ac_compile"
9286case "(($ac_try" in
9287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288 *) ac_try_echo=$ac_try;;
9289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009293 grep -v '^ *+' conftest.er1 >conftest.err
9294 rm -f conftest.er1
9295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009297 (exit $ac_status); } && {
9298 test -z "$ac_c_werror_flag" ||
9299 test ! -s conftest.err
9300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_lo=$ac_mid; break
9302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009304sed 's/^/| /' conftest.$ac_ext >&5
9305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 ac_hi=`expr '(' $ac_mid ')' - 1`
9307 if test $ac_mid -le $ac_hi; then
9308 ac_lo= ac_hi=
9309 break
9310 fi
9311 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313
9314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 done
9316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009318sed 's/^/| /' conftest.$ac_ext >&5
9319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325
9326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009327# Binary search between lo and hi bounds.
9328while test "x$ac_lo" != "x$ac_hi"; do
9329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009331/* confdefs.h. */
9332_ACEOF
9333cat confdefs.h >>conftest.$ac_ext
9334cat >>conftest.$ac_ext <<_ACEOF
9335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009337 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009338int
9339main ()
9340{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009342test_array [0] = 0
9343
9344 ;
9345 return 0;
9346}
9347_ACEOF
9348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349if { (ac_try="$ac_compile"
9350case "(($ac_try" in
9351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9352 *) ac_try_echo=$ac_try;;
9353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009357 grep -v '^ *+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361 (exit $ac_status); } && {
9362 test -z "$ac_c_werror_flag" ||
9363 test ! -s conftest.err
9364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_hi=$ac_mid
9366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009368sed 's/^/| /' conftest.$ac_ext >&5
9369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372
9373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009374done
9375case $ac_lo in
9376?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009381See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009382 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383 else
9384 ac_cv_sizeof_float=0
9385 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009387else
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009395 typedef float ac__type_sizeof_;
9396static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9397static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009398#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009402{
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
9404 FILE *f = fopen ("conftest.val", "w");
9405 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009407 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009412 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 }
9414 else
9415 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009417 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
9423 ;
9424 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009425}
Martin v. Löwis11437992002-04-12 09:54:03 +00009426_ACEOF
9427rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428if { (ac_try="$ac_link"
9429case "(($ac_try" in
9430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9431 *) ac_try_echo=$ac_try;;
9432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 { (case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 (exit $ac_status); }; }; then
9447 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449 echo "$as_me: program exited with status $ac_status" >&5
9450echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009458See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009459 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 else
9461 ac_cv_sizeof_float=0
9462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009465fi
9466rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009468{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9469echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470
9471
9472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476
9477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009478{ echo "$as_me:$LINENO: checking for double" >&5
9479echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9480if test "${ac_cv_type_double+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482else
9483 cat >conftest.$ac_ext <<_ACEOF
9484/* confdefs.h. */
9485_ACEOF
9486cat confdefs.h >>conftest.$ac_ext
9487cat >>conftest.$ac_ext <<_ACEOF
9488/* end confdefs.h. */
9489$ac_includes_default
9490typedef double ac__type_new_;
9491int
9492main ()
9493{
9494if ((ac__type_new_ *) 0)
9495 return 0;
9496if (sizeof (ac__type_new_))
9497 return 0;
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502rm -f conftest.$ac_objext
9503if { (ac_try="$ac_compile"
9504case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
9508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9509 (eval "$ac_compile") 2>conftest.er1
9510 ac_status=$?
9511 grep -v '^ *+' conftest.er1 >conftest.err
9512 rm -f conftest.er1
9513 cat conftest.err >&5
9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9515 (exit $ac_status); } && {
9516 test -z "$ac_c_werror_flag" ||
9517 test ! -s conftest.err
9518 } && test -s conftest.$ac_objext; then
9519 ac_cv_type_double=yes
9520else
9521 echo "$as_me: failed program was:" >&5
9522sed 's/^/| /' conftest.$ac_ext >&5
9523
9524 ac_cv_type_double=no
9525fi
9526
9527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9528fi
9529{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9530echo "${ECHO_T}$ac_cv_type_double" >&6; }
9531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532# The cast to long int works around a bug in the HP C Compiler
9533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9535# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009536{ echo "$as_me:$LINENO: checking size of double" >&5
9537echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009538if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009539 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 if test "$cross_compiling" = yes; then
9542 # Depending upon the size, compute the lo and hi bounds.
9543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009550 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551int
9552main ()
9553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009555test_array [0] = 0
9556
9557 ;
9558 return 0;
9559}
9560_ACEOF
9561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562if { (ac_try="$ac_compile"
9563case "(($ac_try" in
9564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9565 *) ac_try_echo=$ac_try;;
9566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009570 grep -v '^ *+' conftest.er1 >conftest.err
9571 rm -f conftest.er1
9572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 (exit $ac_status); } && {
9575 test -z "$ac_c_werror_flag" ||
9576 test ! -s conftest.err
9577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_lo=0 ac_mid=0
9579 while :; do
9580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* confdefs.h. */
9582_ACEOF
9583cat confdefs.h >>conftest.$ac_ext
9584cat >>conftest.$ac_ext <<_ACEOF
9585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009586$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009587 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009588int
9589main ()
9590{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009592test_array [0] = 0
9593
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599if { (ac_try="$ac_compile"
9600case "(($ac_try" in
9601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9602 *) ac_try_echo=$ac_try;;
9603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009607 grep -v '^ *+' conftest.er1 >conftest.err
9608 rm -f conftest.er1
9609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 (exit $ac_status); } && {
9612 test -z "$ac_c_werror_flag" ||
9613 test ! -s conftest.err
9614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_hi=$ac_mid; break
9616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009618sed 's/^/| /' conftest.$ac_ext >&5
9619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 ac_lo=`expr $ac_mid + 1`
9621 if test $ac_lo -le $ac_mid; then
9622 ac_lo= ac_hi=
9623 break
9624 fi
9625 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627
9628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 done
9630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009632sed 's/^/| /' conftest.$ac_ext >&5
9633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009641 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009642int
9643main ()
9644{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009646test_array [0] = 0
9647
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653if { (ac_try="$ac_compile"
9654case "(($ac_try" in
9655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9656 *) ac_try_echo=$ac_try;;
9657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009661 grep -v '^ *+' conftest.er1 >conftest.err
9662 rm -f conftest.er1
9663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665 (exit $ac_status); } && {
9666 test -z "$ac_c_werror_flag" ||
9667 test ! -s conftest.err
9668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_hi=-1 ac_mid=-1
9670 while :; do
9671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009678 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009679int
9680main ()
9681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009683test_array [0] = 0
9684
9685 ;
9686 return 0;
9687}
9688_ACEOF
9689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690if { (ac_try="$ac_compile"
9691case "(($ac_try" in
9692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9693 *) ac_try_echo=$ac_try;;
9694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009698 grep -v '^ *+' conftest.er1 >conftest.err
9699 rm -f conftest.er1
9700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702 (exit $ac_status); } && {
9703 test -z "$ac_c_werror_flag" ||
9704 test ! -s conftest.err
9705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_lo=$ac_mid; break
9707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009709sed 's/^/| /' conftest.$ac_ext >&5
9710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 ac_hi=`expr '(' $ac_mid ')' - 1`
9712 if test $ac_mid -le $ac_hi; then
9713 ac_lo= ac_hi=
9714 break
9715 fi
9716 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718
9719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 done
9721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009723sed 's/^/| /' conftest.$ac_ext >&5
9724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730
9731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009732# Binary search between lo and hi bounds.
9733while test "x$ac_lo" != "x$ac_hi"; do
9734 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* confdefs.h. */
9737_ACEOF
9738cat confdefs.h >>conftest.$ac_ext
9739cat >>conftest.$ac_ext <<_ACEOF
9740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009742 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009747test_array [0] = 0
9748
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754if { (ac_try="$ac_compile"
9755case "(($ac_try" in
9756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9757 *) ac_try_echo=$ac_try;;
9758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009762 grep -v '^ *+' conftest.er1 >conftest.err
9763 rm -f conftest.er1
9764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766 (exit $ac_status); } && {
9767 test -z "$ac_c_werror_flag" ||
9768 test ! -s conftest.err
9769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_hi=$ac_mid
9771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009773sed 's/^/| /' conftest.$ac_ext >&5
9774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777
9778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009779done
9780case $ac_lo in
9781?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009786See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009787 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788 else
9789 ac_cv_sizeof_double=0
9790 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009791esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* confdefs.h. */
9795_ACEOF
9796cat confdefs.h >>conftest.$ac_ext
9797cat >>conftest.$ac_ext <<_ACEOF
9798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009800 typedef double ac__type_sizeof_;
9801static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9802static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009807{
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
9809 FILE *f = fopen ("conftest.val", "w");
9810 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009812 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009817 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 }
9819 else
9820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
9828 ;
9829 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009830}
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
9832rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833if { (ac_try="$ac_link"
9834case "(($ac_try" in
9835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9836 *) ac_try_echo=$ac_try;;
9837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 { (case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 (exit $ac_status); }; }; then
9852 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854 echo "$as_me: program exited with status $ac_status" >&5
9855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwis11437992002-04-12 09:54:03 +00009858( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009863See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009864 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 else
9866 ac_cv_sizeof_double=0
9867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009870fi
9871rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009873{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9874echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875
9876
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881
9882
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009883{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9884echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9885if test "${ac_cv_type_fpos_t+set}" = set; then
9886 echo $ECHO_N "(cached) $ECHO_C" >&6
9887else
9888 cat >conftest.$ac_ext <<_ACEOF
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
9894$ac_includes_default
9895typedef fpos_t ac__type_new_;
9896int
9897main ()
9898{
9899if ((ac__type_new_ *) 0)
9900 return 0;
9901if (sizeof (ac__type_new_))
9902 return 0;
9903 ;
9904 return 0;
9905}
9906_ACEOF
9907rm -f conftest.$ac_objext
9908if { (ac_try="$ac_compile"
9909case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
9913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9914 (eval "$ac_compile") 2>conftest.er1
9915 ac_status=$?
9916 grep -v '^ *+' conftest.er1 >conftest.err
9917 rm -f conftest.er1
9918 cat conftest.err >&5
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } && {
9921 test -z "$ac_c_werror_flag" ||
9922 test ! -s conftest.err
9923 } && test -s conftest.$ac_objext; then
9924 ac_cv_type_fpos_t=yes
9925else
9926 echo "$as_me: failed program was:" >&5
9927sed 's/^/| /' conftest.$ac_ext >&5
9928
9929 ac_cv_type_fpos_t=no
9930fi
9931
9932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9933fi
9934{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9935echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937# The cast to long int works around a bug in the HP C Compiler
9938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9940# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009941{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9942echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009943if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009944 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009945else
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 if test "$cross_compiling" = yes; then
9947 # Depending upon the size, compute the lo and hi bounds.
9948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* confdefs.h. */
9950_ACEOF
9951cat confdefs.h >>conftest.$ac_ext
9952cat >>conftest.$ac_ext <<_ACEOF
9953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009955 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009956int
9957main ()
9958{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009960test_array [0] = 0
9961
9962 ;
9963 return 0;
9964}
9965_ACEOF
9966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967if { (ac_try="$ac_compile"
9968case "(($ac_try" in
9969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9970 *) ac_try_echo=$ac_try;;
9971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009975 grep -v '^ *+' conftest.er1 >conftest.err
9976 rm -f conftest.er1
9977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979 (exit $ac_status); } && {
9980 test -z "$ac_c_werror_flag" ||
9981 test ! -s conftest.err
9982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_lo=0 ac_mid=0
9984 while :; do
9985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* confdefs.h. */
9987_ACEOF
9988cat confdefs.h >>conftest.$ac_ext
9989cat >>conftest.$ac_ext <<_ACEOF
9990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009991$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009992 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009993int
9994main ()
9995{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009997test_array [0] = 0
9998
9999 ;
10000 return 0;
10001}
10002_ACEOF
10003rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004if { (ac_try="$ac_compile"
10005case "(($ac_try" in
10006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10007 *) ac_try_echo=$ac_try;;
10008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010012 grep -v '^ *+' conftest.er1 >conftest.err
10013 rm -f conftest.er1
10014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016 (exit $ac_status); } && {
10017 test -z "$ac_c_werror_flag" ||
10018 test ! -s conftest.err
10019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_hi=$ac_mid; break
10021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010023sed 's/^/| /' conftest.$ac_ext >&5
10024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 ac_lo=`expr $ac_mid + 1`
10026 if test $ac_lo -le $ac_mid; then
10027 ac_lo= ac_hi=
10028 break
10029 fi
10030 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032
10033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 done
10035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010037sed 's/^/| /' conftest.$ac_ext >&5
10038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010045$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010046 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010047int
10048main ()
10049{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010051test_array [0] = 0
10052
10053 ;
10054 return 0;
10055}
10056_ACEOF
10057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058if { (ac_try="$ac_compile"
10059case "(($ac_try" in
10060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10061 *) ac_try_echo=$ac_try;;
10062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010066 grep -v '^ *+' conftest.er1 >conftest.err
10067 rm -f conftest.er1
10068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 (exit $ac_status); } && {
10071 test -z "$ac_c_werror_flag" ||
10072 test ! -s conftest.err
10073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_hi=-1 ac_mid=-1
10075 while :; do
10076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010083 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010084int
10085main ()
10086{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010088test_array [0] = 0
10089
10090 ;
10091 return 0;
10092}
10093_ACEOF
10094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095if { (ac_try="$ac_compile"
10096case "(($ac_try" in
10097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10098 *) ac_try_echo=$ac_try;;
10099esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010103 grep -v '^ *+' conftest.er1 >conftest.err
10104 rm -f conftest.er1
10105 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107 (exit $ac_status); } && {
10108 test -z "$ac_c_werror_flag" ||
10109 test ! -s conftest.err
10110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_lo=$ac_mid; break
10112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010114sed 's/^/| /' conftest.$ac_ext >&5
10115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 ac_hi=`expr '(' $ac_mid ')' - 1`
10117 if test $ac_mid -le $ac_hi; then
10118 ac_lo= ac_hi=
10119 break
10120 fi
10121 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123
10124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 done
10126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010128sed 's/^/| /' conftest.$ac_ext >&5
10129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135
10136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010137# Binary search between lo and hi bounds.
10138while test "x$ac_lo" != "x$ac_hi"; do
10139 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* confdefs.h. */
10142_ACEOF
10143cat confdefs.h >>conftest.$ac_ext
10144cat >>conftest.$ac_ext <<_ACEOF
10145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010147 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010152test_array [0] = 0
10153
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159if { (ac_try="$ac_compile"
10160case "(($ac_try" in
10161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10162 *) ac_try_echo=$ac_try;;
10163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010167 grep -v '^ *+' conftest.er1 >conftest.err
10168 rm -f conftest.er1
10169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 (exit $ac_status); } && {
10172 test -z "$ac_c_werror_flag" ||
10173 test ! -s conftest.err
10174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_hi=$ac_mid
10176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010178sed 's/^/| /' conftest.$ac_ext >&5
10179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182
10183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010184done
10185case $ac_lo in
10186?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010189See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010191See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010192 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193 else
10194 ac_cv_sizeof_fpos_t=0
10195 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010196esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010197else
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* confdefs.h. */
10200_ACEOF
10201cat confdefs.h >>conftest.$ac_ext
10202cat >>conftest.$ac_ext <<_ACEOF
10203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010205 typedef fpos_t ac__type_sizeof_;
10206static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10207static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010210int
10211main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010212{
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
10214 FILE *f = fopen ("conftest.val", "w");
10215 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010217 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010222 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 }
10224 else
10225 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232
10233 ;
10234 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010235}
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
10237rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238if { (ac_try="$ac_link"
10239case "(($ac_try" in
10240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10241 *) ac_try_echo=$ac_try;;
10242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 { (case "(($ac_try" in
10249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10250 *) ac_try_echo=$ac_try;;
10251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 (exit $ac_status); }; }; then
10257 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259 echo "$as_me: program exited with status $ac_status" >&5
10260echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwis11437992002-04-12 09:54:03 +000010263( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010268See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010269 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 else
10271 ac_cv_sizeof_fpos_t=0
10272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275fi
10276rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010278{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10279echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280
10281
10282
Martin v. Löwis11437992002-04-12 09:54:03 +000010283cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286
Michael W. Hudson54241132001-12-07 15:38:26 +000010287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010288{ echo "$as_me:$LINENO: checking for size_t" >&5
10289echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10290if test "${ac_cv_type_size_t+set}" = set; then
10291 echo $ECHO_N "(cached) $ECHO_C" >&6
10292else
10293 cat >conftest.$ac_ext <<_ACEOF
10294/* confdefs.h. */
10295_ACEOF
10296cat confdefs.h >>conftest.$ac_ext
10297cat >>conftest.$ac_ext <<_ACEOF
10298/* end confdefs.h. */
10299$ac_includes_default
10300typedef size_t ac__type_new_;
10301int
10302main ()
10303{
10304if ((ac__type_new_ *) 0)
10305 return 0;
10306if (sizeof (ac__type_new_))
10307 return 0;
10308 ;
10309 return 0;
10310}
10311_ACEOF
10312rm -f conftest.$ac_objext
10313if { (ac_try="$ac_compile"
10314case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
10318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10319 (eval "$ac_compile") 2>conftest.er1
10320 ac_status=$?
10321 grep -v '^ *+' conftest.er1 >conftest.err
10322 rm -f conftest.er1
10323 cat conftest.err >&5
10324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10325 (exit $ac_status); } && {
10326 test -z "$ac_c_werror_flag" ||
10327 test ! -s conftest.err
10328 } && test -s conftest.$ac_objext; then
10329 ac_cv_type_size_t=yes
10330else
10331 echo "$as_me: failed program was:" >&5
10332sed 's/^/| /' conftest.$ac_ext >&5
10333
10334 ac_cv_type_size_t=no
10335fi
10336
10337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10338fi
10339{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10340echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342# The cast to long int works around a bug in the HP C Compiler
10343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10345# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010346{ echo "$as_me:$LINENO: checking size of size_t" >&5
10347echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010349 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010351 if test "$cross_compiling" = yes; then
10352 # Depending upon the size, compute the lo and hi bounds.
10353cat >conftest.$ac_ext <<_ACEOF
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
10359$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010360 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361int
10362main ()
10363{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010365test_array [0] = 0
10366
10367 ;
10368 return 0;
10369}
10370_ACEOF
10371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372if { (ac_try="$ac_compile"
10373case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010379 ac_status=$?
10380 grep -v '^ *+' conftest.er1 >conftest.err
10381 rm -f conftest.er1
10382 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384 (exit $ac_status); } && {
10385 test -z "$ac_c_werror_flag" ||
10386 test ! -s conftest.err
10387 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010388 ac_lo=0 ac_mid=0
10389 while :; do
10390 cat >conftest.$ac_ext <<_ACEOF
10391/* confdefs.h. */
10392_ACEOF
10393cat confdefs.h >>conftest.$ac_ext
10394cat >>conftest.$ac_ext <<_ACEOF
10395/* end confdefs.h. */
10396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010397 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010398int
10399main ()
10400{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010402test_array [0] = 0
10403
10404 ;
10405 return 0;
10406}
10407_ACEOF
10408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409if { (ac_try="$ac_compile"
10410case "(($ac_try" in
10411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10412 *) ac_try_echo=$ac_try;;
10413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416 ac_status=$?
10417 grep -v '^ *+' conftest.er1 >conftest.err
10418 rm -f conftest.er1
10419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421 (exit $ac_status); } && {
10422 test -z "$ac_c_werror_flag" ||
10423 test ! -s conftest.err
10424 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 ac_hi=$ac_mid; break
10426else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010427 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010428sed 's/^/| /' conftest.$ac_ext >&5
10429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 ac_lo=`expr $ac_mid + 1`
10431 if test $ac_lo -le $ac_mid; then
10432 ac_lo= ac_hi=
10433 break
10434 fi
10435 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437
10438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439 done
10440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010441 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010442sed 's/^/| /' conftest.$ac_ext >&5
10443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
10450$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010451 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452int
10453main ()
10454{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456test_array [0] = 0
10457
10458 ;
10459 return 0;
10460}
10461_ACEOF
10462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463if { (ac_try="$ac_compile"
10464case "(($ac_try" in
10465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10466 *) ac_try_echo=$ac_try;;
10467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470 ac_status=$?
10471 grep -v '^ *+' conftest.er1 >conftest.err
10472 rm -f conftest.er1
10473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475 (exit $ac_status); } && {
10476 test -z "$ac_c_werror_flag" ||
10477 test ! -s conftest.err
10478 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010479 ac_hi=-1 ac_mid=-1
10480 while :; do
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010488 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489int
10490main ()
10491{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010493test_array [0] = 0
10494
10495 ;
10496 return 0;
10497}
10498_ACEOF
10499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500if { (ac_try="$ac_compile"
10501case "(($ac_try" in
10502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10503 *) ac_try_echo=$ac_try;;
10504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507 ac_status=$?
10508 grep -v '^ *+' conftest.er1 >conftest.err
10509 rm -f conftest.er1
10510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512 (exit $ac_status); } && {
10513 test -z "$ac_c_werror_flag" ||
10514 test ! -s conftest.err
10515 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 ac_lo=$ac_mid; break
10517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010518 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 ac_hi=`expr '(' $ac_mid ')' - 1`
10522 if test $ac_mid -le $ac_hi; then
10523 ac_lo= ac_hi=
10524 break
10525 fi
10526 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528
10529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 done
10531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010532 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533sed 's/^/| /' conftest.$ac_ext >&5
10534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540
10541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010542# Binary search between lo and hi bounds.
10543while test "x$ac_lo" != "x$ac_hi"; do
10544 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10545 cat >conftest.$ac_ext <<_ACEOF
10546/* confdefs.h. */
10547_ACEOF
10548cat confdefs.h >>conftest.$ac_ext
10549cat >>conftest.$ac_ext <<_ACEOF
10550/* end confdefs.h. */
10551$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010552 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553int
10554main ()
10555{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557test_array [0] = 0
10558
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564if { (ac_try="$ac_compile"
10565case "(($ac_try" in
10566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10567 *) ac_try_echo=$ac_try;;
10568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571 ac_status=$?
10572 grep -v '^ *+' conftest.er1 >conftest.err
10573 rm -f conftest.er1
10574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576 (exit $ac_status); } && {
10577 test -z "$ac_c_werror_flag" ||
10578 test ! -s conftest.err
10579 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_hi=$ac_mid
10581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010582 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583sed 's/^/| /' conftest.$ac_ext >&5
10584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587
10588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589done
10590case $ac_lo in
10591?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010597 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598 else
10599 ac_cv_sizeof_size_t=0
10600 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601esac
10602else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 cat >conftest.$ac_ext <<_ACEOF
10604/* confdefs.h. */
10605_ACEOF
10606cat confdefs.h >>conftest.$ac_ext
10607cat >>conftest.$ac_ext <<_ACEOF
10608/* end confdefs.h. */
10609$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010610 typedef size_t ac__type_sizeof_;
10611static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10612static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613#include <stdio.h>
10614#include <stdlib.h>
10615int
10616main ()
10617{
10618
10619 FILE *f = fopen ("conftest.val", "w");
10620 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010622 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010627 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628 }
10629 else
10630 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643if { (ac_try="$ac_link"
10644case "(($ac_try" in
10645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10646 *) ac_try_echo=$ac_try;;
10647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 { (case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 (exit $ac_status); }; }; then
10662 ac_cv_sizeof_size_t=`cat conftest.val`
10663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664 echo "$as_me: program exited with status $ac_status" >&5
10665echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
10668( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010674 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 else
10676 ac_cv_sizeof_size_t=0
10677 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
10681rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010683{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10684echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685
10686
10687
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688cat >>confdefs.h <<_ACEOF
10689#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10690_ACEOF
10691
10692
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010693{ echo "$as_me:$LINENO: checking for pid_t" >&5
10694echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10695if test "${ac_cv_type_pid_t+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
10697else
10698 cat >conftest.$ac_ext <<_ACEOF
10699/* confdefs.h. */
10700_ACEOF
10701cat confdefs.h >>conftest.$ac_ext
10702cat >>conftest.$ac_ext <<_ACEOF
10703/* end confdefs.h. */
10704$ac_includes_default
10705typedef pid_t ac__type_new_;
10706int
10707main ()
10708{
10709if ((ac__type_new_ *) 0)
10710 return 0;
10711if (sizeof (ac__type_new_))
10712 return 0;
10713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext
10718if { (ac_try="$ac_compile"
10719case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
10723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10724 (eval "$ac_compile") 2>conftest.er1
10725 ac_status=$?
10726 grep -v '^ *+' conftest.er1 >conftest.err
10727 rm -f conftest.er1
10728 cat conftest.err >&5
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } && {
10731 test -z "$ac_c_werror_flag" ||
10732 test ! -s conftest.err
10733 } && test -s conftest.$ac_objext; then
10734 ac_cv_type_pid_t=yes
10735else
10736 echo "$as_me: failed program was:" >&5
10737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739 ac_cv_type_pid_t=no
10740fi
10741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743fi
10744{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10745echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10746
Christian Heimes400adb02008-02-01 08:12:03 +000010747# The cast to long int works around a bug in the HP C Compiler
10748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10750# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010751{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10752echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010753if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010754 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010755else
10756 if test "$cross_compiling" = yes; then
10757 # Depending upon the size, compute the lo and hi bounds.
10758cat >conftest.$ac_ext <<_ACEOF
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
10764$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010765 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010766int
10767main ()
10768{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010770test_array [0] = 0
10771
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext
10777if { (ac_try="$ac_compile"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010783 (eval "$ac_compile") 2>conftest.er1
10784 ac_status=$?
10785 grep -v '^ *+' conftest.er1 >conftest.err
10786 rm -f conftest.er1
10787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010789 (exit $ac_status); } && {
10790 test -z "$ac_c_werror_flag" ||
10791 test ! -s conftest.err
10792 } && test -s conftest.$ac_objext; then
10793 ac_lo=0 ac_mid=0
10794 while :; do
10795 cat >conftest.$ac_ext <<_ACEOF
10796/* confdefs.h. */
10797_ACEOF
10798cat confdefs.h >>conftest.$ac_ext
10799cat >>conftest.$ac_ext <<_ACEOF
10800/* end confdefs.h. */
10801$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010802 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010803int
10804main ()
10805{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010807test_array [0] = 0
10808
10809 ;
10810 return 0;
10811}
10812_ACEOF
10813rm -f conftest.$ac_objext
10814if { (ac_try="$ac_compile"
10815case "(($ac_try" in
10816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10817 *) ac_try_echo=$ac_try;;
10818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010820 (eval "$ac_compile") 2>conftest.er1
10821 ac_status=$?
10822 grep -v '^ *+' conftest.er1 >conftest.err
10823 rm -f conftest.er1
10824 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010826 (exit $ac_status); } && {
10827 test -z "$ac_c_werror_flag" ||
10828 test ! -s conftest.err
10829 } && test -s conftest.$ac_objext; then
10830 ac_hi=$ac_mid; break
10831else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010832 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010833sed 's/^/| /' conftest.$ac_ext >&5
10834
10835 ac_lo=`expr $ac_mid + 1`
10836 if test $ac_lo -le $ac_mid; then
10837 ac_lo= ac_hi=
10838 break
10839 fi
10840 ac_mid=`expr 2 '*' $ac_mid + 1`
10841fi
10842
10843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844 done
10845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010846 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010847sed 's/^/| /' conftest.$ac_ext >&5
10848
10849 cat >conftest.$ac_ext <<_ACEOF
10850/* confdefs.h. */
10851_ACEOF
10852cat confdefs.h >>conftest.$ac_ext
10853cat >>conftest.$ac_ext <<_ACEOF
10854/* end confdefs.h. */
10855$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010856 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010857int
10858main ()
10859{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010861test_array [0] = 0
10862
10863 ;
10864 return 0;
10865}
10866_ACEOF
10867rm -f conftest.$ac_objext
10868if { (ac_try="$ac_compile"
10869case "(($ac_try" in
10870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10871 *) ac_try_echo=$ac_try;;
10872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010874 (eval "$ac_compile") 2>conftest.er1
10875 ac_status=$?
10876 grep -v '^ *+' conftest.er1 >conftest.err
10877 rm -f conftest.er1
10878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010880 (exit $ac_status); } && {
10881 test -z "$ac_c_werror_flag" ||
10882 test ! -s conftest.err
10883 } && test -s conftest.$ac_objext; then
10884 ac_hi=-1 ac_mid=-1
10885 while :; do
10886 cat >conftest.$ac_ext <<_ACEOF
10887/* confdefs.h. */
10888_ACEOF
10889cat confdefs.h >>conftest.$ac_ext
10890cat >>conftest.$ac_ext <<_ACEOF
10891/* end confdefs.h. */
10892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010893 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010894int
10895main ()
10896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010898test_array [0] = 0
10899
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904rm -f conftest.$ac_objext
10905if { (ac_try="$ac_compile"
10906case "(($ac_try" in
10907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10908 *) ac_try_echo=$ac_try;;
10909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010911 (eval "$ac_compile") 2>conftest.er1
10912 ac_status=$?
10913 grep -v '^ *+' conftest.er1 >conftest.err
10914 rm -f conftest.er1
10915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010917 (exit $ac_status); } && {
10918 test -z "$ac_c_werror_flag" ||
10919 test ! -s conftest.err
10920 } && test -s conftest.$ac_objext; then
10921 ac_lo=$ac_mid; break
10922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010923 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924sed 's/^/| /' conftest.$ac_ext >&5
10925
10926 ac_hi=`expr '(' $ac_mid ')' - 1`
10927 if test $ac_mid -le $ac_hi; then
10928 ac_lo= ac_hi=
10929 break
10930 fi
10931 ac_mid=`expr 2 '*' $ac_mid`
10932fi
10933
10934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10935 done
10936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010937 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010938sed 's/^/| /' conftest.$ac_ext >&5
10939
10940 ac_lo= ac_hi=
10941fi
10942
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944fi
10945
10946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947# Binary search between lo and hi bounds.
10948while test "x$ac_lo" != "x$ac_hi"; do
10949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10950 cat >conftest.$ac_ext <<_ACEOF
10951/* confdefs.h. */
10952_ACEOF
10953cat confdefs.h >>conftest.$ac_ext
10954cat >>conftest.$ac_ext <<_ACEOF
10955/* end confdefs.h. */
10956$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010957 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010958int
10959main ()
10960{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010962test_array [0] = 0
10963
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968rm -f conftest.$ac_objext
10969if { (ac_try="$ac_compile"
10970case "(($ac_try" in
10971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10972 *) ac_try_echo=$ac_try;;
10973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010975 (eval "$ac_compile") 2>conftest.er1
10976 ac_status=$?
10977 grep -v '^ *+' conftest.er1 >conftest.err
10978 rm -f conftest.er1
10979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010981 (exit $ac_status); } && {
10982 test -z "$ac_c_werror_flag" ||
10983 test ! -s conftest.err
10984 } && test -s conftest.$ac_objext; then
10985 ac_hi=$ac_mid
10986else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010987 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010988sed 's/^/| /' conftest.$ac_ext >&5
10989
10990 ac_lo=`expr '(' $ac_mid ')' + 1`
10991fi
10992
10993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10994done
10995case $ac_lo in
10996?*) ac_cv_sizeof_pid_t=$ac_lo;;
10997'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010999See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011001See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011002 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011003 else
11004 ac_cv_sizeof_pid_t=0
11005 fi ;;
11006esac
11007else
11008 cat >conftest.$ac_ext <<_ACEOF
11009/* confdefs.h. */
11010_ACEOF
11011cat confdefs.h >>conftest.$ac_ext
11012cat >>conftest.$ac_ext <<_ACEOF
11013/* end confdefs.h. */
11014$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011015 typedef pid_t ac__type_sizeof_;
11016static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11017static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011018#include <stdio.h>
11019#include <stdlib.h>
11020int
11021main ()
11022{
11023
11024 FILE *f = fopen ("conftest.val", "w");
11025 if (! f)
11026 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011027 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011028 {
11029 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011031 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011032 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011033 }
11034 else
11035 {
11036 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011038 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011040 }
11041 return ferror (f) || fclose (f) != 0;
11042
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047rm -f conftest$ac_exeext
11048if { (ac_try="$ac_link"
11049case "(($ac_try" in
11050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11051 *) ac_try_echo=$ac_try;;
11052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011054 (eval "$ac_link") 2>&5
11055 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11058 { (case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011063 (eval "$ac_try") 2>&5
11064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011066 (exit $ac_status); }; }; then
11067 ac_cv_sizeof_pid_t=`cat conftest.val`
11068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069 echo "$as_me: program exited with status $ac_status" >&5
11070echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073( exit $ac_status )
11074if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011076See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011078See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011079 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011080 else
11081 ac_cv_sizeof_pid_t=0
11082 fi
11083fi
11084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11085fi
11086rm -f conftest.val
11087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011088{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11089echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011090
11091
11092
11093cat >>confdefs.h <<_ACEOF
11094#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11095_ACEOF
11096
11097
Michael W. Hudson54241132001-12-07 15:38:26 +000011098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099{ echo "$as_me:$LINENO: checking for long long support" >&5
11100echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011101have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* confdefs.h. */
11104_ACEOF
11105cat confdefs.h >>conftest.$ac_ext
11106cat >>conftest.$ac_ext <<_ACEOF
11107/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108
Martin v. Löwis11437992002-04-12 09:54:03 +000011109int
11110main ()
11111{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
11117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118if { (ac_try="$ac_compile"
11119case "(($ac_try" in
11120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11121 *) ac_try_echo=$ac_try;;
11122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011126 grep -v '^ *+' conftest.er1 >conftest.err
11127 rm -f conftest.er1
11128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130 (exit $ac_status); } && {
11131 test -z "$ac_c_werror_flag" ||
11132 test ! -s conftest.err
11133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
11135
11136cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011137#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
11139
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011140 have_long_long=yes
11141
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011144sed 's/^/| /' conftest.$ac_ext >&5
11145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148
11149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011150{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11151echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011152if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153{ echo "$as_me:$LINENO: checking for long long" >&5
11154echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11155if test "${ac_cv_type_long_long+set}" = set; then
11156 echo $ECHO_N "(cached) $ECHO_C" >&6
11157else
11158 cat >conftest.$ac_ext <<_ACEOF
11159/* confdefs.h. */
11160_ACEOF
11161cat confdefs.h >>conftest.$ac_ext
11162cat >>conftest.$ac_ext <<_ACEOF
11163/* end confdefs.h. */
11164$ac_includes_default
11165typedef long long ac__type_new_;
11166int
11167main ()
11168{
11169if ((ac__type_new_ *) 0)
11170 return 0;
11171if (sizeof (ac__type_new_))
11172 return 0;
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
11178if { (ac_try="$ac_compile"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_compile") 2>conftest.er1
11185 ac_status=$?
11186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest.$ac_objext; then
11194 ac_cv_type_long_long=yes
11195else
11196 echo "$as_me: failed program was:" >&5
11197sed 's/^/| /' conftest.$ac_ext >&5
11198
11199 ac_cv_type_long_long=no
11200fi
11201
11202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11203fi
11204{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11205echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207# The cast to long int works around a bug in the HP C Compiler
11208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11210# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011211{ echo "$as_me:$LINENO: checking size of long long" >&5
11212echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011213if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 if test "$cross_compiling" = yes; then
11217 # Depending upon the size, compute the lo and hi bounds.
11218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011225 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011230test_array [0] = 0
11231
11232 ;
11233 return 0;
11234}
11235_ACEOF
11236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237if { (ac_try="$ac_compile"
11238case "(($ac_try" in
11239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11240 *) ac_try_echo=$ac_try;;
11241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011245 grep -v '^ *+' conftest.er1 >conftest.err
11246 rm -f conftest.er1
11247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249 (exit $ac_status); } && {
11250 test -z "$ac_c_werror_flag" ||
11251 test ! -s conftest.err
11252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_lo=0 ac_mid=0
11254 while :; do
11255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* confdefs.h. */
11257_ACEOF
11258cat confdefs.h >>conftest.$ac_ext
11259cat >>conftest.$ac_ext <<_ACEOF
11260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011262 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011267test_array [0] = 0
11268
11269 ;
11270 return 0;
11271}
11272_ACEOF
11273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274if { (ac_try="$ac_compile"
11275case "(($ac_try" in
11276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11277 *) ac_try_echo=$ac_try;;
11278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011282 grep -v '^ *+' conftest.er1 >conftest.err
11283 rm -f conftest.er1
11284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286 (exit $ac_status); } && {
11287 test -z "$ac_c_werror_flag" ||
11288 test ! -s conftest.err
11289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_hi=$ac_mid; break
11291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011293sed 's/^/| /' conftest.$ac_ext >&5
11294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 ac_lo=`expr $ac_mid + 1`
11296 if test $ac_lo -le $ac_mid; then
11297 ac_lo= ac_hi=
11298 break
11299 fi
11300 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302
11303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 done
11305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011315$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011316 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317int
11318main ()
11319{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011321test_array [0] = 0
11322
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328if { (ac_try="$ac_compile"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ac_hi=-1 ac_mid=-1
11345 while :; do
11346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011352$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011353 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011358test_array [0] = 0
11359
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365if { (ac_try="$ac_compile"
11366case "(($ac_try" in
11367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11368 *) ac_try_echo=$ac_try;;
11369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011373 grep -v '^ *+' conftest.er1 >conftest.err
11374 rm -f conftest.er1
11375 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377 (exit $ac_status); } && {
11378 test -z "$ac_c_werror_flag" ||
11379 test ! -s conftest.err
11380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_lo=$ac_mid; break
11382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011384sed 's/^/| /' conftest.$ac_ext >&5
11385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 ac_hi=`expr '(' $ac_mid ')' - 1`
11387 if test $ac_mid -le $ac_hi; then
11388 ac_lo= ac_hi=
11389 break
11390 fi
11391 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393
11394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 done
11396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011398sed 's/^/| /' conftest.$ac_ext >&5
11399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405
11406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011407# Binary search between lo and hi bounds.
11408while test "x$ac_lo" != "x$ac_hi"; do
11409 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011417 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011418int
11419main ()
11420{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011422test_array [0] = 0
11423
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429if { (ac_try="$ac_compile"
11430case "(($ac_try" in
11431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11432 *) ac_try_echo=$ac_try;;
11433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011437 grep -v '^ *+' conftest.er1 >conftest.err
11438 rm -f conftest.er1
11439 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441 (exit $ac_status); } && {
11442 test -z "$ac_c_werror_flag" ||
11443 test ! -s conftest.err
11444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_hi=$ac_mid
11446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011448sed 's/^/| /' conftest.$ac_ext >&5
11449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452
11453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454done
11455case $ac_lo in
11456?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463 else
11464 ac_cv_sizeof_long_long=0
11465 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011466esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011475 typedef long long ac__type_sizeof_;
11476static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11477static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011482{
Martin v. Löwis11437992002-04-12 09:54:03 +000011483
11484 FILE *f = fopen ("conftest.val", "w");
11485 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011487 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011492 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 }
11494 else
11495 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
11503 ;
11504 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011505}
Martin v. Löwis11437992002-04-12 09:54:03 +000011506_ACEOF
11507rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508if { (ac_try="$ac_link"
11509case "(($ac_try" in
11510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11511 *) ac_try_echo=$ac_try;;
11512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 { (case "(($ac_try" in
11519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11520 *) ac_try_echo=$ac_try;;
11521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 (exit $ac_status); }; }; then
11527 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529 echo "$as_me: program exited with status $ac_status" >&5
11530echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011538See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011539 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 else
11541 ac_cv_sizeof_long_long=0
11542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011545fi
11546rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011548{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11549echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550
11551
11552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011555_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556
Michael W. Hudson54241132001-12-07 15:38:26 +000011557
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
11559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011560{ echo "$as_me:$LINENO: checking for long double support" >&5
11561echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011562have_long_double=no
11563cat >conftest.$ac_ext <<_ACEOF
11564/* confdefs.h. */
11565_ACEOF
11566cat confdefs.h >>conftest.$ac_ext
11567cat >>conftest.$ac_ext <<_ACEOF
11568/* end confdefs.h. */
11569
11570int
11571main ()
11572{
11573long double x; x = (long double)0;
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
11579if { (ac_try="$ac_compile"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011585 (eval "$ac_compile") 2>conftest.er1
11586 ac_status=$?
11587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011591 (exit $ac_status); } && {
11592 test -z "$ac_c_werror_flag" ||
11593 test ! -s conftest.err
11594 } && test -s conftest.$ac_objext; then
11595
11596
11597cat >>confdefs.h <<\_ACEOF
11598#define HAVE_LONG_DOUBLE 1
11599_ACEOF
11600
11601 have_long_double=yes
11602
11603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
11607
11608fi
11609
11610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011611{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11612echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011613if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011614{ echo "$as_me:$LINENO: checking for long double" >&5
11615echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11616if test "${ac_cv_type_long_double+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
11619 cat >conftest.$ac_ext <<_ACEOF
11620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
11625$ac_includes_default
11626typedef long double ac__type_new_;
11627int
11628main ()
11629{
11630if ((ac__type_new_ *) 0)
11631 return 0;
11632if (sizeof (ac__type_new_))
11633 return 0;
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
11639if { (ac_try="$ac_compile"
11640case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
11644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11645 (eval "$ac_compile") 2>conftest.er1
11646 ac_status=$?
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } && {
11652 test -z "$ac_c_werror_flag" ||
11653 test ! -s conftest.err
11654 } && test -s conftest.$ac_objext; then
11655 ac_cv_type_long_double=yes
11656else
11657 echo "$as_me: failed program was:" >&5
11658sed 's/^/| /' conftest.$ac_ext >&5
11659
11660 ac_cv_type_long_double=no
11661fi
11662
11663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11664fi
11665{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11666echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11667
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011668# The cast to long int works around a bug in the HP C Compiler
11669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11671# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011672{ echo "$as_me:$LINENO: checking size of long double" >&5
11673echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011675 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676else
11677 if test "$cross_compiling" = yes; then
11678 # Depending upon the size, compute the lo and hi bounds.
11679cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011686 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687int
11688main ()
11689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011691test_array [0] = 0
11692
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext
11698if { (ac_try="$ac_compile"
11699case "(($ac_try" in
11700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11701 *) ac_try_echo=$ac_try;;
11702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011704 (eval "$ac_compile") 2>conftest.er1
11705 ac_status=$?
11706 grep -v '^ *+' conftest.er1 >conftest.err
11707 rm -f conftest.er1
11708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011710 (exit $ac_status); } && {
11711 test -z "$ac_c_werror_flag" ||
11712 test ! -s conftest.err
11713 } && test -s conftest.$ac_objext; then
11714 ac_lo=0 ac_mid=0
11715 while :; do
11716 cat >conftest.$ac_ext <<_ACEOF
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
11722$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011723 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011724int
11725main ()
11726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011728test_array [0] = 0
11729
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734rm -f conftest.$ac_objext
11735if { (ac_try="$ac_compile"
11736case "(($ac_try" in
11737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11738 *) ac_try_echo=$ac_try;;
11739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741 (eval "$ac_compile") 2>conftest.er1
11742 ac_status=$?
11743 grep -v '^ *+' conftest.er1 >conftest.err
11744 rm -f conftest.er1
11745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011747 (exit $ac_status); } && {
11748 test -z "$ac_c_werror_flag" ||
11749 test ! -s conftest.err
11750 } && test -s conftest.$ac_objext; then
11751 ac_hi=$ac_mid; break
11752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011753 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754sed 's/^/| /' conftest.$ac_ext >&5
11755
11756 ac_lo=`expr $ac_mid + 1`
11757 if test $ac_lo -le $ac_mid; then
11758 ac_lo= ac_hi=
11759 break
11760 fi
11761 ac_mid=`expr 2 '*' $ac_mid + 1`
11762fi
11763
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765 done
11766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011767 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768sed 's/^/| /' conftest.$ac_ext >&5
11769
11770 cat >conftest.$ac_ext <<_ACEOF
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
11776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011777 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011778int
11779main ()
11780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011782test_array [0] = 0
11783
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext
11789if { (ac_try="$ac_compile"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795 (eval "$ac_compile") 2>conftest.er1
11796 ac_status=$?
11797 grep -v '^ *+' conftest.er1 >conftest.err
11798 rm -f conftest.er1
11799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011801 (exit $ac_status); } && {
11802 test -z "$ac_c_werror_flag" ||
11803 test ! -s conftest.err
11804 } && test -s conftest.$ac_objext; then
11805 ac_hi=-1 ac_mid=-1
11806 while :; do
11807 cat >conftest.$ac_ext <<_ACEOF
11808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
11813$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011814 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011815int
11816main ()
11817{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011819test_array [0] = 0
11820
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825rm -f conftest.$ac_objext
11826if { (ac_try="$ac_compile"
11827case "(($ac_try" in
11828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11829 *) ac_try_echo=$ac_try;;
11830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011832 (eval "$ac_compile") 2>conftest.er1
11833 ac_status=$?
11834 grep -v '^ *+' conftest.er1 >conftest.err
11835 rm -f conftest.er1
11836 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011838 (exit $ac_status); } && {
11839 test -z "$ac_c_werror_flag" ||
11840 test ! -s conftest.err
11841 } && test -s conftest.$ac_objext; then
11842 ac_lo=$ac_mid; break
11843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011844 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845sed 's/^/| /' conftest.$ac_ext >&5
11846
11847 ac_hi=`expr '(' $ac_mid ')' - 1`
11848 if test $ac_mid -le $ac_hi; then
11849 ac_lo= ac_hi=
11850 break
11851 fi
11852 ac_mid=`expr 2 '*' $ac_mid`
11853fi
11854
11855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11856 done
11857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011858 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859sed 's/^/| /' conftest.$ac_ext >&5
11860
11861 ac_lo= ac_hi=
11862fi
11863
11864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11865fi
11866
11867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868# Binary search between lo and hi bounds.
11869while test "x$ac_lo" != "x$ac_hi"; do
11870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11871 cat >conftest.$ac_ext <<_ACEOF
11872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
11877$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011878 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879int
11880main ()
11881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011883test_array [0] = 0
11884
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889rm -f conftest.$ac_objext
11890if { (ac_try="$ac_compile"
11891case "(($ac_try" in
11892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893 *) ac_try_echo=$ac_try;;
11894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011896 (eval "$ac_compile") 2>conftest.er1
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011902 (exit $ac_status); } && {
11903 test -z "$ac_c_werror_flag" ||
11904 test ! -s conftest.err
11905 } && test -s conftest.$ac_objext; then
11906 ac_hi=$ac_mid
11907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011908 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011909sed 's/^/| /' conftest.$ac_ext >&5
11910
11911 ac_lo=`expr '(' $ac_mid ')' + 1`
11912fi
11913
11914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915done
11916case $ac_lo in
11917?*) ac_cv_sizeof_long_double=$ac_lo;;
11918'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011923 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011924 else
11925 ac_cv_sizeof_long_double=0
11926 fi ;;
11927esac
11928else
11929 cat >conftest.$ac_ext <<_ACEOF
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
11935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011936 typedef long double ac__type_sizeof_;
11937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011939#include <stdio.h>
11940#include <stdlib.h>
11941int
11942main ()
11943{
11944
11945 FILE *f = fopen ("conftest.val", "w");
11946 if (! f)
11947 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011949 {
11950 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011953 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 }
11955 else
11956 {
11957 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 }
11962 return ferror (f) || fclose (f) != 0;
11963
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest$ac_exeext
11969if { (ac_try="$ac_link"
11970case "(($ac_try" in
11971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11972 *) ac_try_echo=$ac_try;;
11973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975 (eval "$ac_link") 2>&5
11976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11979 { (case "(($ac_try" in
11980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11981 *) ac_try_echo=$ac_try;;
11982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984 (eval "$ac_try") 2>&5
11985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987 (exit $ac_status); }; }; then
11988 ac_cv_sizeof_long_double=`cat conftest.val`
11989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990 echo "$as_me: program exited with status $ac_status" >&5
11991echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994( exit $ac_status )
11995if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012000 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001 else
12002 ac_cv_sizeof_long_double=0
12003 fi
12004fi
12005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12006fi
12007rm -f conftest.val
12008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12010echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012011
12012
12013
12014cat >>confdefs.h <<_ACEOF
12015#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12016_ACEOF
12017
12018
12019fi
12020
12021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12023echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012024have_c99_bool=no
12025cat >conftest.$ac_ext <<_ACEOF
12026/* confdefs.h. */
12027_ACEOF
12028cat confdefs.h >>conftest.$ac_ext
12029cat >>conftest.$ac_ext <<_ACEOF
12030/* end confdefs.h. */
12031
12032int
12033main ()
12034{
12035_Bool x; x = (_Bool)0;
12036 ;
12037 return 0;
12038}
12039_ACEOF
12040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041if { (ac_try="$ac_compile"
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012048 ac_status=$?
12049 grep -v '^ *+' conftest.er1 >conftest.err
12050 rm -f conftest.er1
12051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053 (exit $ac_status); } && {
12054 test -z "$ac_c_werror_flag" ||
12055 test ! -s conftest.err
12056 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012057
12058
12059cat >>confdefs.h <<\_ACEOF
12060#define HAVE_C99_BOOL 1
12061_ACEOF
12062
12063 have_c99_bool=yes
12064
12065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012066 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
Thomas Woutersb2137042007-02-01 18:02:27 +000012070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071
12072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012073{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12074echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012075if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076{ echo "$as_me:$LINENO: checking for _Bool" >&5
12077echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12078if test "${ac_cv_type__Bool+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
12080else
12081 cat >conftest.$ac_ext <<_ACEOF
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
12087$ac_includes_default
12088typedef _Bool ac__type_new_;
12089int
12090main ()
12091{
12092if ((ac__type_new_ *) 0)
12093 return 0;
12094if (sizeof (ac__type_new_))
12095 return 0;
12096 ;
12097 return 0;
12098}
12099_ACEOF
12100rm -f conftest.$ac_objext
12101if { (ac_try="$ac_compile"
12102case "(($ac_try" in
12103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12104 *) ac_try_echo=$ac_try;;
12105esac
12106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12107 (eval "$ac_compile") 2>conftest.er1
12108 ac_status=$?
12109 grep -v '^ *+' conftest.er1 >conftest.err
12110 rm -f conftest.er1
12111 cat conftest.err >&5
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); } && {
12114 test -z "$ac_c_werror_flag" ||
12115 test ! -s conftest.err
12116 } && test -s conftest.$ac_objext; then
12117 ac_cv_type__Bool=yes
12118else
12119 echo "$as_me: failed program was:" >&5
12120sed 's/^/| /' conftest.$ac_ext >&5
12121
12122 ac_cv_type__Bool=no
12123fi
12124
12125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12126fi
12127{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12128echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130# The cast to long int works around a bug in the HP C Compiler
12131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12133# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012134{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12135echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012136if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012137 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012138else
12139 if test "$cross_compiling" = yes; then
12140 # Depending upon the size, compute the lo and hi bounds.
12141cat >conftest.$ac_ext <<_ACEOF
12142/* confdefs.h. */
12143_ACEOF
12144cat confdefs.h >>conftest.$ac_ext
12145cat >>conftest.$ac_ext <<_ACEOF
12146/* end confdefs.h. */
12147$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012148 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012149int
12150main ()
12151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012153test_array [0] = 0
12154
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160if { (ac_try="$ac_compile"
12161case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012167 ac_status=$?
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012176 ac_lo=0 ac_mid=0
12177 while :; do
12178 cat >conftest.$ac_ext <<_ACEOF
12179/* confdefs.h. */
12180_ACEOF
12181cat confdefs.h >>conftest.$ac_ext
12182cat >>conftest.$ac_ext <<_ACEOF
12183/* end confdefs.h. */
12184$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012185 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012186int
12187main ()
12188{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012190test_array [0] = 0
12191
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197if { (ac_try="$ac_compile"
12198case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012204 ac_status=$?
12205 grep -v '^ *+' conftest.er1 >conftest.err
12206 rm -f conftest.er1
12207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209 (exit $ac_status); } && {
12210 test -z "$ac_c_werror_flag" ||
12211 test ! -s conftest.err
12212 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012213 ac_hi=$ac_mid; break
12214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012215 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012216sed 's/^/| /' conftest.$ac_ext >&5
12217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 ac_lo=`expr $ac_mid + 1`
12219 if test $ac_lo -le $ac_mid; then
12220 ac_lo= ac_hi=
12221 break
12222 fi
12223 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225
12226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012227 done
12228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012229 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012230sed 's/^/| /' conftest.$ac_ext >&5
12231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012233/* confdefs.h. */
12234_ACEOF
12235cat confdefs.h >>conftest.$ac_ext
12236cat >>conftest.$ac_ext <<_ACEOF
12237/* end confdefs.h. */
12238$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012239 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012240int
12241main ()
12242{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012244test_array [0] = 0
12245
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251if { (ac_try="$ac_compile"
12252case "(($ac_try" in
12253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12254 *) ac_try_echo=$ac_try;;
12255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012258 ac_status=$?
12259 grep -v '^ *+' conftest.er1 >conftest.err
12260 rm -f conftest.er1
12261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263 (exit $ac_status); } && {
12264 test -z "$ac_c_werror_flag" ||
12265 test ! -s conftest.err
12266 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012267 ac_hi=-1 ac_mid=-1
12268 while :; do
12269 cat >conftest.$ac_ext <<_ACEOF
12270/* confdefs.h. */
12271_ACEOF
12272cat confdefs.h >>conftest.$ac_ext
12273cat >>conftest.$ac_ext <<_ACEOF
12274/* end confdefs.h. */
12275$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012276 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012277int
12278main ()
12279{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012281test_array [0] = 0
12282
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288if { (ac_try="$ac_compile"
12289case "(($ac_try" in
12290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12291 *) ac_try_echo=$ac_try;;
12292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012295 ac_status=$?
12296 grep -v '^ *+' conftest.er1 >conftest.err
12297 rm -f conftest.er1
12298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300 (exit $ac_status); } && {
12301 test -z "$ac_c_werror_flag" ||
12302 test ! -s conftest.err
12303 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012304 ac_lo=$ac_mid; break
12305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012306 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012307sed 's/^/| /' conftest.$ac_ext >&5
12308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 ac_hi=`expr '(' $ac_mid ')' - 1`
12310 if test $ac_mid -le $ac_hi; then
12311 ac_lo= ac_hi=
12312 break
12313 fi
12314 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316
12317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012318 done
12319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012320 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012321sed 's/^/| /' conftest.$ac_ext >&5
12322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012330# Binary search between lo and hi bounds.
12331while test "x$ac_lo" != "x$ac_hi"; do
12332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12333 cat >conftest.$ac_ext <<_ACEOF
12334/* confdefs.h. */
12335_ACEOF
12336cat confdefs.h >>conftest.$ac_ext
12337cat >>conftest.$ac_ext <<_ACEOF
12338/* end confdefs.h. */
12339$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012340 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012341int
12342main ()
12343{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012344static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012345test_array [0] = 0
12346
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352if { (ac_try="$ac_compile"
12353case "(($ac_try" in
12354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12355 *) ac_try_echo=$ac_try;;
12356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012359 ac_status=$?
12360 grep -v '^ *+' conftest.er1 >conftest.err
12361 rm -f conftest.er1
12362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364 (exit $ac_status); } && {
12365 test -z "$ac_c_werror_flag" ||
12366 test ! -s conftest.err
12367 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012368 ac_hi=$ac_mid
12369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012370 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012371sed 's/^/| /' conftest.$ac_ext >&5
12372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375
12376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012377done
12378case $ac_lo in
12379?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012382See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012384See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012385 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386 else
12387 ac_cv_sizeof__Bool=0
12388 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012389esac
12390else
12391 cat >conftest.$ac_ext <<_ACEOF
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
12397$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012398 typedef _Bool ac__type_sizeof_;
12399static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12400static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012401#include <stdio.h>
12402#include <stdlib.h>
12403int
12404main ()
12405{
12406
12407 FILE *f = fopen ("conftest.val", "w");
12408 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012410 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012415 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012416 }
12417 else
12418 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012423 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012425
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431if { (ac_try="$ac_link"
12432case "(($ac_try" in
12433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12434 *) ac_try_echo=$ac_try;;
12435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 { (case "(($ac_try" in
12442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12443 *) ac_try_echo=$ac_try;;
12444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 (exit $ac_status); }; }; then
12450 ac_cv_sizeof__Bool=`cat conftest.val`
12451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452 echo "$as_me: program exited with status $ac_status" >&5
12453echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454sed 's/^/| /' conftest.$ac_ext >&5
12455
12456( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 else
12464 ac_cv_sizeof__Bool=0
12465 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012468fi
12469rm -f conftest.val
12470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012471{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12472echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473
12474
12475
Thomas Woutersb2137042007-02-01 18:02:27 +000012476cat >>confdefs.h <<_ACEOF
12477#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12478_ACEOF
12479
12480
12481fi
12482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012483{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12484echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012485if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012486 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012487else
12488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* confdefs.h. */
12490_ACEOF
12491cat confdefs.h >>conftest.$ac_ext
12492cat >>conftest.$ac_ext <<_ACEOF
12493/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012494#ifdef HAVE_STDINT_H
12495 #include <stdint.h>
12496 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012498typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012502if ((ac__type_new_ *) 0)
12503 return 0;
12504if (sizeof (ac__type_new_))
12505 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511if { (ac_try="$ac_compile"
12512case "(($ac_try" in
12513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12514 *) ac_try_echo=$ac_try;;
12515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012519 grep -v '^ *+' conftest.er1 >conftest.err
12520 rm -f conftest.er1
12521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 (exit $ac_status); } && {
12524 test -z "$ac_c_werror_flag" ||
12525 test ! -s conftest.err
12526 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012530sed 's/^/| /' conftest.$ac_ext >&5
12531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012532 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534
12535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12538echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12539if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012540
12541cat >>confdefs.h <<_ACEOF
12542#define HAVE_UINTPTR_T 1
12543_ACEOF
12544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012545{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12546echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12547if test "${ac_cv_type_uintptr_t+set}" = set; then
12548 echo $ECHO_N "(cached) $ECHO_C" >&6
12549else
12550 cat >conftest.$ac_ext <<_ACEOF
12551/* confdefs.h. */
12552_ACEOF
12553cat confdefs.h >>conftest.$ac_ext
12554cat >>conftest.$ac_ext <<_ACEOF
12555/* end confdefs.h. */
12556$ac_includes_default
12557typedef uintptr_t ac__type_new_;
12558int
12559main ()
12560{
12561if ((ac__type_new_ *) 0)
12562 return 0;
12563if (sizeof (ac__type_new_))
12564 return 0;
12565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
12570if { (ac_try="$ac_compile"
12571case "(($ac_try" in
12572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12573 *) ac_try_echo=$ac_try;;
12574esac
12575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12576 (eval "$ac_compile") 2>conftest.er1
12577 ac_status=$?
12578 grep -v '^ *+' conftest.er1 >conftest.err
12579 rm -f conftest.er1
12580 cat conftest.err >&5
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); } && {
12583 test -z "$ac_c_werror_flag" ||
12584 test ! -s conftest.err
12585 } && test -s conftest.$ac_objext; then
12586 ac_cv_type_uintptr_t=yes
12587else
12588 echo "$as_me: failed program was:" >&5
12589sed 's/^/| /' conftest.$ac_ext >&5
12590
12591 ac_cv_type_uintptr_t=no
12592fi
12593
12594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12595fi
12596{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12597echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599# The cast to long int works around a bug in the HP C Compiler
12600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12602# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012603{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12604echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012605if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 if test "$cross_compiling" = yes; then
12609 # Depending upon the size, compute the lo and hi bounds.
12610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012617 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012622test_array [0] = 0
12623
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629if { (ac_try="$ac_compile"
12630case "(($ac_try" in
12631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12632 *) ac_try_echo=$ac_try;;
12633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012637 grep -v '^ *+' conftest.er1 >conftest.err
12638 rm -f conftest.er1
12639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 (exit $ac_status); } && {
12642 test -z "$ac_c_werror_flag" ||
12643 test ! -s conftest.err
12644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_lo=0 ac_mid=0
12646 while :; do
12647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012654 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012659test_array [0] = 0
12660
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666if { (ac_try="$ac_compile"
12667case "(($ac_try" in
12668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12669 *) ac_try_echo=$ac_try;;
12670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012674 grep -v '^ *+' conftest.er1 >conftest.err
12675 rm -f conftest.er1
12676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678 (exit $ac_status); } && {
12679 test -z "$ac_c_werror_flag" ||
12680 test ! -s conftest.err
12681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_hi=$ac_mid; break
12683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012685sed 's/^/| /' conftest.$ac_ext >&5
12686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 ac_lo=`expr $ac_mid + 1`
12688 if test $ac_lo -le $ac_mid; then
12689 ac_lo= ac_hi=
12690 break
12691 fi
12692 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694
12695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 done
12697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012699sed 's/^/| /' conftest.$ac_ext >&5
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012708 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012713test_array [0] = 0
12714
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720if { (ac_try="$ac_compile"
12721case "(($ac_try" in
12722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12723 *) ac_try_echo=$ac_try;;
12724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012728 grep -v '^ *+' conftest.er1 >conftest.err
12729 rm -f conftest.er1
12730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732 (exit $ac_status); } && {
12733 test -z "$ac_c_werror_flag" ||
12734 test ! -s conftest.err
12735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ac_hi=-1 ac_mid=-1
12737 while :; do
12738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* confdefs.h. */
12740_ACEOF
12741cat confdefs.h >>conftest.$ac_ext
12742cat >>conftest.$ac_ext <<_ACEOF
12743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012745 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012750test_array [0] = 0
12751
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757if { (ac_try="$ac_compile"
12758case "(($ac_try" in
12759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12760 *) ac_try_echo=$ac_try;;
12761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012765 grep -v '^ *+' conftest.er1 >conftest.err
12766 rm -f conftest.er1
12767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769 (exit $ac_status); } && {
12770 test -z "$ac_c_werror_flag" ||
12771 test ! -s conftest.err
12772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_lo=$ac_mid; break
12774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012776sed 's/^/| /' conftest.$ac_ext >&5
12777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 ac_hi=`expr '(' $ac_mid ')' - 1`
12779 if test $ac_mid -le $ac_hi; then
12780 ac_lo= ac_hi=
12781 break
12782 fi
12783 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785
12786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 done
12788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012790sed 's/^/| /' conftest.$ac_ext >&5
12791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797
12798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012799# Binary search between lo and hi bounds.
12800while test "x$ac_lo" != "x$ac_hi"; do
12801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* confdefs.h. */
12804_ACEOF
12805cat confdefs.h >>conftest.$ac_ext
12806cat >>conftest.$ac_ext <<_ACEOF
12807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012809 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012814test_array [0] = 0
12815
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821if { (ac_try="$ac_compile"
12822case "(($ac_try" in
12823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12824 *) ac_try_echo=$ac_try;;
12825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012829 grep -v '^ *+' conftest.er1 >conftest.err
12830 rm -f conftest.er1
12831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833 (exit $ac_status); } && {
12834 test -z "$ac_c_werror_flag" ||
12835 test ! -s conftest.err
12836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_hi=$ac_mid
12838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012840sed 's/^/| /' conftest.$ac_ext >&5
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846done
12847case $ac_lo in
12848?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012854 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855 else
12856 ac_cv_sizeof_uintptr_t=0
12857 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012858esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* confdefs.h. */
12862_ACEOF
12863cat confdefs.h >>conftest.$ac_ext
12864cat >>conftest.$ac_ext <<_ACEOF
12865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012867 typedef uintptr_t ac__type_sizeof_;
12868static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12869static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872int
12873main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012874{
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
12876 FILE *f = fopen ("conftest.val", "w");
12877 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012879 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012884 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 }
12886 else
12887 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
12895 ;
12896 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012897}
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
12899rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900if { (ac_try="$ac_link"
12901case "(($ac_try" in
12902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12903 *) ac_try_echo=$ac_try;;
12904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 { (case "(($ac_try" in
12911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12912 *) ac_try_echo=$ac_try;;
12913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 (exit $ac_status); }; }; then
12919 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921 echo "$as_me: program exited with status $ac_status" >&5
12922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012923sed 's/^/| /' conftest.$ac_ext >&5
12924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012928See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012930See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012931 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 else
12933 ac_cv_sizeof_uintptr_t=0
12934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012937fi
12938rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012940{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12941echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942
12943
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012947_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948
Michael W. Hudson54241132001-12-07 15:38:26 +000012949
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
12951
Thomas Wouters89f507f2006-12-13 04:49:30 +000012952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953{ echo "$as_me:$LINENO: checking for off_t" >&5
12954echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12955if test "${ac_cv_type_off_t+set}" = set; then
12956 echo $ECHO_N "(cached) $ECHO_C" >&6
12957else
12958 cat >conftest.$ac_ext <<_ACEOF
12959/* confdefs.h. */
12960_ACEOF
12961cat confdefs.h >>conftest.$ac_ext
12962cat >>conftest.$ac_ext <<_ACEOF
12963/* end confdefs.h. */
12964
12965#ifdef HAVE_SYS_TYPES_H
12966#include <sys/types.h>
12967#endif
12968
12969
12970typedef off_t ac__type_new_;
12971int
12972main ()
12973{
12974if ((ac__type_new_ *) 0)
12975 return 0;
12976if (sizeof (ac__type_new_))
12977 return 0;
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
12983if { (ac_try="$ac_compile"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
12988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12989 (eval "$ac_compile") 2>conftest.er1
12990 ac_status=$?
12991 grep -v '^ *+' conftest.er1 >conftest.err
12992 rm -f conftest.er1
12993 cat conftest.err >&5
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } && {
12996 test -z "$ac_c_werror_flag" ||
12997 test ! -s conftest.err
12998 } && test -s conftest.$ac_objext; then
12999 ac_cv_type_off_t=yes
13000else
13001 echo "$as_me: failed program was:" >&5
13002sed 's/^/| /' conftest.$ac_ext >&5
13003
13004 ac_cv_type_off_t=no
13005fi
13006
13007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13008fi
13009{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13010echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012# The cast to long int works around a bug in the HP C Compiler
13013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13015# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013016{ echo "$as_me:$LINENO: checking size of off_t" >&5
13017echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013019 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013020else
13021 if test "$cross_compiling" = yes; then
13022 # Depending upon the size, compute the lo and hi bounds.
13023cat >conftest.$ac_ext <<_ACEOF
13024/* confdefs.h. */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h. */
13029
13030#ifdef HAVE_SYS_TYPES_H
13031#include <sys/types.h>
13032#endif
13033
13034
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013035 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036int
13037main ()
13038{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013040test_array [0] = 0
13041
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046rm -f conftest.$ac_objext
13047if { (ac_try="$ac_compile"
13048case "(($ac_try" in
13049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13050 *) ac_try_echo=$ac_try;;
13051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013053 (eval "$ac_compile") 2>conftest.er1
13054 ac_status=$?
13055 grep -v '^ *+' conftest.er1 >conftest.err
13056 rm -f conftest.er1
13057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013059 (exit $ac_status); } && {
13060 test -z "$ac_c_werror_flag" ||
13061 test ! -s conftest.err
13062 } && test -s conftest.$ac_objext; then
13063 ac_lo=0 ac_mid=0
13064 while :; do
13065 cat >conftest.$ac_ext <<_ACEOF
13066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
13071
13072#ifdef HAVE_SYS_TYPES_H
13073#include <sys/types.h>
13074#endif
13075
13076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013077 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078int
13079main ()
13080{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013081static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013082test_array [0] = 0
13083
13084 ;
13085 return 0;
13086}
13087_ACEOF
13088rm -f conftest.$ac_objext
13089if { (ac_try="$ac_compile"
13090case "(($ac_try" in
13091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13092 *) ac_try_echo=$ac_try;;
13093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013095 (eval "$ac_compile") 2>conftest.er1
13096 ac_status=$?
13097 grep -v '^ *+' conftest.er1 >conftest.err
13098 rm -f conftest.er1
13099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101 (exit $ac_status); } && {
13102 test -z "$ac_c_werror_flag" ||
13103 test ! -s conftest.err
13104 } && test -s conftest.$ac_objext; then
13105 ac_hi=$ac_mid; break
13106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013107 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108sed 's/^/| /' conftest.$ac_ext >&5
13109
13110 ac_lo=`expr $ac_mid + 1`
13111 if test $ac_lo -le $ac_mid; then
13112 ac_lo= ac_hi=
13113 break
13114 fi
13115 ac_mid=`expr 2 '*' $ac_mid + 1`
13116fi
13117
13118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13119 done
13120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122sed 's/^/| /' conftest.$ac_ext >&5
13123
13124 cat >conftest.$ac_ext <<_ACEOF
13125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
13130
13131#ifdef HAVE_SYS_TYPES_H
13132#include <sys/types.h>
13133#endif
13134
13135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137int
13138main ()
13139{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141test_array [0] = 0
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147rm -f conftest.$ac_objext
13148if { (ac_try="$ac_compile"
13149case "(($ac_try" in
13150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13151 *) ac_try_echo=$ac_try;;
13152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013154 (eval "$ac_compile") 2>conftest.er1
13155 ac_status=$?
13156 grep -v '^ *+' conftest.er1 >conftest.err
13157 rm -f conftest.er1
13158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160 (exit $ac_status); } && {
13161 test -z "$ac_c_werror_flag" ||
13162 test ! -s conftest.err
13163 } && test -s conftest.$ac_objext; then
13164 ac_hi=-1 ac_mid=-1
13165 while :; do
13166 cat >conftest.$ac_ext <<_ACEOF
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
13172
13173#ifdef HAVE_SYS_TYPES_H
13174#include <sys/types.h>
13175#endif
13176
13177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179int
13180main ()
13181{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183test_array [0] = 0
13184
13185 ;
13186 return 0;
13187}
13188_ACEOF
13189rm -f conftest.$ac_objext
13190if { (ac_try="$ac_compile"
13191case "(($ac_try" in
13192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13193 *) ac_try_echo=$ac_try;;
13194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196 (eval "$ac_compile") 2>conftest.er1
13197 ac_status=$?
13198 grep -v '^ *+' conftest.er1 >conftest.err
13199 rm -f conftest.er1
13200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 (exit $ac_status); } && {
13203 test -z "$ac_c_werror_flag" ||
13204 test ! -s conftest.err
13205 } && test -s conftest.$ac_objext; then
13206 ac_lo=$ac_mid; break
13207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013208 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209sed 's/^/| /' conftest.$ac_ext >&5
13210
13211 ac_hi=`expr '(' $ac_mid ')' - 1`
13212 if test $ac_mid -le $ac_hi; then
13213 ac_lo= ac_hi=
13214 break
13215 fi
13216 ac_mid=`expr 2 '*' $ac_mid`
13217fi
13218
13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220 done
13221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223sed 's/^/| /' conftest.$ac_ext >&5
13224
13225 ac_lo= ac_hi=
13226fi
13227
13228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229fi
13230
13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232# Binary search between lo and hi bounds.
13233while test "x$ac_lo" != "x$ac_hi"; do
13234 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13235 cat >conftest.$ac_ext <<_ACEOF
13236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
13241
13242#ifdef HAVE_SYS_TYPES_H
13243#include <sys/types.h>
13244#endif
13245
13246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248int
13249main ()
13250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252test_array [0] = 0
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 (eval "$ac_compile") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
13275 ac_hi=$ac_mid
13276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013277 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_lo=`expr '(' $ac_mid ')' + 1`
13281fi
13282
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284done
13285case $ac_lo in
13286?*) ac_cv_sizeof_off_t=$ac_lo;;
13287'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013290echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013292 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293 else
13294 ac_cv_sizeof_off_t=0
13295 fi ;;
13296esac
13297else
13298 cat >conftest.$ac_ext <<_ACEOF
13299/* confdefs.h. */
13300_ACEOF
13301cat confdefs.h >>conftest.$ac_ext
13302cat >>conftest.$ac_ext <<_ACEOF
13303/* end confdefs.h. */
13304
13305#ifdef HAVE_SYS_TYPES_H
13306#include <sys/types.h>
13307#endif
13308
13309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013310 typedef off_t ac__type_sizeof_;
13311static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13312static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013313#include <stdio.h>
13314#include <stdlib.h>
13315int
13316main ()
13317{
13318
13319 FILE *f = fopen ("conftest.val", "w");
13320 if (! f)
13321 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013322 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013323 {
13324 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013327 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328 }
13329 else
13330 {
13331 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013334 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013335 }
13336 return ferror (f) || fclose (f) != 0;
13337
13338 ;
13339 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013340}
Martin v. Löwis11437992002-04-12 09:54:03 +000013341_ACEOF
13342rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343if { (ac_try="$ac_link"
13344case "(($ac_try" in
13345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13346 *) ac_try_echo=$ac_try;;
13347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 { (case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013364 echo "$as_me: program exited with status $ac_status" >&5
13365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013366sed 's/^/| /' conftest.$ac_ext >&5
13367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013374 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013375 else
13376 ac_cv_sizeof_off_t=0
13377 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013380fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013383{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13384echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386
13387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013390_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13395echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013396if test "$have_long_long" = yes
13397then
13398if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013399 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401cat >>confdefs.h <<\_ACEOF
13402#define HAVE_LARGEFILE_SUPPORT 1
13403_ACEOF
13404
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013405 { echo "$as_me:$LINENO: result: yes" >&5
13406echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013408 { echo "$as_me:$LINENO: result: no" >&5
13409echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013410fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013411else
13412 { echo "$as_me:$LINENO: result: no" >&5
13413echo "${ECHO_T}no" >&6; }
13414fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013416{ echo "$as_me:$LINENO: checking for time_t" >&5
13417echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13418if test "${ac_cv_type_time_t+set}" = set; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
13420else
13421 cat >conftest.$ac_ext <<_ACEOF
13422/* confdefs.h. */
13423_ACEOF
13424cat confdefs.h >>conftest.$ac_ext
13425cat >>conftest.$ac_ext <<_ACEOF
13426/* end confdefs.h. */
13427
13428#ifdef HAVE_SYS_TYPES_H
13429#include <sys/types.h>
13430#endif
13431#ifdef HAVE_TIME_H
13432#include <time.h>
13433#endif
13434
13435
13436typedef time_t ac__type_new_;
13437int
13438main ()
13439{
13440if ((ac__type_new_ *) 0)
13441 return 0;
13442if (sizeof (ac__type_new_))
13443 return 0;
13444 ;
13445 return 0;
13446}
13447_ACEOF
13448rm -f conftest.$ac_objext
13449if { (ac_try="$ac_compile"
13450case "(($ac_try" in
13451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13452 *) ac_try_echo=$ac_try;;
13453esac
13454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13455 (eval "$ac_compile") 2>conftest.er1
13456 ac_status=$?
13457 grep -v '^ *+' conftest.er1 >conftest.err
13458 rm -f conftest.er1
13459 cat conftest.err >&5
13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); } && {
13462 test -z "$ac_c_werror_flag" ||
13463 test ! -s conftest.err
13464 } && test -s conftest.$ac_objext; then
13465 ac_cv_type_time_t=yes
13466else
13467 echo "$as_me: failed program was:" >&5
13468sed 's/^/| /' conftest.$ac_ext >&5
13469
13470 ac_cv_type_time_t=no
13471fi
13472
13473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13474fi
13475{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13476echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478# The cast to long int works around a bug in the HP C Compiler
13479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13481# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013482{ echo "$as_me:$LINENO: checking size of time_t" >&5
13483echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013484if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013486else
13487 if test "$cross_compiling" = yes; then
13488 # Depending upon the size, compute the lo and hi bounds.
13489cat >conftest.$ac_ext <<_ACEOF
13490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
13495
13496#ifdef HAVE_SYS_TYPES_H
13497#include <sys/types.h>
13498#endif
13499#ifdef HAVE_TIME_H
13500#include <time.h>
13501#endif
13502
13503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013504 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013505int
13506main ()
13507{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013509test_array [0] = 0
13510
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext
13516if { (ac_try="$ac_compile"
13517case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 (eval "$ac_compile") 2>conftest.er1
13523 ac_status=$?
13524 grep -v '^ *+' conftest.er1 >conftest.err
13525 rm -f conftest.er1
13526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013528 (exit $ac_status); } && {
13529 test -z "$ac_c_werror_flag" ||
13530 test ! -s conftest.err
13531 } && test -s conftest.$ac_objext; then
13532 ac_lo=0 ac_mid=0
13533 while :; do
13534 cat >conftest.$ac_ext <<_ACEOF
13535/* confdefs.h. */
13536_ACEOF
13537cat confdefs.h >>conftest.$ac_ext
13538cat >>conftest.$ac_ext <<_ACEOF
13539/* end confdefs.h. */
13540
13541#ifdef HAVE_SYS_TYPES_H
13542#include <sys/types.h>
13543#endif
13544#ifdef HAVE_TIME_H
13545#include <time.h>
13546#endif
13547
13548
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013549 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013550int
13551main ()
13552{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013554test_array [0] = 0
13555
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560rm -f conftest.$ac_objext
13561if { (ac_try="$ac_compile"
13562case "(($ac_try" in
13563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13564 *) ac_try_echo=$ac_try;;
13565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 (eval "$ac_compile") 2>conftest.er1
13568 ac_status=$?
13569 grep -v '^ *+' conftest.er1 >conftest.err
13570 rm -f conftest.er1
13571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013573 (exit $ac_status); } && {
13574 test -z "$ac_c_werror_flag" ||
13575 test ! -s conftest.err
13576 } && test -s conftest.$ac_objext; then
13577 ac_hi=$ac_mid; break
13578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013579 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580sed 's/^/| /' conftest.$ac_ext >&5
13581
13582 ac_lo=`expr $ac_mid + 1`
13583 if test $ac_lo -le $ac_mid; then
13584 ac_lo= ac_hi=
13585 break
13586 fi
13587 ac_mid=`expr 2 '*' $ac_mid + 1`
13588fi
13589
13590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591 done
13592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013593 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013594sed 's/^/| /' conftest.$ac_ext >&5
13595
13596 cat >conftest.$ac_ext <<_ACEOF
13597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
13602
13603#ifdef HAVE_SYS_TYPES_H
13604#include <sys/types.h>
13605#endif
13606#ifdef HAVE_TIME_H
13607#include <time.h>
13608#endif
13609
13610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013611 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013612int
13613main ()
13614{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013615static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013616test_array [0] = 0
13617
13618 ;
13619 return 0;
13620}
13621_ACEOF
13622rm -f conftest.$ac_objext
13623if { (ac_try="$ac_compile"
13624case "(($ac_try" in
13625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13626 *) ac_try_echo=$ac_try;;
13627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629 (eval "$ac_compile") 2>conftest.er1
13630 ac_status=$?
13631 grep -v '^ *+' conftest.er1 >conftest.err
13632 rm -f conftest.er1
13633 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013635 (exit $ac_status); } && {
13636 test -z "$ac_c_werror_flag" ||
13637 test ! -s conftest.err
13638 } && test -s conftest.$ac_objext; then
13639 ac_hi=-1 ac_mid=-1
13640 while :; do
13641 cat >conftest.$ac_ext <<_ACEOF
13642/* confdefs.h. */
13643_ACEOF
13644cat confdefs.h >>conftest.$ac_ext
13645cat >>conftest.$ac_ext <<_ACEOF
13646/* end confdefs.h. */
13647
13648#ifdef HAVE_SYS_TYPES_H
13649#include <sys/types.h>
13650#endif
13651#ifdef HAVE_TIME_H
13652#include <time.h>
13653#endif
13654
13655
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013656 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657int
13658main ()
13659{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661test_array [0] = 0
13662
13663 ;
13664 return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext
13668if { (ac_try="$ac_compile"
13669case "(($ac_try" in
13670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13671 *) ac_try_echo=$ac_try;;
13672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674 (eval "$ac_compile") 2>conftest.er1
13675 ac_status=$?
13676 grep -v '^ *+' conftest.er1 >conftest.err
13677 rm -f conftest.er1
13678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013680 (exit $ac_status); } && {
13681 test -z "$ac_c_werror_flag" ||
13682 test ! -s conftest.err
13683 } && test -s conftest.$ac_objext; then
13684 ac_lo=$ac_mid; break
13685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013686 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687sed 's/^/| /' conftest.$ac_ext >&5
13688
13689 ac_hi=`expr '(' $ac_mid ')' - 1`
13690 if test $ac_mid -le $ac_hi; then
13691 ac_lo= ac_hi=
13692 break
13693 fi
13694 ac_mid=`expr 2 '*' $ac_mid`
13695fi
13696
13697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13698 done
13699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013700 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701sed 's/^/| /' conftest.$ac_ext >&5
13702
13703 ac_lo= ac_hi=
13704fi
13705
13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13707fi
13708
13709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710# Binary search between lo and hi bounds.
13711while test "x$ac_lo" != "x$ac_hi"; do
13712 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13713 cat >conftest.$ac_ext <<_ACEOF
13714/* confdefs.h. */
13715_ACEOF
13716cat confdefs.h >>conftest.$ac_ext
13717cat >>conftest.$ac_ext <<_ACEOF
13718/* end confdefs.h. */
13719
13720#ifdef HAVE_SYS_TYPES_H
13721#include <sys/types.h>
13722#endif
13723#ifdef HAVE_TIME_H
13724#include <time.h>
13725#endif
13726
13727
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013728 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729int
13730main ()
13731{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013733test_array [0] = 0
13734
13735 ;
13736 return 0;
13737}
13738_ACEOF
13739rm -f conftest.$ac_objext
13740if { (ac_try="$ac_compile"
13741case "(($ac_try" in
13742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13743 *) ac_try_echo=$ac_try;;
13744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746 (eval "$ac_compile") 2>conftest.er1
13747 ac_status=$?
13748 grep -v '^ *+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752 (exit $ac_status); } && {
13753 test -z "$ac_c_werror_flag" ||
13754 test ! -s conftest.err
13755 } && test -s conftest.$ac_objext; then
13756 ac_hi=$ac_mid
13757else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013758 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013759sed 's/^/| /' conftest.$ac_ext >&5
13760
13761 ac_lo=`expr '(' $ac_mid ')' + 1`
13762fi
13763
13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13765done
13766case $ac_lo in
13767?*) ac_cv_sizeof_time_t=$ac_lo;;
13768'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013771echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013772See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013773 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013774 else
13775 ac_cv_sizeof_time_t=0
13776 fi ;;
13777esac
13778else
13779 cat >conftest.$ac_ext <<_ACEOF
13780/* confdefs.h. */
13781_ACEOF
13782cat confdefs.h >>conftest.$ac_ext
13783cat >>conftest.$ac_ext <<_ACEOF
13784/* end confdefs.h. */
13785
13786#ifdef HAVE_SYS_TYPES_H
13787#include <sys/types.h>
13788#endif
13789#ifdef HAVE_TIME_H
13790#include <time.h>
13791#endif
13792
13793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013794 typedef time_t ac__type_sizeof_;
13795static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13796static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013797#include <stdio.h>
13798#include <stdlib.h>
13799int
13800main ()
13801{
13802
13803 FILE *f = fopen ("conftest.val", "w");
13804 if (! f)
13805 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013806 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807 {
13808 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013809 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013810 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013811 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013812 }
13813 else
13814 {
13815 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013818 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013819 }
13820 return ferror (f) || fclose (f) != 0;
13821
13822 ;
13823 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013824}
Martin v. Löwis11437992002-04-12 09:54:03 +000013825_ACEOF
13826rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827if { (ac_try="$ac_link"
13828case "(($ac_try" in
13829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13830 *) ac_try_echo=$ac_try;;
13831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 { (case "(($ac_try" in
13838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13839 *) ac_try_echo=$ac_try;;
13840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 echo "$as_me: program exited with status $ac_status" >&5
13849echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013850sed 's/^/| /' conftest.$ac_ext >&5
13851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013854 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013855See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013856echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013858 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859 else
13860 ac_cv_sizeof_time_t=0
13861 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013864fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013867{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13868echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013870
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013873#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013874_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013875
Michael W. Hudson54241132001-12-07 15:38:26 +000013876
13877
Trent Mick635f6fb2000-08-23 21:33:05 +000013878# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013879ac_save_cc="$CC"
13880if test "$ac_cv_kpthread" = "yes"
13881then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013882elif test "$ac_cv_kthread" = "yes"
13883then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013884elif test "$ac_cv_pthread" = "yes"
13885then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013886fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013888{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13889echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013890have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892/* confdefs.h. */
13893_ACEOF
13894cat confdefs.h >>conftest.$ac_ext
13895cat >>conftest.$ac_ext <<_ACEOF
13896/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013897#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013898int
13899main ()
13900{
Guido van Rossum12580492000-09-24 16:47:19 +000013901pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ;
13903 return 0;
13904}
13905_ACEOF
13906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907if { (ac_try="$ac_compile"
13908case "(($ac_try" in
13909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13910 *) ac_try_echo=$ac_try;;
13911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013915 grep -v '^ *+' conftest.er1 >conftest.err
13916 rm -f conftest.er1
13917 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 (exit $ac_status); } && {
13920 test -z "$ac_c_werror_flag" ||
13921 test ! -s conftest.err
13922 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013923 have_pthread_t=yes
13924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013926sed 's/^/| /' conftest.$ac_ext >&5
13927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928
Trent Mick635f6fb2000-08-23 21:33:05 +000013929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930
13931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013932{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13933echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013934if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013935 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13936echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13937if test "${ac_cv_type_pthread_t+set}" = set; then
13938 echo $ECHO_N "(cached) $ECHO_C" >&6
13939else
13940 cat >conftest.$ac_ext <<_ACEOF
13941/* confdefs.h. */
13942_ACEOF
13943cat confdefs.h >>conftest.$ac_ext
13944cat >>conftest.$ac_ext <<_ACEOF
13945/* end confdefs.h. */
13946
13947#ifdef HAVE_PTHREAD_H
13948#include <pthread.h>
13949#endif
13950
13951
13952typedef pthread_t ac__type_new_;
13953int
13954main ()
13955{
13956if ((ac__type_new_ *) 0)
13957 return 0;
13958if (sizeof (ac__type_new_))
13959 return 0;
13960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext
13965if { (ac_try="$ac_compile"
13966case "(($ac_try" in
13967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13968 *) ac_try_echo=$ac_try;;
13969esac
13970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13971 (eval "$ac_compile") 2>conftest.er1
13972 ac_status=$?
13973 grep -v '^ *+' conftest.er1 >conftest.err
13974 rm -f conftest.er1
13975 cat conftest.err >&5
13976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977 (exit $ac_status); } && {
13978 test -z "$ac_c_werror_flag" ||
13979 test ! -s conftest.err
13980 } && test -s conftest.$ac_objext; then
13981 ac_cv_type_pthread_t=yes
13982else
13983 echo "$as_me: failed program was:" >&5
13984sed 's/^/| /' conftest.$ac_ext >&5
13985
13986 ac_cv_type_pthread_t=no
13987fi
13988
13989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13990fi
13991{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13992echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13993
13994# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13997# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013998{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13999echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014000if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014001 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014002else
14003 if test "$cross_compiling" = yes; then
14004 # Depending upon the size, compute the lo and hi bounds.
14005cat >conftest.$ac_ext <<_ACEOF
14006/* confdefs.h. */
14007_ACEOF
14008cat confdefs.h >>conftest.$ac_ext
14009cat >>conftest.$ac_ext <<_ACEOF
14010/* end confdefs.h. */
14011
14012#ifdef HAVE_PTHREAD_H
14013#include <pthread.h>
14014#endif
14015
14016
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014017 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014018int
14019main ()
14020{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014022test_array [0] = 0
14023
14024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext
14029if { (ac_try="$ac_compile"
14030case "(($ac_try" in
14031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14032 *) ac_try_echo=$ac_try;;
14033esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 (eval "$ac_compile") 2>conftest.er1
14036 ac_status=$?
14037 grep -v '^ *+' conftest.er1 >conftest.err
14038 rm -f conftest.er1
14039 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014041 (exit $ac_status); } && {
14042 test -z "$ac_c_werror_flag" ||
14043 test ! -s conftest.err
14044 } && test -s conftest.$ac_objext; then
14045 ac_lo=0 ac_mid=0
14046 while :; do
14047 cat >conftest.$ac_ext <<_ACEOF
14048/* confdefs.h. */
14049_ACEOF
14050cat confdefs.h >>conftest.$ac_ext
14051cat >>conftest.$ac_ext <<_ACEOF
14052/* end confdefs.h. */
14053
14054#ifdef HAVE_PTHREAD_H
14055#include <pthread.h>
14056#endif
14057
14058
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014059 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014060int
14061main ()
14062{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014064test_array [0] = 0
14065
14066 ;
14067 return 0;
14068}
14069_ACEOF
14070rm -f conftest.$ac_objext
14071if { (ac_try="$ac_compile"
14072case "(($ac_try" in
14073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14074 *) ac_try_echo=$ac_try;;
14075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 (eval "$ac_compile") 2>conftest.er1
14078 ac_status=$?
14079 grep -v '^ *+' conftest.er1 >conftest.err
14080 rm -f conftest.er1
14081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083 (exit $ac_status); } && {
14084 test -z "$ac_c_werror_flag" ||
14085 test ! -s conftest.err
14086 } && test -s conftest.$ac_objext; then
14087 ac_hi=$ac_mid; break
14088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014089 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090sed 's/^/| /' conftest.$ac_ext >&5
14091
14092 ac_lo=`expr $ac_mid + 1`
14093 if test $ac_lo -le $ac_mid; then
14094 ac_lo= ac_hi=
14095 break
14096 fi
14097 ac_mid=`expr 2 '*' $ac_mid + 1`
14098fi
14099
14100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14101 done
14102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104sed 's/^/| /' conftest.$ac_ext >&5
14105
14106 cat >conftest.$ac_ext <<_ACEOF
14107/* confdefs.h. */
14108_ACEOF
14109cat confdefs.h >>conftest.$ac_ext
14110cat >>conftest.$ac_ext <<_ACEOF
14111/* end confdefs.h. */
14112
14113#ifdef HAVE_PTHREAD_H
14114#include <pthread.h>
14115#endif
14116
14117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014118 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014119int
14120main ()
14121{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014123test_array [0] = 0
14124
14125 ;
14126 return 0;
14127}
14128_ACEOF
14129rm -f conftest.$ac_objext
14130if { (ac_try="$ac_compile"
14131case "(($ac_try" in
14132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14133 *) ac_try_echo=$ac_try;;
14134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 (eval "$ac_compile") 2>conftest.er1
14137 ac_status=$?
14138 grep -v '^ *+' conftest.er1 >conftest.err
14139 rm -f conftest.er1
14140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014142 (exit $ac_status); } && {
14143 test -z "$ac_c_werror_flag" ||
14144 test ! -s conftest.err
14145 } && test -s conftest.$ac_objext; then
14146 ac_hi=-1 ac_mid=-1
14147 while :; do
14148 cat >conftest.$ac_ext <<_ACEOF
14149/* confdefs.h. */
14150_ACEOF
14151cat confdefs.h >>conftest.$ac_ext
14152cat >>conftest.$ac_ext <<_ACEOF
14153/* end confdefs.h. */
14154
14155#ifdef HAVE_PTHREAD_H
14156#include <pthread.h>
14157#endif
14158
14159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014160 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014161int
14162main ()
14163{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014164static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014165test_array [0] = 0
14166
14167 ;
14168 return 0;
14169}
14170_ACEOF
14171rm -f conftest.$ac_objext
14172if { (ac_try="$ac_compile"
14173case "(($ac_try" in
14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14175 *) ac_try_echo=$ac_try;;
14176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 (eval "$ac_compile") 2>conftest.er1
14179 ac_status=$?
14180 grep -v '^ *+' conftest.er1 >conftest.err
14181 rm -f conftest.er1
14182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 (exit $ac_status); } && {
14185 test -z "$ac_c_werror_flag" ||
14186 test ! -s conftest.err
14187 } && test -s conftest.$ac_objext; then
14188 ac_lo=$ac_mid; break
14189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014190 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014191sed 's/^/| /' conftest.$ac_ext >&5
14192
14193 ac_hi=`expr '(' $ac_mid ')' - 1`
14194 if test $ac_mid -le $ac_hi; then
14195 ac_lo= ac_hi=
14196 break
14197 fi
14198 ac_mid=`expr 2 '*' $ac_mid`
14199fi
14200
14201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202 done
14203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014204 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014205sed 's/^/| /' conftest.$ac_ext >&5
14206
14207 ac_lo= ac_hi=
14208fi
14209
14210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211fi
14212
14213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214# Binary search between lo and hi bounds.
14215while test "x$ac_lo" != "x$ac_hi"; do
14216 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14217 cat >conftest.$ac_ext <<_ACEOF
14218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
14223
14224#ifdef HAVE_PTHREAD_H
14225#include <pthread.h>
14226#endif
14227
14228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014229 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230int
14231main ()
14232{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234test_array [0] = 0
14235
14236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext
14241if { (ac_try="$ac_compile"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (eval "$ac_compile") 2>conftest.er1
14248 ac_status=$?
14249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253 (exit $ac_status); } && {
14254 test -z "$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 } && test -s conftest.$ac_objext; then
14257 ac_hi=$ac_mid
14258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014259 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
14262 ac_lo=`expr '(' $ac_mid ')' + 1`
14263fi
14264
14265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14266done
14267case $ac_lo in
14268?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14269'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014270 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014271See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014272echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014274 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275 else
14276 ac_cv_sizeof_pthread_t=0
14277 fi ;;
14278esac
14279else
14280 cat >conftest.$ac_ext <<_ACEOF
14281/* confdefs.h. */
14282_ACEOF
14283cat confdefs.h >>conftest.$ac_ext
14284cat >>conftest.$ac_ext <<_ACEOF
14285/* end confdefs.h. */
14286
14287#ifdef HAVE_PTHREAD_H
14288#include <pthread.h>
14289#endif
14290
14291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014292 typedef pthread_t ac__type_sizeof_;
14293static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14294static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014295#include <stdio.h>
14296#include <stdlib.h>
14297int
14298main ()
14299{
14300
14301 FILE *f = fopen ("conftest.val", "w");
14302 if (! f)
14303 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014304 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014305 {
14306 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014309 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310 }
14311 else
14312 {
14313 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014314 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014315 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014316 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014317 }
14318 return ferror (f) || fclose (f) != 0;
14319
14320 ;
14321 return 0;
14322}
Martin v. Löwis11437992002-04-12 09:54:03 +000014323_ACEOF
14324rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325if { (ac_try="$ac_link"
14326case "(($ac_try" in
14327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14328 *) ac_try_echo=$ac_try;;
14329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 { (case "(($ac_try" in
14336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14337 *) ac_try_echo=$ac_try;;
14338esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 echo "$as_me: program exited with status $ac_status" >&5
14347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014348sed 's/^/| /' conftest.$ac_ext >&5
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014352 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014356 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357 else
14358 ac_cv_sizeof_pthread_t=0
14359 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000014362fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014364fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014365{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14366echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368
14369
Martin v. Löwis11437992002-04-12 09:54:03 +000014370cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014371#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014372_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374
Trent Mick635f6fb2000-08-23 21:33:05 +000014375fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014376CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014377
Michael W. Hudson54241132001-12-07 15:38:26 +000014378
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014379case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014380 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014381 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14382 ;;
14383 Darwin/*)
14384 OTHER_LIBTOOL_OPT=""
14385 ;;
14386esac
14387
14388
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014389ARCH_RUN_32BIT=""
14390
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014391case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014392 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014393 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14394 if test "${enable_universalsdk}"; then
14395 :
14396 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014397 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014398 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014399 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014400 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014401 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014402 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14403 if test ${gcc_version} '<' 4.0
14404 then
14405 LIBTOOL_CRUFT="-lcc_dynamic"
14406 else
14407 LIBTOOL_CRUFT=""
14408 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014409 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014410 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014411else
14412 cat >conftest.$ac_ext <<_ACEOF
14413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014418
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014419 #include <unistd.h>
14420 int main(int argc, char*argv[])
14421 {
14422 if (sizeof(long) == 4) {
14423 return 0;
14424 } else {
14425 return 1;
14426 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014427 }
14428
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014429_ACEOF
14430rm -f conftest$ac_exeext
14431if { (ac_try="$ac_link"
14432case "(($ac_try" in
14433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14434 *) ac_try_echo=$ac_try;;
14435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014437 (eval "$ac_link") 2>&5
14438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14441 { (case "(($ac_try" in
14442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14443 *) ac_try_echo=$ac_try;;
14444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014446 (eval "$ac_try") 2>&5
14447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014449 (exit $ac_status); }; }; then
14450 ac_osx_32bit=yes
14451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452 echo "$as_me: program exited with status $ac_status" >&5
14453echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014454sed 's/^/| /' conftest.$ac_ext >&5
14455
14456( exit $ac_status )
14457ac_osx_32bit=no
14458fi
14459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14460fi
14461
14462
14463
14464 if test "${ac_osx_32bit}" = "yes"; then
14465 case `arch` in
14466 i386)
14467 MACOSX_DEFAULT_ARCH="i386"
14468 ;;
14469 ppc)
14470 MACOSX_DEFAULT_ARCH="ppc"
14471 ;;
14472 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014473 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14474echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014475 { (exit 1); exit 1; }; }
14476 ;;
14477 esac
14478 else
14479 case `arch` in
14480 i386)
14481 MACOSX_DEFAULT_ARCH="x86_64"
14482 ;;
14483 ppc)
14484 MACOSX_DEFAULT_ARCH="ppc64"
14485 ;;
14486 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014487 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14488echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014489 { (exit 1); exit 1; }; }
14490 ;;
14491 esac
14492
14493 #ARCH_RUN_32BIT="true"
14494 fi
14495
14496 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014499esac
14500
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014501{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14502echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014503if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014504then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014505 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014507 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509cat >>confdefs.h <<\_ACEOF
14510#define WITH_NEXT_FRAMEWORK 1
14511_ACEOF
14512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014513 { echo "$as_me:$LINENO: result: yes" >&5
14514echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014515 if test $enable_shared = "yes"
14516 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14518echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000014519 { (exit 1); exit 1; }; }
14520 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014522 { echo "$as_me:$LINENO: result: no" >&5
14523echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524fi
14525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014526{ echo "$as_me:$LINENO: checking for dyld" >&5
14527echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014528case $ac_sys_system/$ac_sys_release in
14529 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<\_ACEOF
14532#define WITH_DYLD 1
14533_ACEOF
14534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014535 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14536echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014537 ;;
14538 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014539 { echo "$as_me:$LINENO: result: no" >&5
14540echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014541 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014542esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545
Michael W. Hudson54241132001-12-07 15:38:26 +000014546
14547
14548
14549
Guido van Rossum0a516c91994-09-12 10:58:40 +000014550# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014551# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014552{ echo "$as_me:$LINENO: checking SO" >&5
14553echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014554if test -z "$SO"
14555then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014556 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014557 hp*|HP*)
14558 case `uname -m` in
14559 ia64) SO=.so;;
14560 *) SO=.sl;;
14561 esac
14562 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014563 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014564 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014566else
14567 # this might also be a termcap variable, see #610332
14568 echo
14569 echo '====================================================================='
14570 echo '+ +'
14571 echo '+ WARNING: You have set SO in your environment. +'
14572 echo '+ Do you really mean to change the extension for shared libraries? +'
14573 echo '+ Continuing in 10 seconds to let you to ponder. +'
14574 echo '+ +'
14575 echo '====================================================================='
14576 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014577fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014578{ echo "$as_me:$LINENO: result: $SO" >&5
14579echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014580
Georg Brandlb1441c72009-01-03 22:33:39 +000014581
Thomas Wouters477c8d52006-05-27 19:21:47 +000014582cat >>confdefs.h <<_ACEOF
14583#define SHLIB_EXT "$SO"
14584_ACEOF
14585
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014587# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588# (Shared libraries in this instance are shared modules to be loaded into
14589# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014590{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14591echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014592if test -z "$LDSHARED"
14593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014595 AIX*)
14596 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014597 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014598 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014599 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014600 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014602 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014603 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014604 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014605 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014606 hp*|HP*)
14607 if test "$GCC" = "yes"
14608 then LDSHARED='$(CC) -shared'
14609 else LDSHARED='ld -b';
14610 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014611 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014612 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014613 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14614 if test "$enable_framework" ; then
14615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014618 else
14619 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014620 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014621 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014622 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014623 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14624 if test "$enable_framework" ; then
14625 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014626 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14627 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014628 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014629 # No framework, use the Python app as bundle-loader
14630 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014631 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 Darwin/*)
14634 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14635 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014636
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014637 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014638 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014640 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014641 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014642 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14643 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 else
14645 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14646 if test "$enable_framework" ; then
14647 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014648 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14649 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014650 else
14651 # No framework, use the Python app as bundle-loader
14652 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14653 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14654 fi
14655 fi
14656 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014657 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014658 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014659 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014661 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014662 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014663 else
14664 LDSHARED="ld -Bshareable ${LDFLAGS}"
14665 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014666 OpenBSD*)
14667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14668 then
14669 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14670 else
14671 case `uname -r` in
14672 [01].* | 2.[0-7] | 2.[0-7].*)
14673 LDSHARED="ld -Bshareable ${LDFLAGS}"
14674 ;;
14675 *)
14676 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14677 ;;
14678 esac
14679 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014680 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014681 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014682 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014683 then LDSHARED='$(CC) -shared'
14684 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014685 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014686 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014687 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688 *) LDSHARED="ld";;
14689 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014691{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14692echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014693BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014695# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014696{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14697echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698if test -z "$CCSHARED"
14699then
Guido van Rossum07397971997-04-29 21:49:50 +000014700 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014701 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014702 then CCSHARED="-fPIC";
14703 elif test `uname -p` = sparc;
14704 then CCSHARED="-xcode=pic32";
14705 else CCSHARED="-Kpic";
14706 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014707 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014708 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014709 else CCSHARED="+z";
14710 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014711 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014712 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014713 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014714 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014715 if test "$GCC" = "yes"
14716 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014717 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014718 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014719 SCO_SV*)
14720 if test "$GCC" = "yes"
14721 then CCSHARED="-fPIC"
14722 else CCSHARED="-Kpic -belf"
14723 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014724 IRIX*/6*) case $CC in
14725 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014726 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014727 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014730{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14731echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014732# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014733# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014734{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14735echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014736if test -z "$LINKFORSHARED"
14737then
Guido van Rossum07397971997-04-29 21:49:50 +000014738 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014739 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014740 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014741 LINKFORSHARED="-Wl,-E -Wl,+s";;
14742# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014743 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014744 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014745 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014747 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014748 if test "$enable_framework"
14749 then
Jack Jansenda49e192005-01-07 13:08:22 +000014750 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014751 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014752 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014753 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014754 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014755 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014756 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014757 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14758 then
14759 LINKFORSHARED="-Wl,--export-dynamic"
14760 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014761 SunOS/5*) case $CC in
14762 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014763 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014764 then
14765 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014766 fi;;
14767 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014768 CYGWIN*)
14769 if test $enable_shared = "no"
14770 then
14771 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14772 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014773 QNX*)
14774 # -Wl,-E causes the symbols to be added to the dynamic
14775 # symbol table so that they can be found when a module
14776 # is loaded. -N 2048K causes the stack size to be set
14777 # to 2048 kilobytes so that the stack doesn't overflow
14778 # when running test_compile.py.
14779 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014782{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14783echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014784
Michael W. Hudson54241132001-12-07 15:38:26 +000014785
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014787{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14788echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014789if test ! "$LIBRARY" = "$LDLIBRARY"
14790then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014791 case $ac_sys_system in
14792 CYGWIN*)
14793 # Cygwin needs CCSHARED when building extension DLLs
14794 # but not when building the interpreter DLL.
14795 CFLAGSFORSHARED='';;
14796 *)
14797 CFLAGSFORSHARED='$(CCSHARED)'
14798 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014799fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014800{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14801echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014802
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014803# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14804# library (with --enable-shared).
14805# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014806# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14807# if it is not required, since it creates a dependency of the shared library
14808# to LIBS. This, in turn, means that applications linking the shared libpython
14809# don't need to link LIBS explicitly. The default should be only changed
14810# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14813echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014815 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014816 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14819echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014820
14821
Guido van Rossum627b2d71993-12-24 10:39:16 +000014822# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014824{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14825echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014826if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014828else
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014830LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014832/* confdefs.h. */
14833_ACEOF
14834cat confdefs.h >>conftest.$ac_ext
14835cat >>conftest.$ac_ext <<_ACEOF
14836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838/* Override any GCC internal prototype to avoid an error.
14839 Use char because int might match the return type of a GCC
14840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014841#ifdef __cplusplus
14842extern "C"
14843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014844char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014845int
14846main ()
14847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
14853rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854if { (ac_try="$ac_link"
14855case "(($ac_try" in
14856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14857 *) ac_try_echo=$ac_try;;
14858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014862 grep -v '^ *+' conftest.er1 >conftest.err
14863 rm -f conftest.er1
14864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 (exit $ac_status); } && {
14867 test -z "$ac_c_werror_flag" ||
14868 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869 } && test -s conftest$ac_exeext &&
14870 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014874sed 's/^/| /' conftest.$ac_ext >&5
14875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878
14879rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014881LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014883{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14884echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14885if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 cat >>confdefs.h <<_ACEOF
14887#define HAVE_LIBDL 1
14888_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014890 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014892fi
14893 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014895{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14896echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014897if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014901LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014903/* confdefs.h. */
14904_ACEOF
14905cat confdefs.h >>conftest.$ac_ext
14906cat >>conftest.$ac_ext <<_ACEOF
14907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909/* Override any GCC internal prototype to avoid an error.
14910 Use char because int might match the return type of a GCC
14911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014912#ifdef __cplusplus
14913extern "C"
14914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014915char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916int
14917main ()
14918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ;
14921 return 0;
14922}
14923_ACEOF
14924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925if { (ac_try="$ac_link"
14926case "(($ac_try" in
14927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14928 *) ac_try_echo=$ac_try;;
14929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014933 grep -v '^ *+' conftest.er1 >conftest.err
14934 rm -f conftest.er1
14935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 (exit $ac_status); } && {
14938 test -z "$ac_c_werror_flag" ||
14939 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940 } && test -s conftest$ac_exeext &&
14941 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014945sed 's/^/| /' conftest.$ac_ext >&5
14946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949
14950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014952LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014954{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14955echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14956if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 cat >>confdefs.h <<_ACEOF
14958#define HAVE_LIBDLD 1
14959_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014961 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963fi
14964 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014965
Georg Brandlb1441c72009-01-03 22:33:39 +000014966# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014967if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014968 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14969echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014970if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014972else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014973 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014975/* confdefs.h. */
14976_ACEOF
14977cat confdefs.h >>conftest.$ac_ext
14978cat >>conftest.$ac_ext <<_ACEOF
14979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981/* Override any GCC internal prototype to avoid an error.
14982 Use char because int might match the return type of a GCC
14983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014984#ifdef __cplusplus
14985extern "C"
14986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014987char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014988int
14989main ()
14990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ;
14993 return 0;
14994}
14995_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996for ac_lib in '' pthread rt posix4; do
14997 if test -z "$ac_lib"; then
14998 ac_res="none required"
14999 else
15000 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 fi
15003 rm -f conftest.$ac_objext conftest$ac_exeext
15004if { (ac_try="$ac_link"
15005case "(($ac_try" in
15006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15007 *) ac_try_echo=$ac_try;;
15008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015011 ac_status=$?
15012 grep -v '^ *+' conftest.er1 >conftest.err
15013 rm -f conftest.er1
15014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 (exit $ac_status); } && {
15017 test -z "$ac_c_werror_flag" ||
15018 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015019 } && test -s conftest$ac_exeext &&
15020 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015024sed 's/^/| /' conftest.$ac_ext >&5
15025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
Thomas Wouters477c8d52006-05-27 19:21:47 +000015027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028
15029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15030 conftest$ac_exeext
15031 if test "${ac_cv_search_sem_init+set}" = set; then
15032 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034done
15035if test "${ac_cv_search_sem_init+set}" = set; then
15036 :
15037else
15038 ac_cv_search_sem_init=no
15039fi
15040rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015041LIBS=$ac_func_search_save_LIBS
15042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015043{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15044echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045ac_res=$ac_cv_search_sem_init
15046if test "$ac_res" != no; then
15047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015048
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015049fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015050 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015051 # posix4 on Solaris 2.6
15052 # pthread (first!) on Linux
15053fi
15054
Martin v. Löwis19d17342003-06-14 21:03:05 +000015055# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015056{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15057echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015058if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015060else
15061 ac_check_lib_save_LIBS=$LIBS
15062LIBS="-lintl $LIBS"
15063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070/* Override any GCC internal prototype to avoid an error.
15071 Use char because int might match the return type of a GCC
15072 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073#ifdef __cplusplus
15074extern "C"
15075#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015077int
15078main ()
15079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015081 ;
15082 return 0;
15083}
15084_ACEOF
15085rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086if { (ac_try="$ac_link"
15087case "(($ac_try" in
15088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15089 *) ac_try_echo=$ac_try;;
15090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015094 grep -v '^ *+' conftest.er1 >conftest.err
15095 rm -f conftest.er1
15096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098 (exit $ac_status); } && {
15099 test -z "$ac_c_werror_flag" ||
15100 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015101 } && test -s conftest$ac_exeext &&
15102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015103 ac_cv_lib_intl_textdomain=yes
15104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015106sed 's/^/| /' conftest.$ac_ext >&5
15107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110
15111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015113LIBS=$ac_check_lib_save_LIBS
15114fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015115{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15116echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15117if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118
15119cat >>confdefs.h <<\_ACEOF
15120#define WITH_LIBINTL 1
15121_ACEOF
15122
Brett Cannonc6d936e2009-06-07 20:09:53 +000015123 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124fi
15125
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015126
15127# checks for system dependent C++ extensions support
15128case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015129 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15130echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015132/* confdefs.h. */
15133_ACEOF
15134cat confdefs.h >>conftest.$ac_ext
15135cat >>conftest.$ac_ext <<_ACEOF
15136/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015137#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015138int
15139main ()
15140{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015141loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ;
15143 return 0;
15144}
15145_ACEOF
15146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147if { (ac_try="$ac_link"
15148case "(($ac_try" in
15149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15150 *) ac_try_echo=$ac_try;;
15151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155 grep -v '^ *+' conftest.er1 >conftest.err
15156 rm -f conftest.er1
15157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159 (exit $ac_status); } && {
15160 test -z "$ac_c_werror_flag" ||
15161 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015162 } && test -s conftest$ac_exeext &&
15163 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015164
Martin v. Löwis11437992002-04-12 09:54:03 +000015165cat >>confdefs.h <<\_ACEOF
15166#define AIX_GENUINE_CPLUSPLUS 1
15167_ACEOF
15168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015169 { echo "$as_me:$LINENO: result: yes" >&5
15170echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015173sed 's/^/| /' conftest.$ac_ext >&5
15174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015175 { echo "$as_me:$LINENO: result: no" >&5
15176echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178
15179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015181 *) ;;
15182esac
15183
Guido van Rossum70c7f481998-03-26 18:44:10 +000015184# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015185{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15186echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015187if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015191LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015193/* confdefs.h. */
15194_ACEOF
15195cat confdefs.h >>conftest.$ac_ext
15196cat >>conftest.$ac_ext <<_ACEOF
15197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199/* Override any GCC internal prototype to avoid an error.
15200 Use char because int might match the return type of a GCC
15201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015202#ifdef __cplusplus
15203extern "C"
15204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015205char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015206int
15207main ()
15208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 ;
15211 return 0;
15212}
15213_ACEOF
15214rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215if { (ac_try="$ac_link"
15216case "(($ac_try" in
15217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15218 *) ac_try_echo=$ac_try;;
15219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015223 grep -v '^ *+' conftest.er1 >conftest.err
15224 rm -f conftest.er1
15225 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 (exit $ac_status); } && {
15228 test -z "$ac_c_werror_flag" ||
15229 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015230 } && test -s conftest$ac_exeext &&
15231 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015235sed 's/^/| /' conftest.$ac_ext >&5
15236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239
15240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015242LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015243fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15245echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15246if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015247 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015248fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015249 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015250{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15251echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015252if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015256LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015258/* confdefs.h. */
15259_ACEOF
15260cat confdefs.h >>conftest.$ac_ext
15261cat >>conftest.$ac_ext <<_ACEOF
15262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264/* Override any GCC internal prototype to avoid an error.
15265 Use char because int might match the return type of a GCC
15266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267#ifdef __cplusplus
15268extern "C"
15269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015270char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271int
15272main ()
15273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 ;
15276 return 0;
15277}
15278_ACEOF
15279rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280if { (ac_try="$ac_link"
15281case "(($ac_try" in
15282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15283 *) ac_try_echo=$ac_try;;
15284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015288 grep -v '^ *+' conftest.er1 >conftest.err
15289 rm -f conftest.er1
15290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 (exit $ac_status); } && {
15293 test -z "$ac_c_werror_flag" ||
15294 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 } && test -s conftest$ac_exeext &&
15296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015300sed 's/^/| /' conftest.$ac_ext >&5
15301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
15305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015307LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015309{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15310echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15311if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015312 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015313fi
15314 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15317echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015320if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322{ echo "$as_me:$LINENO: result: $withval" >&5
15323echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015324LIBS="$withval $LIBS"
15325
15326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015327 { echo "$as_me:$LINENO: result: no" >&5
15328echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329fi
15330
Guido van Rossum7f43da71994-08-01 12:15:30 +000015331
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015332# Check for use of the system expat library
15333{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15334echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15335
15336# Check whether --with-system_expat was given.
15337if test "${with_system_expat+set}" = set; then
15338 withval=$with_system_expat;
15339fi
15340
15341
15342{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15343echo "${ECHO_T}$with_system_expat" >&6; }
15344
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015345# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15347echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015350if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 withval=$with_system_ffi;
15352fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015353
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015354
Benjamin Petersond78735d2010-01-01 16:04:23 +000015355if test "$with_system_ffi" = "yes"; then
15356 if test -n "$ac_tool_prefix"; then
15357 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15358set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15359{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15361if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15362 echo $ECHO_N "(cached) $ECHO_C" >&6
15363else
15364 case $PKG_CONFIG in
15365 [\\/]* | ?:[\\/]*)
15366 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15367 ;;
15368 *)
15369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15370for as_dir in $PATH
15371do
15372 IFS=$as_save_IFS
15373 test -z "$as_dir" && as_dir=.
15374 for ac_exec_ext in '' $ac_executable_extensions; do
15375 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15376 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15377 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15378 break 2
15379 fi
15380done
15381done
15382IFS=$as_save_IFS
15383
15384 ;;
15385esac
15386fi
15387PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15388if test -n "$PKG_CONFIG"; then
15389 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15390echo "${ECHO_T}$PKG_CONFIG" >&6; }
15391else
15392 { echo "$as_me:$LINENO: result: no" >&5
15393echo "${ECHO_T}no" >&6; }
15394fi
15395
15396
15397fi
15398if test -z "$ac_cv_path_PKG_CONFIG"; then
15399 ac_pt_PKG_CONFIG=$PKG_CONFIG
15400 # Extract the first word of "pkg-config", so it can be a program name with args.
15401set dummy pkg-config; ac_word=$2
15402{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15404if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15405 echo $ECHO_N "(cached) $ECHO_C" >&6
15406else
15407 case $ac_pt_PKG_CONFIG in
15408 [\\/]* | ?:[\\/]*)
15409 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15410 ;;
15411 *)
15412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15413for as_dir in $PATH
15414do
15415 IFS=$as_save_IFS
15416 test -z "$as_dir" && as_dir=.
15417 for ac_exec_ext in '' $ac_executable_extensions; do
15418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15419 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15421 break 2
15422 fi
15423done
15424done
15425IFS=$as_save_IFS
15426
15427 ;;
15428esac
15429fi
15430ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15431if test -n "$ac_pt_PKG_CONFIG"; then
15432 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15433echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15434else
15435 { echo "$as_me:$LINENO: result: no" >&5
15436echo "${ECHO_T}no" >&6; }
15437fi
15438
15439 if test "x$ac_pt_PKG_CONFIG" = x; then
15440 PKG_CONFIG=""
15441 else
15442 case $cross_compiling:$ac_tool_warned in
15443yes:)
15444{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15445whose name does not start with the host triplet. If you think this
15446configuration is useful to you, please write to autoconf@gnu.org." >&5
15447echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15448whose name does not start with the host triplet. If you think this
15449configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15450ac_tool_warned=yes ;;
15451esac
15452 PKG_CONFIG=$ac_pt_PKG_CONFIG
15453 fi
15454else
15455 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15456fi
15457
15458 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15459else
15460 LIBFFI_INCLUDEDIR=""
15461fi
15462
15463
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015464{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15465echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015466
Matthias Klose55708cc2009-04-30 08:06:49 +000015467# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015468{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15469echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015470
15471# Check whether --with-dbmliborder was given.
15472if test "${with_dbmliborder+set}" = set; then
15473 withval=$with_dbmliborder;
15474if test x$with_dbmliborder = xyes
15475then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015476{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15477echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015478 { (exit 1); exit 1; }; }
15479else
15480 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15481 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15482 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015483 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15484echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015485 { (exit 1); exit 1; }; }
15486 fi
15487 done
15488fi
15489fi
15490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015491{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15492echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015493
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015494# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015495
15496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015497{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15498echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015501if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 withval=$with_signal_module;
15503fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015504
15505
15506if test -z "$with_signal_module"
15507then with_signal_module="yes"
15508fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015509{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15510echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015511
15512if test "${with_signal_module}" = "yes"; then
15513 USE_SIGNAL_MODULE=""
15514 SIGNAL_OBJS=""
15515else
15516 USE_SIGNAL_MODULE="#"
15517 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15518fi
15519
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015520# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015521
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015522USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015524{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15525echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Guido van Rossumec2f0731997-01-22 20:54:01 +000015527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015529if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531{ echo "$as_me:$LINENO: result: $withval" >&5
15532echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015533LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015534if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015535 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015536fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015538 { echo "$as_me:$LINENO: result: no" >&5
15539echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540fi
15541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
15543# Templates for things AC_DEFINEd more than once.
15544# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015545
15546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
15548
15549
15550
15551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15553echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015556if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 withval=$with_threads;
15558fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015559
15560
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015561# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015564if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 withval=$with_thread; with_threads=$with_thread
15566fi
15567
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015568
15569if test -z "$with_threads"
15570then with_threads="yes"
15571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015572{ echo "$as_me:$LINENO: result: $with_threads" >&5
15573echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015574
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015575
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015576if test "$with_threads" = "no"
15577then
15578 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015579elif test "$ac_cv_pthread_is_default" = yes
15580then
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015582#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015584
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015585 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015587#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015588_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015589
15590 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015592elif test "$ac_cv_kpthread" = "yes"
15593then
15594 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015595 if test "$ac_cv_cxx_thread" = "yes"; then
15596 CXX="$CXX -Kpthread"
15597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015599#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015600_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015602 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015603 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015604elif test "$ac_cv_kthread" = "yes"
15605then
15606 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015607 if test "$ac_cv_cxx_thread" = "yes"; then
15608 CXX="$CXX -Kthread"
15609 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015610 cat >>confdefs.h <<\_ACEOF
15611#define WITH_THREAD 1
15612_ACEOF
15613
15614 posix_threads=yes
15615 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015616elif test "$ac_cv_pthread" = "yes"
15617then
15618 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015619 if test "$ac_cv_cxx_thread" = "yes"; then
15620 CXX="$CXX -pthread"
15621 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015622 cat >>confdefs.h <<\_ACEOF
15623#define WITH_THREAD 1
15624_ACEOF
15625
15626 posix_threads=yes
15627 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015628else
15629 if test ! -z "$with_threads" -a -d "$with_threads"
15630 then LDFLAGS="$LDFLAGS -L$with_threads"
15631 fi
15632 if test ! -z "$withval" -a -d "$withval"
15633 then LDFLAGS="$LDFLAGS -L$withval"
15634 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015635
15636 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015637 # define _POSIX_THREADS in unistd.h. Some apparently don't
15638 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015639 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15640echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* confdefs.h. */
15643_ACEOF
15644cat confdefs.h >>conftest.$ac_ext
15645cat >>conftest.$ac_ext <<_ACEOF
15646/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015648#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015649#ifdef _POSIX_THREADS
15650yes
15651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
15653_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015655 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015656 unistd_defines_pthreads=yes
15657else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015658 unistd_defines_pthreads=no
15659fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015660rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015662 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15663echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015666#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015670 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15671echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015672if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015675{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15676echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015679{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15680echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015687$ac_includes_default
15688#include <cthreads.h>
15689_ACEOF
15690rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691if { (ac_try="$ac_compile"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
15706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 ac_header_compiler=yes
15708else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015710sed 's/^/| /' conftest.$ac_ext >&5
15711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714
15715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15717echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015718
15719# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015720{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15721echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* confdefs.h. */
15724_ACEOF
15725cat confdefs.h >>conftest.$ac_ext
15726cat >>conftest.$ac_ext <<_ACEOF
15727/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015728#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730if { (ac_try="$ac_cpp conftest.$ac_ext"
15731case "(($ac_try" in
15732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15733 *) ac_try_echo=$ac_try;;
15734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 rm -f conftest.er1
15740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 (exit $ac_status); } >/dev/null && {
15743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15744 test ! -s conftest.err
15745 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ac_header_preproc=yes
15747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015749sed 's/^/| /' conftest.$ac_ext >&5
15750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753
Martin v. Löwis11437992002-04-12 09:54:03 +000015754rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15756echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015757
15758# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15760 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15762echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15763 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15764echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015765 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015766 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15769echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15770 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15771echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15772 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15773echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15774 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15775echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15776 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15777echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15778 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15779echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015781## -------------------------------------- ##
15782## Report this to http://bugs.python.org/ ##
15783## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015784_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015786 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015787esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15789echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015790if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015792else
15793 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015795{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15796echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015797
15798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015799if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015805#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
15809cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015810#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015811_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015812
15813 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015814 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015815else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015818 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15819echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015820if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015822fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015823{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15824echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015825else
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15828echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015830/* confdefs.h. */
15831_ACEOF
15832cat confdefs.h >>conftest.$ac_ext
15833cat >>conftest.$ac_ext <<_ACEOF
15834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015835$ac_includes_default
15836#include <mach/cthreads.h>
15837_ACEOF
15838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839if { (ac_try="$ac_compile"
15840case "(($ac_try" in
15841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15842 *) ac_try_echo=$ac_try;;
15843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015847 grep -v '^ *+' conftest.er1 >conftest.err
15848 rm -f conftest.er1
15849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851 (exit $ac_status); } && {
15852 test -z "$ac_c_werror_flag" ||
15853 test ! -s conftest.err
15854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 ac_header_compiler=yes
15856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015858sed 's/^/| /' conftest.$ac_ext >&5
15859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862
15863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015864{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15865echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
15867# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015868{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15869echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015871/* confdefs.h. */
15872_ACEOF
15873cat confdefs.h >>conftest.$ac_ext
15874cat >>conftest.$ac_ext <<_ACEOF
15875/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015876#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878if { (ac_try="$ac_cpp conftest.$ac_ext"
15879case "(($ac_try" in
15880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15881 *) ac_try_echo=$ac_try;;
15882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015886 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 rm -f conftest.er1
15888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 (exit $ac_status); } >/dev/null && {
15891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15892 test ! -s conftest.err
15893 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 ac_header_preproc=yes
15895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015897sed 's/^/| /' conftest.$ac_ext >&5
15898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015903{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15904echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015905
15906# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15908 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15910echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15911 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15912echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015913 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015914 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015915 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015916 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15917echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15918 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15919echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15920 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15921echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15922 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15923echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15924 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15925echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15926 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15927echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015929## -------------------------------------- ##
15930## Report this to http://bugs.python.org/ ##
15931## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015932_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015934 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015936{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15937echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015938if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015939 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015940else
15941 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015942fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015943{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15944echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015945
15946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015947if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015949#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015951
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015953#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956
15957cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015958#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015960
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015961 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015962else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015963
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015964 # Just looking for pthread_create in libpthread is not enough:
15965 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15966 # So we really have to include pthread.h, and then link.
15967 _libs=$LIBS
15968 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015969 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15970echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015977#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015978
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015979void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015980int
15981main ()
15982{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015983
15984pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ;
15986 return 0;
15987}
15988_ACEOF
15989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990if { (ac_try="$ac_link"
15991case "(($ac_try" in
15992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15993 *) ac_try_echo=$ac_try;;
15994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015998 grep -v '^ *+' conftest.er1 >conftest.err
15999 rm -f conftest.er1
16000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002 (exit $ac_status); } && {
16003 test -z "$ac_c_werror_flag" ||
16004 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016005 } && test -s conftest$ac_exeext &&
16006 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016008 { echo "$as_me:$LINENO: result: yes" >&5
16009echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016011#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016012_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016013
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016014 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016015 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016018sed 's/^/| /' conftest.$ac_ext >&5
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016021 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016022 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16023echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016024if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016026else
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016028/* confdefs.h. */
16029_ACEOF
16030cat confdefs.h >>conftest.$ac_ext
16031cat >>conftest.$ac_ext <<_ACEOF
16032/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016033/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16034 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16035#define pthread_detach innocuous_pthread_detach
16036
Guido van Rossumad678af1998-10-02 14:42:15 +000016037/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016038 which can conflict with char pthread_detach (); below.
16039 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016040 <limits.h> exists even on freestanding compilers. */
16041
16042#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016043# include <limits.h>
16044#else
16045# include <assert.h>
16046#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016047
16048#undef pthread_detach
16049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050/* Override any GCC internal prototype to avoid an error.
16051 Use char because int might match the return type of a GCC
16052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016053#ifdef __cplusplus
16054extern "C"
16055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016056char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016057/* The GNU C library defines this for functions which it implements
16058 to always fail with ENOSYS. Some functions are actually named
16059 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016061choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016062#endif
16063
Skip Montanaro6dead952003-09-25 14:50:04 +000016064int
16065main ()
16066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016068 ;
16069 return 0;
16070}
16071_ACEOF
16072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073if { (ac_try="$ac_link"
16074case "(($ac_try" in
16075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16076 *) ac_try_echo=$ac_try;;
16077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016081 grep -v '^ *+' conftest.er1 >conftest.err
16082 rm -f conftest.er1
16083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085 (exit $ac_status); } && {
16086 test -z "$ac_c_werror_flag" ||
16087 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016088 } && test -s conftest$ac_exeext &&
16089 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016093sed 's/^/| /' conftest.$ac_ext >&5
16094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097
16098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016099 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016101{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16102echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16103if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016105#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016107
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016108 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016109 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016110else
Guido van Rossumad678af1998-10-02 14:42:15 +000016111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016112 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16113echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016114if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016116else
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016118LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016120/* confdefs.h. */
16121_ACEOF
16122cat confdefs.h >>conftest.$ac_ext
16123cat >>conftest.$ac_ext <<_ACEOF
16124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126/* Override any GCC internal prototype to avoid an error.
16127 Use char because int might match the return type of a GCC
16128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016129#ifdef __cplusplus
16130extern "C"
16131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016132char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016133int
16134main ()
16135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 ;
16138 return 0;
16139}
16140_ACEOF
16141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142if { (ac_try="$ac_link"
16143case "(($ac_try" in
16144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16145 *) ac_try_echo=$ac_try;;
16146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016150 grep -v '^ *+' conftest.er1 >conftest.err
16151 rm -f conftest.er1
16152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 (exit $ac_status); } && {
16155 test -z "$ac_c_werror_flag" ||
16156 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016157 } && test -s conftest$ac_exeext &&
16158 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016162sed 's/^/| /' conftest.$ac_ext >&5
16163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166
16167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016169LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016170fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16172echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16173if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016175#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016176_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016178 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016179 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016180 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016181else
Greg Steinadf63d62000-07-05 10:38:09 +000016182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016183 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16184echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016185if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016186 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016187else
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016189LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016191/* confdefs.h. */
16192_ACEOF
16193cat confdefs.h >>conftest.$ac_ext
16194cat >>conftest.$ac_ext <<_ACEOF
16195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197/* Override any GCC internal prototype to avoid an error.
16198 Use char because int might match the return type of a GCC
16199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016200#ifdef __cplusplus
16201extern "C"
16202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016203char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016204int
16205main ()
16206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 ;
16209 return 0;
16210}
16211_ACEOF
16212rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213if { (ac_try="$ac_link"
16214case "(($ac_try" in
16215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16216 *) ac_try_echo=$ac_try;;
16217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016221 grep -v '^ *+' conftest.er1 >conftest.err
16222 rm -f conftest.er1
16223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225 (exit $ac_status); } && {
16226 test -z "$ac_c_werror_flag" ||
16227 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016228 } && test -s conftest$ac_exeext &&
16229 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016233sed 's/^/| /' conftest.$ac_ext >&5
16234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237
16238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16243echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16244if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016250 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016251 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016252else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016254 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16255echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016256if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016258else
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016260LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268/* Override any GCC internal prototype to avoid an error.
16269 Use char because int might match the return type of a GCC
16270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016271#ifdef __cplusplus
16272extern "C"
16273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016274char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016275int
16276main ()
16277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ;
16280 return 0;
16281}
16282_ACEOF
16283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284if { (ac_try="$ac_link"
16285case "(($ac_try" in
16286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16287 *) ac_try_echo=$ac_try;;
16288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 grep -v '^ *+' conftest.er1 >conftest.err
16293 rm -f conftest.er1
16294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 (exit $ac_status); } && {
16297 test -z "$ac_c_werror_flag" ||
16298 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016299 } && test -s conftest$ac_exeext &&
16300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016304sed 's/^/| /' conftest.$ac_ext >&5
16305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308
16309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016313{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16314echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16315if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016317#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016318_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016320 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016321 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016322 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016323else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016324
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016325 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16326echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016331LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016333/* confdefs.h. */
16334_ACEOF
16335cat confdefs.h >>conftest.$ac_ext
16336cat >>conftest.$ac_ext <<_ACEOF
16337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339/* Override any GCC internal prototype to avoid an error.
16340 Use char because int might match the return type of a GCC
16341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016342#ifdef __cplusplus
16343extern "C"
16344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016345char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016346int
16347main ()
16348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ;
16351 return 0;
16352}
16353_ACEOF
16354rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355if { (ac_try="$ac_link"
16356case "(($ac_try" in
16357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16358 *) ac_try_echo=$ac_try;;
16359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 grep -v '^ *+' conftest.er1 >conftest.err
16364 rm -f conftest.er1
16365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 (exit $ac_status); } && {
16368 test -z "$ac_c_werror_flag" ||
16369 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016370 } && test -s conftest$ac_exeext &&
16371 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016375sed 's/^/| /' conftest.$ac_ext >&5
16376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016379
16380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016382LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016383fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016384{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16385echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16386if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016388#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016391 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016392 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016393 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016394else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016395
Martin v. Löwis130fb172001-07-19 11:00:41 +000016396 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016397fi
16398
Guido van Rossum627b2d71993-12-24 10:39:16 +000016399
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016400fi
16401
Guido van Rossum0be3e491997-05-22 20:33:33 +000016402fi
16403
Guido van Rossum49545951997-12-02 19:28:29 +000016404fi
16405
Guido van Rossumb93a8621998-05-07 13:27:32 +000016406fi
16407
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409
16410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016411 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412fi
16413
Martin v. Löwis11437992002-04-12 09:54:03 +000016414
16415fi
16416
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016417
Michael W. Hudson54241132001-12-07 15:38:26 +000016418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016419 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16420echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016421if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016423else
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016425LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016427/* confdefs.h. */
16428_ACEOF
16429cat confdefs.h >>conftest.$ac_ext
16430cat >>conftest.$ac_ext <<_ACEOF
16431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433/* Override any GCC internal prototype to avoid an error.
16434 Use char because int might match the return type of a GCC
16435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016436#ifdef __cplusplus
16437extern "C"
16438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016439char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016440int
16441main ()
16442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 ;
16445 return 0;
16446}
16447_ACEOF
16448rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449if { (ac_try="$ac_link"
16450case "(($ac_try" in
16451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16452 *) ac_try_echo=$ac_try;;
16453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 grep -v '^ *+' conftest.er1 >conftest.err
16458 rm -f conftest.er1
16459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461 (exit $ac_status); } && {
16462 test -z "$ac_c_werror_flag" ||
16463 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016464 } && test -s conftest$ac_exeext &&
16465 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016469sed 's/^/| /' conftest.$ac_ext >&5
16470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473
16474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016477fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16479echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16480if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016481 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016484
Martin v. Löwis130fb172001-07-19 11:00:41 +000016485 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016486 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016487 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016488fi
16489
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016490
Neal Norwitza978ab02002-11-02 16:58:05 +000016491 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016492 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16493echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016494if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016496else
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016498LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016500/* confdefs.h. */
16501_ACEOF
16502cat confdefs.h >>conftest.$ac_ext
16503cat >>conftest.$ac_ext <<_ACEOF
16504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506/* Override any GCC internal prototype to avoid an error.
16507 Use char because int might match the return type of a GCC
16508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016509#ifdef __cplusplus
16510extern "C"
16511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016512char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016513int
16514main ()
16515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ;
16518 return 0;
16519}
16520_ACEOF
16521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522if { (ac_try="$ac_link"
16523case "(($ac_try" in
16524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16525 *) ac_try_echo=$ac_try;;
16526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 grep -v '^ *+' conftest.er1 >conftest.err
16531 rm -f conftest.er1
16532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 (exit $ac_status); } && {
16535 test -z "$ac_c_werror_flag" ||
16536 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016537 } && test -s conftest$ac_exeext &&
16538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016542sed 's/^/| /' conftest.$ac_ext >&5
16543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546
16547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016551{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16552echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16553if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016555#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016557
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016558 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016559 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016560 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016561fi
16562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016563 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016564
Martin v. Löwis130fb172001-07-19 11:00:41 +000016565 if test "$USE_THREAD_MODULE" != "#"
16566 then
16567 # If the above checks didn't disable threads, (at least) OSF1
16568 # needs this '-threads' argument during linking.
16569 case $ac_sys_system in
16570 OSF1) LDLAST=-threads;;
16571 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016572 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016573fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016575if test "$posix_threads" = "yes"; then
16576 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016577
16578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016579#define _POSIX_THREADS 1
16580_ACEOF
16581
16582 fi
16583
16584 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16585 case $ac_sys_system/$ac_sys_release in
16586 SunOS/5.6)
16587cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016588#define HAVE_PTHREAD_DESTRUCTOR 1
16589_ACEOF
16590
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016591 ;;
16592 SunOS/5.8)
16593cat >>confdefs.h <<\_ACEOF
16594#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16595_ACEOF
16596
16597 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016598 AIX/5)
16599cat >>confdefs.h <<\_ACEOF
16600#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16601_ACEOF
16602
16603 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016604 esac
16605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016606 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16607echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016608 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016610else
16611 if test "$cross_compiling" = yes; then
16612 ac_cv_pthread_system_supported=no
16613else
16614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016620#include <pthread.h>
16621 void *foo(void *parm) {
16622 return NULL;
16623 }
16624 main() {
16625 pthread_attr_t attr;
16626 pthread_t id;
16627 if (pthread_attr_init(&attr)) exit(-1);
16628 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16629 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16630 exit(0);
16631 }
16632_ACEOF
16633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634if { (ac_try="$ac_link"
16635case "(($ac_try" in
16636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16637 *) ac_try_echo=$ac_try;;
16638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016641 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 { (case "(($ac_try" in
16645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646 *) ac_try_echo=$ac_try;;
16647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016652 (exit $ac_status); }; }; then
16653 ac_cv_pthread_system_supported=yes
16654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016655 echo "$as_me: program exited with status $ac_status" >&5
16656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016657sed 's/^/| /' conftest.$ac_ext >&5
16658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016659( exit $ac_status )
16660ac_cv_pthread_system_supported=no
16661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016663fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665
16666
Guido van Rossum627b2d71993-12-24 10:39:16 +000016667fi
16668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16670echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 if test "$ac_cv_pthread_system_supported" = "yes"; then
16672
16673cat >>confdefs.h <<\_ACEOF
16674#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16675_ACEOF
16676
16677 fi
16678
16679for ac_func in pthread_sigmask
16680do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016681as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16682{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16683echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016685 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016686else
16687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016688/* confdefs.h. */
16689_ACEOF
16690cat confdefs.h >>conftest.$ac_ext
16691cat >>conftest.$ac_ext <<_ACEOF
16692/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016693/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16695#define $ac_func innocuous_$ac_func
16696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016697/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016698 which can conflict with char $ac_func (); below.
16699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016700 <limits.h> exists even on freestanding compilers. */
16701
16702#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016703# include <limits.h>
16704#else
16705# include <assert.h>
16706#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016707
16708#undef $ac_func
16709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710/* Override any GCC internal prototype to avoid an error.
16711 Use char because int might match the return type of a GCC
16712 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713#ifdef __cplusplus
16714extern "C"
16715#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016716char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016717/* The GNU C library defines this for functions which it implements
16718 to always fail with ENOSYS. Some functions are actually named
16719 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016721choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722#endif
16723
Skip Montanaro6dead952003-09-25 14:50:04 +000016724int
16725main ()
16726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016728 ;
16729 return 0;
16730}
16731_ACEOF
16732rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733if { (ac_try="$ac_link"
16734case "(($ac_try" in
16735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16736 *) ac_try_echo=$ac_try;;
16737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016741 grep -v '^ *+' conftest.er1 >conftest.err
16742 rm -f conftest.er1
16743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 (exit $ac_status); } && {
16746 test -z "$ac_c_werror_flag" ||
16747 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016748 } && test -s conftest$ac_exeext &&
16749 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016750 eval "$as_ac_var=yes"
16751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016753sed 's/^/| /' conftest.$ac_ext >&5
16754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757
16758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016760fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016761ac_res=`eval echo '${'$as_ac_var'}'`
16762 { echo "$as_me:$LINENO: result: $ac_res" >&5
16763echo "${ECHO_T}$ac_res" >&6; }
16764if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016765 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016767_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016768 case $ac_sys_system in
16769 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016770
Jason Tishlerfac083d2003-07-22 15:20:49 +000016771cat >>confdefs.h <<\_ACEOF
16772#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16773_ACEOF
16774
16775 ;;
16776 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777fi
16778done
16779
16780fi
16781
16782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016783# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016784
16785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016786{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16787echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016789if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016791 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016792 { echo "$as_me:$LINENO: result: no" >&5
16793echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016794 ipv6=no
16795 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016796 *) { echo "$as_me:$LINENO: result: yes" >&5
16797echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016799#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016801
16802 ipv6=yes
16803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016805else
Martin v. Löwis11437992002-04-12 09:54:03 +000016806
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016807 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808 { echo "$as_me:$LINENO: result: no" >&5
16809echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016810 ipv6=no
16811
16812else
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016814/* confdefs.h. */
16815_ACEOF
16816cat confdefs.h >>conftest.$ac_ext
16817cat >>conftest.$ac_ext <<_ACEOF
16818/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016819 /* AF_INET6 available check */
16820#include <sys/types.h>
16821#include <sys/socket.h>
16822main()
16823{
16824 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16825 exit(1);
16826 else
16827 exit(0);
16828}
16829
Martin v. Löwis11437992002-04-12 09:54:03 +000016830_ACEOF
16831rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832if { (ac_try="$ac_link"
16833case "(($ac_try" in
16834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16835 *) ac_try_echo=$ac_try;;
16836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842 { (case "(($ac_try" in
16843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16844 *) ac_try_echo=$ac_try;;
16845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016851 { echo "$as_me:$LINENO: result: yes" >&5
16852echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016853 ipv6=yes
16854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016855 echo "$as_me: program exited with status $ac_status" >&5
16856echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016857sed 's/^/| /' conftest.$ac_ext >&5
16858
Martin v. Löwis11437992002-04-12 09:54:03 +000016859( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016860{ echo "$as_me:$LINENO: result: no" >&5
16861echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016862 ipv6=no
16863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016865fi
16866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867
16868
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016869if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016870 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16871echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016873/* confdefs.h. */
16874_ACEOF
16875cat confdefs.h >>conftest.$ac_ext
16876cat >>conftest.$ac_ext <<_ACEOF
16877/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016878#include <sys/types.h>
16879#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016880int
16881main ()
16882{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016883struct sockaddr_in6 x;
16884x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 ;
16886 return 0;
16887}
16888_ACEOF
16889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890if { (ac_try="$ac_compile"
16891case "(($ac_try" in
16892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16893 *) ac_try_echo=$ac_try;;
16894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016898 grep -v '^ *+' conftest.er1 >conftest.err
16899 rm -f conftest.er1
16900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 (exit $ac_status); } && {
16903 test -z "$ac_c_werror_flag" ||
16904 test ! -s conftest.err
16905 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016906 { echo "$as_me:$LINENO: result: yes" >&5
16907echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016908 ipv6=yes
16909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016911sed 's/^/| /' conftest.$ac_ext >&5
16912
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913 { echo "$as_me:$LINENO: result: no" >&5
16914echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016915 ipv6=no
16916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917
16918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016919fi
16920
16921if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016923#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016924_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016925
16926fi
16927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928fi
16929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930
16931ipv6type=unknown
16932ipv6lib=none
16933ipv6trylibc=no
16934
16935if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016936 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16937echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016938 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16939 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016940 case $i in
16941 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016949#include <netinet/in.h>
16950#ifdef IPV6_INRIA_VERSION
16951yes
16952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016955 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016956 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016957fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016958rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016959
16960 ;;
16961 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016963/* confdefs.h. */
16964_ACEOF
16965cat confdefs.h >>conftest.$ac_ext
16966cat >>conftest.$ac_ext <<_ACEOF
16967/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016969#include <netinet/in.h>
16970#ifdef __KAME__
16971yes
16972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016973_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016975 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016976 ipv6type=$i;
16977 ipv6lib=inet6
16978 ipv6libdir=/usr/local/v6/lib
16979 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016980fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016982
16983 ;;
16984 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016986/* confdefs.h. */
16987_ACEOF
16988cat confdefs.h >>conftest.$ac_ext
16989cat >>conftest.$ac_ext <<_ACEOF
16990/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016991
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016992#include <features.h>
16993#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16994yes
16995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016996_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016998 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016999 ipv6type=$i;
17000 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017002rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017003
17004 ;;
17005 linux-inet6)
17006 if test -d /usr/inet6; then
17007 ipv6type=$i
17008 ipv6lib=inet6
17009 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017010 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017011 fi
17012 ;;
17013 solaris)
17014 if test -f /etc/netconfig; then
17015 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17016 ipv6type=$i
17017 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017018 fi
17019 fi
17020 ;;
17021 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017023/* confdefs.h. */
17024_ACEOF
17025cat confdefs.h >>conftest.$ac_ext
17026cat >>conftest.$ac_ext <<_ACEOF
17027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029#include <sys/param.h>
17030#ifdef _TOSHIBA_INET6
17031yes
17032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017035 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017036 ipv6type=$i;
17037 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017038 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041
17042 ;;
17043 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017045/* confdefs.h. */
17046_ACEOF
17047cat confdefs.h >>conftest.$ac_ext
17048cat >>conftest.$ac_ext <<_ACEOF
17049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017051#include </usr/local/v6/include/sys/v6config.h>
17052#ifdef __V6D__
17053yes
17054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017057 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017058 ipv6type=$i;
17059 ipv6lib=v6;
17060 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017061 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064
17065 ;;
17066 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017074#include <sys/param.h>
17075#ifdef _ZETA_MINAMI_INET6
17076yes
17077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017080 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017081 ipv6type=$i;
17082 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017083 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017084fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000017085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017086
17087 ;;
17088 esac
17089 if test "$ipv6type" != "unknown"; then
17090 break
17091 fi
17092 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017093 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17094echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017095fi
17096
17097if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17098 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17099 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17100 echo "using lib$ipv6lib"
17101 else
17102 if test $ipv6trylibc = "yes"; then
17103 echo "using libc"
17104 else
17105 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17106 echo "You need to fetch lib$ipv6lib.a from appropriate"
17107 echo 'ipv6 kit and compile beforehand.'
17108 exit 1
17109 fi
17110 fi
17111fi
17112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017113{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17114echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017115cat >conftest.$ac_ext <<_ACEOF
17116/* confdefs.h. */
17117_ACEOF
17118cat confdefs.h >>conftest.$ac_ext
17119cat >>conftest.$ac_ext <<_ACEOF
17120/* end confdefs.h. */
17121#include <Carbon/Carbon.h>
17122int
17123main ()
17124{
17125FSIORefNum fRef = 0
17126 ;
17127 return 0;
17128}
17129_ACEOF
17130rm -f conftest.$ac_objext
17131if { (ac_try="$ac_compile"
17132case "(($ac_try" in
17133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17134 *) ac_try_echo=$ac_try;;
17135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017137 (eval "$ac_compile") 2>conftest.er1
17138 ac_status=$?
17139 grep -v '^ *+' conftest.er1 >conftest.err
17140 rm -f conftest.er1
17141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017143 (exit $ac_status); } && {
17144 test -z "$ac_c_werror_flag" ||
17145 test ! -s conftest.err
17146 } && test -s conftest.$ac_objext; then
17147
17148cat >>confdefs.h <<\_ACEOF
17149#define HAVE_OSX105_SDK 1
17150_ACEOF
17151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017152 { echo "$as_me:$LINENO: result: yes" >&5
17153echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017155 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017156sed 's/^/| /' conftest.$ac_ext >&5
17157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017158 { echo "$as_me:$LINENO: result: no" >&5
17159echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017160
17161fi
17162
17163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17164
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017165# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017166{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17167echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017170if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 withval=$with_doc_strings;
17172fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017173
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017174
17175if test -z "$with_doc_strings"
17176then with_doc_strings="yes"
17177fi
17178if test "$with_doc_strings" != "no"
17179then
17180
17181cat >>confdefs.h <<\_ACEOF
17182#define WITH_DOC_STRINGS 1
17183_ACEOF
17184
17185fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017186{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17187echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017188
Neil Schemenauera35c6882001-02-27 04:45:05 +000017189# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017190{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17191echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017194if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017196if test "$withval" != no
17197then
17198
17199cat >>confdefs.h <<\_ACEOF
17200#define WITH_TSC 1
17201_ACEOF
17202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017203 { echo "$as_me:$LINENO: result: yes" >&5
17204echo "${ECHO_T}yes" >&6; }
17205else { echo "$as_me:$LINENO: result: no" >&5
17206echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017207fi
17208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017209 { echo "$as_me:$LINENO: result: no" >&5
17210echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211fi
17212
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017213
17214# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017215{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17216echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017219if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 withval=$with_pymalloc;
17221fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017222
Neil Schemenauera35c6882001-02-27 04:45:05 +000017223
Neil Schemenauer16c22972002-03-22 15:34:49 +000017224if test -z "$with_pymalloc"
17225then with_pymalloc="yes"
17226fi
17227if test "$with_pymalloc" != "no"
17228then
Martin v. Löwis11437992002-04-12 09:54:03 +000017229
17230cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017231#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017232_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017233
17234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017235{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17236echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017237
Benjamin Peterson05159c42009-12-03 03:01:27 +000017238# Check for Valgrind support
17239{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17240echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17241
17242# Check whether --with-valgrind was given.
17243if test "${with_valgrind+set}" = set; then
17244 withval=$with_valgrind;
17245else
17246 with_valgrind=no
17247fi
17248
17249{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17250echo "${ECHO_T}$with_valgrind" >&6; }
17251if test "$with_valgrind" != no; then
17252 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17253 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17254echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17255if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17256 echo $ECHO_N "(cached) $ECHO_C" >&6
17257fi
17258{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17259echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17260else
17261 # Is the header compilable?
17262{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17263echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17264cat >conftest.$ac_ext <<_ACEOF
17265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
17270$ac_includes_default
17271#include <valgrind/valgrind.h>
17272_ACEOF
17273rm -f conftest.$ac_objext
17274if { (ac_try="$ac_compile"
17275case "(($ac_try" in
17276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17277 *) ac_try_echo=$ac_try;;
17278esac
17279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17280 (eval "$ac_compile") 2>conftest.er1
17281 ac_status=$?
17282 grep -v '^ *+' conftest.er1 >conftest.err
17283 rm -f conftest.er1
17284 cat conftest.err >&5
17285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17286 (exit $ac_status); } && {
17287 test -z "$ac_c_werror_flag" ||
17288 test ! -s conftest.err
17289 } && test -s conftest.$ac_objext; then
17290 ac_header_compiler=yes
17291else
17292 echo "$as_me: failed program was:" >&5
17293sed 's/^/| /' conftest.$ac_ext >&5
17294
17295 ac_header_compiler=no
17296fi
17297
17298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17299{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17300echo "${ECHO_T}$ac_header_compiler" >&6; }
17301
17302# Is the header present?
17303{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17304echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17305cat >conftest.$ac_ext <<_ACEOF
17306/* confdefs.h. */
17307_ACEOF
17308cat confdefs.h >>conftest.$ac_ext
17309cat >>conftest.$ac_ext <<_ACEOF
17310/* end confdefs.h. */
17311#include <valgrind/valgrind.h>
17312_ACEOF
17313if { (ac_try="$ac_cpp conftest.$ac_ext"
17314case "(($ac_try" in
17315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316 *) ac_try_echo=$ac_try;;
17317esac
17318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17319 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17320 ac_status=$?
17321 grep -v '^ *+' conftest.er1 >conftest.err
17322 rm -f conftest.er1
17323 cat conftest.err >&5
17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325 (exit $ac_status); } >/dev/null && {
17326 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17327 test ! -s conftest.err
17328 }; then
17329 ac_header_preproc=yes
17330else
17331 echo "$as_me: failed program was:" >&5
17332sed 's/^/| /' conftest.$ac_ext >&5
17333
17334 ac_header_preproc=no
17335fi
17336
17337rm -f conftest.err conftest.$ac_ext
17338{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17339echo "${ECHO_T}$ac_header_preproc" >&6; }
17340
17341# So? What about this header?
17342case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17343 yes:no: )
17344 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17345echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17346 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17347echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17348 ac_header_preproc=yes
17349 ;;
17350 no:yes:* )
17351 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17352echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17353 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17354echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17355 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17356echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17357 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17358echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17359 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17360echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17361 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17362echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17363 ( cat <<\_ASBOX
17364## -------------------------------------- ##
17365## Report this to http://bugs.python.org/ ##
17366## -------------------------------------- ##
17367_ASBOX
17368 ) | sed "s/^/$as_me: WARNING: /" >&2
17369 ;;
17370esac
17371{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17372echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17373if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17374 echo $ECHO_N "(cached) $ECHO_C" >&6
17375else
17376 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17377fi
17378{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17379echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17380
17381fi
17382if test $ac_cv_header_valgrind_valgrind_h = yes; then
17383
17384cat >>confdefs.h <<\_ACEOF
17385#define WITH_VALGRIND 1
17386_ACEOF
17387
17388else
17389 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17390echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17391 { (exit 1); exit 1; }; }
17392
17393fi
17394
17395
17396fi
17397
Barry Warsawef82cd72000-06-30 16:21:01 +000017398# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017399{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17400echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017403if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017405if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017406then
17407
17408cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017409#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410_ACEOF
17411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017412 { echo "$as_me:$LINENO: result: yes" >&5
17413echo "${ECHO_T}yes" >&6; }
17414else { echo "$as_me:$LINENO: result: no" >&5
17415echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017416fi
17417else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017418 { echo "$as_me:$LINENO: result: no" >&5
17419echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420fi
17421
Barry Warsawef82cd72000-06-30 16:21:01 +000017422
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017423# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017424
Guido van Rossum98935bf2001-09-05 19:13:16 +000017425DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017426
Guido van Rossume97ee181999-12-20 21:27:22 +000017427# the dlopen() function means we might want to use dynload_shlib.o. some
17428# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017429
Thomas Wouters3a584202000-08-05 23:28:51 +000017430for ac_func in dlopen
17431do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17433{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017437else
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017439/* confdefs.h. */
17440_ACEOF
17441cat confdefs.h >>conftest.$ac_ext
17442cat >>conftest.$ac_ext <<_ACEOF
17443/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017444/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17446#define $ac_func innocuous_$ac_func
17447
Guido van Rossume97ee181999-12-20 21:27:22 +000017448/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017449 which can conflict with char $ac_func (); below.
17450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017451 <limits.h> exists even on freestanding compilers. */
17452
17453#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017454# include <limits.h>
17455#else
17456# include <assert.h>
17457#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017458
17459#undef $ac_func
17460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461/* Override any GCC internal prototype to avoid an error.
17462 Use char because int might match the return type of a GCC
17463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017464#ifdef __cplusplus
17465extern "C"
17466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017467char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017468/* The GNU C library defines this for functions which it implements
17469 to always fail with ENOSYS. Some functions are actually named
17470 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017472choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017473#endif
17474
Skip Montanaro6dead952003-09-25 14:50:04 +000017475int
17476main ()
17477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ;
17480 return 0;
17481}
17482_ACEOF
17483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484if { (ac_try="$ac_link"
17485case "(($ac_try" in
17486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17487 *) ac_try_echo=$ac_try;;
17488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017492 grep -v '^ *+' conftest.er1 >conftest.err
17493 rm -f conftest.er1
17494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 (exit $ac_status); } && {
17497 test -z "$ac_c_werror_flag" ||
17498 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017499 } && test -s conftest$ac_exeext &&
17500 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017504sed 's/^/| /' conftest.$ac_ext >&5
17505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508
17509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017510 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017511fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017512ac_res=`eval echo '${'$as_ac_var'}'`
17513 { echo "$as_me:$LINENO: result: $ac_res" >&5
17514echo "${ECHO_T}$ac_res" >&6; }
17515if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017517#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017518_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017519
Guido van Rossume97ee181999-12-20 21:27:22 +000017520fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017521done
Guido van Rossume97ee181999-12-20 21:27:22 +000017522
Michael W. Hudson54241132001-12-07 15:38:26 +000017523
Guido van Rossume97ee181999-12-20 21:27:22 +000017524# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17525# loading of modules.
17526
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017527{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17528echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017529if test -z "$DYNLOADFILE"
17530then
17531 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017532 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17533 if test "$ac_cv_func_dlopen" = yes
17534 then DYNLOADFILE="dynload_shlib.o"
17535 else DYNLOADFILE="dynload_aix.o"
17536 fi
17537 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017538 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017539 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17540 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017541 *)
17542 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17543 # out any dynamic loading
17544 if test "$ac_cv_func_dlopen" = yes
17545 then DYNLOADFILE="dynload_shlib.o"
17546 else DYNLOADFILE="dynload_stub.o"
17547 fi
17548 ;;
17549 esac
17550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017551{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17552echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017553if test "$DYNLOADFILE" != "dynload_stub.o"
17554then
Martin v. Löwis11437992002-04-12 09:54:03 +000017555
17556cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017557#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017558_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017559
17560fi
17561
Neil Schemenauer4e425612001-06-19 15:44:15 +000017562# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17563
Michael W. Hudson54241132001-12-07 15:38:26 +000017564
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017565{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17566echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017567if test -z "$MACHDEP_OBJS"
17568then
Jack Jansene578a632001-08-15 01:27:14 +000017569 MACHDEP_OBJS=$extra_machdep_objs
17570else
17571 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017573{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17574echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017575
Guido van Rossum627b2d71993-12-24 10:39:16 +000017576# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
Martin v. Löwisd6320502004-08-12 13:45:08 +000017648
Martin v. Löwisc3001752005-01-23 09:27:24 +000017649
17650
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017651
17652
Thomas Wouterscf297e42007-02-23 15:07:44 +000017653
17654
Gregory P. Smith25523d22007-09-03 16:44:55 +000017655
Christian Heimes4e30a842007-11-30 22:12:06 +000017656
Martin v. Löwis92fab752008-03-08 10:40:41 +000017657
Martin v. Löwis823725e2008-03-24 13:39:54 +000017658
17659
Benjamin Peterson965ce872009-04-05 21:24:58 +000017660
17661
17662
17663
Martin v. Löwis011e8422009-05-05 04:43:17 +000017664
Martin v. Löwis113a0852009-05-29 17:25:39 +000017665
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017666
17667
17668
17669
Antoine Pitroub7572f02009-12-02 20:46:48 +000017670
Martin v. Löwis823725e2008-03-24 13:39:54 +000017671for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17672 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017673 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017674 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017675 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017676 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017677 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017678 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17679 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017680 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17681 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017682 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017683 truncate uname unsetenv utimes waitpid wait3 wait4 \
17684 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017685do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017691else
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017693/* confdefs.h. */
17694_ACEOF
17695cat confdefs.h >>conftest.$ac_ext
17696cat >>conftest.$ac_ext <<_ACEOF
17697/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017698/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17699 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17700#define $ac_func innocuous_$ac_func
17701
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017702/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017703 which can conflict with char $ac_func (); below.
17704 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017705 <limits.h> exists even on freestanding compilers. */
17706
17707#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017708# include <limits.h>
17709#else
17710# include <assert.h>
17711#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017712
17713#undef $ac_func
17714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715/* Override any GCC internal prototype to avoid an error.
17716 Use char because int might match the return type of a GCC
17717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017718#ifdef __cplusplus
17719extern "C"
17720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017721char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017722/* The GNU C library defines this for functions which it implements
17723 to always fail with ENOSYS. Some functions are actually named
17724 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017726choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017727#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017728
Skip Montanaro6dead952003-09-25 14:50:04 +000017729int
17730main ()
17731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 ;
17734 return 0;
17735}
17736_ACEOF
17737rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738if { (ac_try="$ac_link"
17739case "(($ac_try" in
17740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17741 *) ac_try_echo=$ac_try;;
17742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017746 grep -v '^ *+' conftest.er1 >conftest.err
17747 rm -f conftest.er1
17748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 (exit $ac_status); } && {
17751 test -z "$ac_c_werror_flag" ||
17752 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017753 } && test -s conftest$ac_exeext &&
17754 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017756else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017758sed 's/^/| /' conftest.$ac_ext >&5
17759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762
17763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017764 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017766ac_res=`eval echo '${'$as_ac_var'}'`
17767 { echo "$as_me:$LINENO: result: $ac_res" >&5
17768echo "${ECHO_T}$ac_res" >&6; }
17769if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017772_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017773
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017774fi
17775done
17776
Michael W. Hudson54241132001-12-07 15:38:26 +000017777
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017778# For some functions, having a definition is not sufficient, since
17779# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017780{ echo "$as_me:$LINENO: checking for chroot" >&5
17781echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017783/* confdefs.h. */
17784_ACEOF
17785cat confdefs.h >>conftest.$ac_ext
17786cat >>conftest.$ac_ext <<_ACEOF
17787/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017788#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017789int
17790main ()
17791{
17792void *x=chroot
17793 ;
17794 return 0;
17795}
17796_ACEOF
17797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798if { (ac_try="$ac_compile"
17799case "(($ac_try" in
17800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17801 *) ac_try_echo=$ac_try;;
17802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017806 grep -v '^ *+' conftest.er1 >conftest.err
17807 rm -f conftest.er1
17808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810 (exit $ac_status); } && {
17811 test -z "$ac_c_werror_flag" ||
17812 test ! -s conftest.err
17813 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017814
17815cat >>confdefs.h <<\_ACEOF
17816#define HAVE_CHROOT 1
17817_ACEOF
17818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017819 { echo "$as_me:$LINENO: result: yes" >&5
17820echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017823sed 's/^/| /' conftest.$ac_ext >&5
17824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017825 { echo "$as_me:$LINENO: result: no" >&5
17826echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017827
17828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829
17830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017831{ echo "$as_me:$LINENO: checking for link" >&5
17832echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017834/* confdefs.h. */
17835_ACEOF
17836cat confdefs.h >>conftest.$ac_ext
17837cat >>conftest.$ac_ext <<_ACEOF
17838/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017839#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017840int
17841main ()
17842{
17843void *x=link
17844 ;
17845 return 0;
17846}
17847_ACEOF
17848rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849if { (ac_try="$ac_compile"
17850case "(($ac_try" in
17851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17852 *) ac_try_echo=$ac_try;;
17853esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017857 grep -v '^ *+' conftest.er1 >conftest.err
17858 rm -f conftest.er1
17859 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861 (exit $ac_status); } && {
17862 test -z "$ac_c_werror_flag" ||
17863 test ! -s conftest.err
17864 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017865
17866cat >>confdefs.h <<\_ACEOF
17867#define HAVE_LINK 1
17868_ACEOF
17869
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017870 { echo "$as_me:$LINENO: result: yes" >&5
17871echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017874sed 's/^/| /' conftest.$ac_ext >&5
17875
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017876 { echo "$as_me:$LINENO: result: no" >&5
17877echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017878
17879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880
17881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017882{ echo "$as_me:$LINENO: checking for symlink" >&5
17883echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017885/* confdefs.h. */
17886_ACEOF
17887cat confdefs.h >>conftest.$ac_ext
17888cat >>conftest.$ac_ext <<_ACEOF
17889/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017890#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017891int
17892main ()
17893{
17894void *x=symlink
17895 ;
17896 return 0;
17897}
17898_ACEOF
17899rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900if { (ac_try="$ac_compile"
17901case "(($ac_try" in
17902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17903 *) ac_try_echo=$ac_try;;
17904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908 grep -v '^ *+' conftest.er1 >conftest.err
17909 rm -f conftest.er1
17910 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 (exit $ac_status); } && {
17913 test -z "$ac_c_werror_flag" ||
17914 test ! -s conftest.err
17915 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017916
17917cat >>confdefs.h <<\_ACEOF
17918#define HAVE_SYMLINK 1
17919_ACEOF
17920
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017921 { echo "$as_me:$LINENO: result: yes" >&5
17922echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017925sed 's/^/| /' conftest.$ac_ext >&5
17926
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017927 { echo "$as_me:$LINENO: result: no" >&5
17928echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017929
17930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931
17932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017933{ echo "$as_me:$LINENO: checking for fchdir" >&5
17934echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017936/* confdefs.h. */
17937_ACEOF
17938cat confdefs.h >>conftest.$ac_ext
17939cat >>conftest.$ac_ext <<_ACEOF
17940/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017941#include <unistd.h>
17942int
17943main ()
17944{
17945void *x=fchdir
17946 ;
17947 return 0;
17948}
17949_ACEOF
17950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951if { (ac_try="$ac_compile"
17952case "(($ac_try" in
17953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17954 *) ac_try_echo=$ac_try;;
17955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017959 grep -v '^ *+' conftest.er1 >conftest.err
17960 rm -f conftest.er1
17961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 (exit $ac_status); } && {
17964 test -z "$ac_c_werror_flag" ||
17965 test ! -s conftest.err
17966 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017967
17968cat >>confdefs.h <<\_ACEOF
17969#define HAVE_FCHDIR 1
17970_ACEOF
17971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017972 { echo "$as_me:$LINENO: result: yes" >&5
17973echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017976sed 's/^/| /' conftest.$ac_ext >&5
17977
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017978 { echo "$as_me:$LINENO: result: no" >&5
17979echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017980
17981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982
17983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017984{ echo "$as_me:$LINENO: checking for fsync" >&5
17985echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017987/* confdefs.h. */
17988_ACEOF
17989cat confdefs.h >>conftest.$ac_ext
17990cat >>conftest.$ac_ext <<_ACEOF
17991/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017992#include <unistd.h>
17993int
17994main ()
17995{
17996void *x=fsync
17997 ;
17998 return 0;
17999}
18000_ACEOF
18001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002if { (ac_try="$ac_compile"
18003case "(($ac_try" in
18004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18005 *) ac_try_echo=$ac_try;;
18006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018010 grep -v '^ *+' conftest.er1 >conftest.err
18011 rm -f conftest.er1
18012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 (exit $ac_status); } && {
18015 test -z "$ac_c_werror_flag" ||
18016 test ! -s conftest.err
18017 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018018
18019cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018020#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018021_ACEOF
18022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018023 { echo "$as_me:$LINENO: result: yes" >&5
18024echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018027sed 's/^/| /' conftest.$ac_ext >&5
18028
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018029 { echo "$as_me:$LINENO: result: no" >&5
18030echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018031
18032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033
18034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018035{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18036echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018038/* confdefs.h. */
18039_ACEOF
18040cat confdefs.h >>conftest.$ac_ext
18041cat >>conftest.$ac_ext <<_ACEOF
18042/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018043#include <unistd.h>
18044int
18045main ()
18046{
18047void *x=fdatasync
18048 ;
18049 return 0;
18050}
18051_ACEOF
18052rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053if { (ac_try="$ac_compile"
18054case "(($ac_try" in
18055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18056 *) ac_try_echo=$ac_try;;
18057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018061 grep -v '^ *+' conftest.er1 >conftest.err
18062 rm -f conftest.er1
18063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065 (exit $ac_status); } && {
18066 test -z "$ac_c_werror_flag" ||
18067 test ! -s conftest.err
18068 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018069
18070cat >>confdefs.h <<\_ACEOF
18071#define HAVE_FDATASYNC 1
18072_ACEOF
18073
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018074 { echo "$as_me:$LINENO: result: yes" >&5
18075echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018078sed 's/^/| /' conftest.$ac_ext >&5
18079
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018080 { echo "$as_me:$LINENO: result: no" >&5
18081echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018082
18083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084
18085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018086{ echo "$as_me:$LINENO: checking for epoll" >&5
18087echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018088cat >conftest.$ac_ext <<_ACEOF
18089/* confdefs.h. */
18090_ACEOF
18091cat confdefs.h >>conftest.$ac_ext
18092cat >>conftest.$ac_ext <<_ACEOF
18093/* end confdefs.h. */
18094#include <sys/epoll.h>
18095int
18096main ()
18097{
18098void *x=epoll_create
18099 ;
18100 return 0;
18101}
18102_ACEOF
18103rm -f conftest.$ac_objext
18104if { (ac_try="$ac_compile"
18105case "(($ac_try" in
18106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18107 *) ac_try_echo=$ac_try;;
18108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018110 (eval "$ac_compile") 2>conftest.er1
18111 ac_status=$?
18112 grep -v '^ *+' conftest.er1 >conftest.err
18113 rm -f conftest.er1
18114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018116 (exit $ac_status); } && {
18117 test -z "$ac_c_werror_flag" ||
18118 test ! -s conftest.err
18119 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018120
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018121cat >>confdefs.h <<\_ACEOF
18122#define HAVE_EPOLL 1
18123_ACEOF
18124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125 { echo "$as_me:$LINENO: result: yes" >&5
18126echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018128 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018129sed 's/^/| /' conftest.$ac_ext >&5
18130
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018131 { echo "$as_me:$LINENO: result: no" >&5
18132echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018133
18134fi
18135
18136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018137{ echo "$as_me:$LINENO: checking for kqueue" >&5
18138echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018139cat >conftest.$ac_ext <<_ACEOF
18140/* confdefs.h. */
18141_ACEOF
18142cat confdefs.h >>conftest.$ac_ext
18143cat >>conftest.$ac_ext <<_ACEOF
18144/* end confdefs.h. */
18145
18146#include <sys/types.h>
18147#include <sys/event.h>
18148
18149int
18150main ()
18151{
18152int x=kqueue()
18153 ;
18154 return 0;
18155}
18156_ACEOF
18157rm -f conftest.$ac_objext
18158if { (ac_try="$ac_compile"
18159case "(($ac_try" in
18160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18161 *) ac_try_echo=$ac_try;;
18162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018164 (eval "$ac_compile") 2>conftest.er1
18165 ac_status=$?
18166 grep -v '^ *+' conftest.er1 >conftest.err
18167 rm -f conftest.er1
18168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018170 (exit $ac_status); } && {
18171 test -z "$ac_c_werror_flag" ||
18172 test ! -s conftest.err
18173 } && test -s conftest.$ac_objext; then
18174
18175cat >>confdefs.h <<\_ACEOF
18176#define HAVE_KQUEUE 1
18177_ACEOF
18178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018179 { echo "$as_me:$LINENO: result: yes" >&5
18180echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018183sed 's/^/| /' conftest.$ac_ext >&5
18184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018185 { echo "$as_me:$LINENO: result: no" >&5
18186echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018187
18188fi
18189
18190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018191# On some systems (eg. FreeBSD 5), we would find a definition of the
18192# functions ctermid_r, setgroups in the library, but no prototype
18193# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18194# address to avoid compiler warnings and potential miscompilations
18195# because of the missing prototypes.
18196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18198echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018200/* confdefs.h. */
18201_ACEOF
18202cat confdefs.h >>conftest.$ac_ext
18203cat >>conftest.$ac_ext <<_ACEOF
18204/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018205
18206#include "confdefs.h"
18207#include <stdio.h>
18208
Martin v. Löwisd5843682002-11-21 20:41:28 +000018209int
18210main ()
18211{
18212void* p = ctermid_r
18213 ;
18214 return 0;
18215}
18216_ACEOF
18217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218if { (ac_try="$ac_compile"
18219case "(($ac_try" in
18220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18221 *) ac_try_echo=$ac_try;;
18222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230 (exit $ac_status); } && {
18231 test -z "$ac_c_werror_flag" ||
18232 test ! -s conftest.err
18233 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018234
18235cat >>confdefs.h <<\_ACEOF
18236#define HAVE_CTERMID_R 1
18237_ACEOF
18238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239 { echo "$as_me:$LINENO: result: yes" >&5
18240echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018243sed 's/^/| /' conftest.$ac_ext >&5
18244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018245 { echo "$as_me:$LINENO: result: no" >&5
18246echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018247
18248fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252{ echo "$as_me:$LINENO: checking for flock" >&5
18253echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018255/* confdefs.h. */
18256_ACEOF
18257cat confdefs.h >>conftest.$ac_ext
18258cat >>conftest.$ac_ext <<_ACEOF
18259/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018260
18261#include "confdefs.h"
18262#include <sys/file.h>
18263
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018264int
18265main ()
18266{
18267void* p = flock
18268 ;
18269 return 0;
18270}
18271_ACEOF
18272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273if { (ac_try="$ac_compile"
18274case "(($ac_try" in
18275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276 *) ac_try_echo=$ac_try;;
18277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285 (exit $ac_status); } && {
18286 test -z "$ac_c_werror_flag" ||
18287 test ! -s conftest.err
18288 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018289
18290cat >>confdefs.h <<\_ACEOF
18291#define HAVE_FLOCK 1
18292_ACEOF
18293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294 { echo "$as_me:$LINENO: result: yes" >&5
18295echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018298sed 's/^/| /' conftest.$ac_ext >&5
18299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018300 { echo "$as_me:$LINENO: result: no" >&5
18301echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018302
18303fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018307{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18308echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018310/* confdefs.h. */
18311_ACEOF
18312cat confdefs.h >>conftest.$ac_ext
18313cat >>conftest.$ac_ext <<_ACEOF
18314/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018315
18316#include "confdefs.h"
18317#include <unistd.h>
18318
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018319int
18320main ()
18321{
18322void* p = getpagesize
18323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328if { (ac_try="$ac_compile"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018344
18345cat >>confdefs.h <<\_ACEOF
18346#define HAVE_GETPAGESIZE 1
18347_ACEOF
18348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349 { echo "$as_me:$LINENO: result: yes" >&5
18350echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018353sed 's/^/| /' conftest.$ac_ext >&5
18354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018355 { echo "$as_me:$LINENO: result: no" >&5
18356echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018357
18358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359
18360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018361
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018362for ac_prog in true
18363do
18364 # Extract the first word of "$ac_prog", so it can be a program name with args.
18365set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018368if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018370else
18371 if test -n "$TRUE"; then
18372 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18373else
18374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18375for as_dir in $PATH
18376do
18377 IFS=$as_save_IFS
18378 test -z "$as_dir" && as_dir=.
18379 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018381 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018383 break 2
18384 fi
18385done
18386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018388
18389fi
18390fi
18391TRUE=$ac_cv_prog_TRUE
18392if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018393 { echo "$as_me:$LINENO: result: $TRUE" >&5
18394echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018396 { echo "$as_me:$LINENO: result: no" >&5
18397echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018398fi
18399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018401 test -n "$TRUE" && break
18402done
18403test -n "$TRUE" || TRUE="/bin/true"
18404
18405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018406{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18407echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018408if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018410else
18411 ac_check_lib_save_LIBS=$LIBS
18412LIBS="-lc $LIBS"
18413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018414/* confdefs.h. */
18415_ACEOF
18416cat confdefs.h >>conftest.$ac_ext
18417cat >>conftest.$ac_ext <<_ACEOF
18418/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420/* Override any GCC internal prototype to avoid an error.
18421 Use char because int might match the return type of a GCC
18422 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018423#ifdef __cplusplus
18424extern "C"
18425#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018426char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018427int
18428main ()
18429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018431 ;
18432 return 0;
18433}
18434_ACEOF
18435rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436if { (ac_try="$ac_link"
18437case "(($ac_try" in
18438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18439 *) ac_try_echo=$ac_try;;
18440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018444 grep -v '^ *+' conftest.er1 >conftest.err
18445 rm -f conftest.er1
18446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 (exit $ac_status); } && {
18449 test -z "$ac_c_werror_flag" ||
18450 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451 } && test -s conftest$ac_exeext &&
18452 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018453 ac_cv_lib_c_inet_aton=yes
18454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018456sed 's/^/| /' conftest.$ac_ext >&5
18457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460
18461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018463LIBS=$ac_check_lib_save_LIBS
18464fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18466echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18467if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018468 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018469else
18470
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018471{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18472echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018473if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018475else
18476 ac_check_lib_save_LIBS=$LIBS
18477LIBS="-lresolv $LIBS"
18478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018479/* confdefs.h. */
18480_ACEOF
18481cat confdefs.h >>conftest.$ac_ext
18482cat >>conftest.$ac_ext <<_ACEOF
18483/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485/* Override any GCC internal prototype to avoid an error.
18486 Use char because int might match the return type of a GCC
18487 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018488#ifdef __cplusplus
18489extern "C"
18490#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018491char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018492int
18493main ()
18494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496 ;
18497 return 0;
18498}
18499_ACEOF
18500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501if { (ac_try="$ac_link"
18502case "(($ac_try" in
18503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504 *) ac_try_echo=$ac_try;;
18505esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516 } && test -s conftest$ac_exeext &&
18517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018518 ac_cv_lib_resolv_inet_aton=yes
18519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018521sed 's/^/| /' conftest.$ac_ext >&5
18522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525
18526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528LIBS=$ac_check_lib_save_LIBS
18529fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018530{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18531echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18532if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018533 cat >>confdefs.h <<_ACEOF
18534#define HAVE_LIBRESOLV 1
18535_ACEOF
18536
18537 LIBS="-lresolv $LIBS"
18538
18539fi
18540
18541
18542fi
18543
18544
Christian Heimesd0764e22007-12-04 15:00:33 +000018545# On Tru64, chflags seems to be present, but calling it will
18546# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018547{ echo "$as_me:$LINENO: checking for chflags" >&5
18548echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018549if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018551else
18552 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018553 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018554else
18555 cat >conftest.$ac_ext <<_ACEOF
18556/* confdefs.h. */
18557_ACEOF
18558cat confdefs.h >>conftest.$ac_ext
18559cat >>conftest.$ac_ext <<_ACEOF
18560/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018561[
Christian Heimesd0764e22007-12-04 15:00:33 +000018562#include <sys/stat.h>
18563#include <unistd.h>
18564int main(int argc, char*argv[])
18565{
18566 if(chflags(argv[0], 0) != 0)
18567 return 1;
18568 return 0;
18569}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018570]
Christian Heimesd0764e22007-12-04 15:00:33 +000018571_ACEOF
18572rm -f conftest$ac_exeext
18573if { (ac_try="$ac_link"
18574case "(($ac_try" in
18575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18576 *) ac_try_echo=$ac_try;;
18577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018579 (eval "$ac_link") 2>&5
18580 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18583 { (case "(($ac_try" in
18584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18585 *) ac_try_echo=$ac_try;;
18586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018588 (eval "$ac_try") 2>&5
18589 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018591 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018592 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018594 echo "$as_me: program exited with status $ac_status" >&5
18595echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018596sed 's/^/| /' conftest.$ac_ext >&5
18597
18598( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018599ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018600fi
18601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018602fi
18603
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018604
18605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018606fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018607{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18608echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018609if test "$ac_cv_have_chflags" = cross ; then
18610 { echo "$as_me:$LINENO: checking for chflags" >&5
18611echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18612if test "${ac_cv_func_chflags+set}" = set; then
18613 echo $ECHO_N "(cached) $ECHO_C" >&6
18614else
18615 cat >conftest.$ac_ext <<_ACEOF
18616/* confdefs.h. */
18617_ACEOF
18618cat confdefs.h >>conftest.$ac_ext
18619cat >>conftest.$ac_ext <<_ACEOF
18620/* end confdefs.h. */
18621/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18622 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18623#define chflags innocuous_chflags
18624
18625/* System header to define __stub macros and hopefully few prototypes,
18626 which can conflict with char chflags (); below.
18627 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18628 <limits.h> exists even on freestanding compilers. */
18629
18630#ifdef __STDC__
18631# include <limits.h>
18632#else
18633# include <assert.h>
18634#endif
18635
18636#undef chflags
18637
18638/* Override any GCC internal prototype to avoid an error.
18639 Use char because int might match the return type of a GCC
18640 builtin and then its argument prototype would still apply. */
18641#ifdef __cplusplus
18642extern "C"
18643#endif
18644char chflags ();
18645/* The GNU C library defines this for functions which it implements
18646 to always fail with ENOSYS. Some functions are actually named
18647 something starting with __ and the normal name is an alias. */
18648#if defined __stub_chflags || defined __stub___chflags
18649choke me
18650#endif
18651
18652int
18653main ()
18654{
18655return chflags ();
18656 ;
18657 return 0;
18658}
18659_ACEOF
18660rm -f conftest.$ac_objext conftest$ac_exeext
18661if { (ac_try="$ac_link"
18662case "(($ac_try" in
18663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18664 *) ac_try_echo=$ac_try;;
18665esac
18666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18667 (eval "$ac_link") 2>conftest.er1
18668 ac_status=$?
18669 grep -v '^ *+' conftest.er1 >conftest.err
18670 rm -f conftest.er1
18671 cat conftest.err >&5
18672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18673 (exit $ac_status); } && {
18674 test -z "$ac_c_werror_flag" ||
18675 test ! -s conftest.err
18676 } && test -s conftest$ac_exeext &&
18677 $as_test_x conftest$ac_exeext; then
18678 ac_cv_func_chflags=yes
18679else
18680 echo "$as_me: failed program was:" >&5
18681sed 's/^/| /' conftest.$ac_ext >&5
18682
18683 ac_cv_func_chflags=no
18684fi
18685
18686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18687 conftest$ac_exeext conftest.$ac_ext
18688fi
18689{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18690echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18691if test $ac_cv_func_chflags = yes; then
18692 ac_cv_have_chflags="yes"
18693else
18694 ac_cv_have_chflags="no"
18695fi
18696
18697fi
18698if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018699
18700cat >>confdefs.h <<\_ACEOF
18701#define HAVE_CHFLAGS 1
18702_ACEOF
18703
18704fi
18705
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018706{ echo "$as_me:$LINENO: checking for lchflags" >&5
18707echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018708if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018709 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018710else
18711 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018712 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018713else
18714 cat >conftest.$ac_ext <<_ACEOF
18715/* confdefs.h. */
18716_ACEOF
18717cat confdefs.h >>conftest.$ac_ext
18718cat >>conftest.$ac_ext <<_ACEOF
18719/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018720[
Christian Heimesd0764e22007-12-04 15:00:33 +000018721#include <sys/stat.h>
18722#include <unistd.h>
18723int main(int argc, char*argv[])
18724{
18725 if(lchflags(argv[0], 0) != 0)
18726 return 1;
18727 return 0;
18728}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018729]
Christian Heimesd0764e22007-12-04 15:00:33 +000018730_ACEOF
18731rm -f conftest$ac_exeext
18732if { (ac_try="$ac_link"
18733case "(($ac_try" in
18734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18735 *) ac_try_echo=$ac_try;;
18736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018738 (eval "$ac_link") 2>&5
18739 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18742 { (case "(($ac_try" in
18743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18744 *) ac_try_echo=$ac_try;;
18745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018747 (eval "$ac_try") 2>&5
18748 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018750 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018751 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018753 echo "$as_me: program exited with status $ac_status" >&5
18754echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018755sed 's/^/| /' conftest.$ac_ext >&5
18756
18757( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018758ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018759fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18761fi
18762
18763
Christian Heimesd0764e22007-12-04 15:00:33 +000018764
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018766{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18767echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018768if test "$ac_cv_have_lchflags" = cross ; then
18769 { echo "$as_me:$LINENO: checking for lchflags" >&5
18770echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18771if test "${ac_cv_func_lchflags+set}" = set; then
18772 echo $ECHO_N "(cached) $ECHO_C" >&6
18773else
18774 cat >conftest.$ac_ext <<_ACEOF
18775/* confdefs.h. */
18776_ACEOF
18777cat confdefs.h >>conftest.$ac_ext
18778cat >>conftest.$ac_ext <<_ACEOF
18779/* end confdefs.h. */
18780/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18781 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18782#define lchflags innocuous_lchflags
18783
18784/* System header to define __stub macros and hopefully few prototypes,
18785 which can conflict with char lchflags (); below.
18786 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18787 <limits.h> exists even on freestanding compilers. */
18788
18789#ifdef __STDC__
18790# include <limits.h>
18791#else
18792# include <assert.h>
18793#endif
18794
18795#undef lchflags
18796
18797/* Override any GCC internal prototype to avoid an error.
18798 Use char because int might match the return type of a GCC
18799 builtin and then its argument prototype would still apply. */
18800#ifdef __cplusplus
18801extern "C"
18802#endif
18803char lchflags ();
18804/* The GNU C library defines this for functions which it implements
18805 to always fail with ENOSYS. Some functions are actually named
18806 something starting with __ and the normal name is an alias. */
18807#if defined __stub_lchflags || defined __stub___lchflags
18808choke me
18809#endif
18810
18811int
18812main ()
18813{
18814return lchflags ();
18815 ;
18816 return 0;
18817}
18818_ACEOF
18819rm -f conftest.$ac_objext conftest$ac_exeext
18820if { (ac_try="$ac_link"
18821case "(($ac_try" in
18822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18823 *) ac_try_echo=$ac_try;;
18824esac
18825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18826 (eval "$ac_link") 2>conftest.er1
18827 ac_status=$?
18828 grep -v '^ *+' conftest.er1 >conftest.err
18829 rm -f conftest.er1
18830 cat conftest.err >&5
18831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832 (exit $ac_status); } && {
18833 test -z "$ac_c_werror_flag" ||
18834 test ! -s conftest.err
18835 } && test -s conftest$ac_exeext &&
18836 $as_test_x conftest$ac_exeext; then
18837 ac_cv_func_lchflags=yes
18838else
18839 echo "$as_me: failed program was:" >&5
18840sed 's/^/| /' conftest.$ac_ext >&5
18841
18842 ac_cv_func_lchflags=no
18843fi
18844
18845rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18846 conftest$ac_exeext conftest.$ac_ext
18847fi
18848{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18849echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18850if test $ac_cv_func_lchflags = yes; then
18851 ac_cv_have_lchflags="yes"
18852else
18853 ac_cv_have_lchflags="no"
18854fi
18855
18856fi
18857if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018858
18859cat >>confdefs.h <<\_ACEOF
18860#define HAVE_LCHFLAGS 1
18861_ACEOF
18862
18863fi
18864
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018865case $ac_sys_system/$ac_sys_release in
18866Darwin/*)
18867 _CUR_CFLAGS="${CFLAGS}"
18868 _CUR_LDFLAGS="${LDFLAGS}"
18869 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18870 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18871 ;;
18872esac
18873
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018874{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18875echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018876if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018877 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018878else
18879 ac_check_lib_save_LIBS=$LIBS
18880LIBS="-lz $LIBS"
18881cat >conftest.$ac_ext <<_ACEOF
18882/* confdefs.h. */
18883_ACEOF
18884cat confdefs.h >>conftest.$ac_ext
18885cat >>conftest.$ac_ext <<_ACEOF
18886/* end confdefs.h. */
18887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888/* Override any GCC internal prototype to avoid an error.
18889 Use char because int might match the return type of a GCC
18890 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018891#ifdef __cplusplus
18892extern "C"
18893#endif
18894char inflateCopy ();
18895int
18896main ()
18897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018899 ;
18900 return 0;
18901}
18902_ACEOF
18903rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018904if { (ac_try="$ac_link"
18905case "(($ac_try" in
18906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18907 *) ac_try_echo=$ac_try;;
18908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018911 ac_status=$?
18912 grep -v '^ *+' conftest.er1 >conftest.err
18913 rm -f conftest.er1
18914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018916 (exit $ac_status); } && {
18917 test -z "$ac_c_werror_flag" ||
18918 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018919 } && test -s conftest$ac_exeext &&
18920 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018921 ac_cv_lib_z_inflateCopy=yes
18922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018923 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018924sed 's/^/| /' conftest.$ac_ext >&5
18925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018928
18929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018930 conftest$ac_exeext conftest.$ac_ext
18931LIBS=$ac_check_lib_save_LIBS
18932fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018933{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18934echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18935if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018936
18937cat >>confdefs.h <<\_ACEOF
18938#define HAVE_ZLIB_COPY 1
18939_ACEOF
18940
18941fi
18942
18943
18944case $ac_sys_system/$ac_sys_release in
18945Darwin/*)
18946 CFLAGS="${_CUR_CFLAGS}"
18947 LDFLAGS="${_CUR_LDFLAGS}"
18948 ;;
18949esac
18950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018951{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18952echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018954/* confdefs.h. */
18955_ACEOF
18956cat confdefs.h >>conftest.$ac_ext
18957cat >>conftest.$ac_ext <<_ACEOF
18958/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018959
18960#include "confdefs.h"
18961#include <netdb.h>
18962
Martin v. Löwise9416172003-05-03 10:12:45 +000018963int
18964main ()
18965{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018966void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018967 ;
18968 return 0;
18969}
18970_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018971rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972if { (ac_try="$ac_link"
18973case "(($ac_try" in
18974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18975 *) ac_try_echo=$ac_try;;
18976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018980 grep -v '^ *+' conftest.er1 >conftest.err
18981 rm -f conftest.er1
18982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984 (exit $ac_status); } && {
18985 test -z "$ac_c_werror_flag" ||
18986 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018987 } && test -s conftest$ac_exeext &&
18988 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018989
18990cat >>confdefs.h <<\_ACEOF
18991#define HAVE_HSTRERROR 1
18992_ACEOF
18993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018994 { echo "$as_me:$LINENO: result: yes" >&5
18995echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018998sed 's/^/| /' conftest.$ac_ext >&5
18999
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019000 { echo "$as_me:$LINENO: result: no" >&5
19001echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019002
19003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019004
19005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019008{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19009echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019011/* confdefs.h. */
19012_ACEOF
19013cat confdefs.h >>conftest.$ac_ext
19014cat >>conftest.$ac_ext <<_ACEOF
19015/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019016
19017#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019018#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019019#include <sys/socket.h>
19020#include <netinet/in.h>
19021#include <arpa/inet.h>
19022
Martin v. Löwise9416172003-05-03 10:12:45 +000019023int
19024main ()
19025{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019026void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019027 ;
19028 return 0;
19029}
19030_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019032if { (ac_try="$ac_link"
19033case "(($ac_try" in
19034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19035 *) ac_try_echo=$ac_try;;
19036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 grep -v '^ *+' conftest.er1 >conftest.err
19041 rm -f conftest.er1
19042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044 (exit $ac_status); } && {
19045 test -z "$ac_c_werror_flag" ||
19046 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019047 } && test -s conftest$ac_exeext &&
19048 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019049
19050cat >>confdefs.h <<\_ACEOF
19051#define HAVE_INET_ATON 1
19052_ACEOF
19053
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019054 { echo "$as_me:$LINENO: result: yes" >&5
19055echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019058sed 's/^/| /' conftest.$ac_ext >&5
19059
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019060 { echo "$as_me:$LINENO: result: no" >&5
19061echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019062
19063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064
19065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019067
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019068{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19069echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019071/* confdefs.h. */
19072_ACEOF
19073cat confdefs.h >>conftest.$ac_ext
19074cat >>conftest.$ac_ext <<_ACEOF
19075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019076
19077#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019078#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019079#include <sys/socket.h>
19080#include <netinet/in.h>
19081#include <arpa/inet.h>
19082
Martin v. Löwise9416172003-05-03 10:12:45 +000019083int
19084main ()
19085{
19086void* p = inet_pton
19087 ;
19088 return 0;
19089}
19090_ACEOF
19091rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019092if { (ac_try="$ac_compile"
19093case "(($ac_try" in
19094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19095 *) ac_try_echo=$ac_try;;
19096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 grep -v '^ *+' conftest.er1 >conftest.err
19101 rm -f conftest.er1
19102 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104 (exit $ac_status); } && {
19105 test -z "$ac_c_werror_flag" ||
19106 test ! -s conftest.err
19107 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019108
19109cat >>confdefs.h <<\_ACEOF
19110#define HAVE_INET_PTON 1
19111_ACEOF
19112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019113 { echo "$as_me:$LINENO: result: yes" >&5
19114echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019117sed 's/^/| /' conftest.$ac_ext >&5
19118
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019119 { echo "$as_me:$LINENO: result: no" >&5
19120echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019121
19122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019123
19124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019125
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019126# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019127{ echo "$as_me:$LINENO: checking for setgroups" >&5
19128echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019130/* confdefs.h. */
19131_ACEOF
19132cat confdefs.h >>conftest.$ac_ext
19133cat >>conftest.$ac_ext <<_ACEOF
19134/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019135
19136#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019137#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019138#ifdef HAVE_GRP_H
19139#include <grp.h>
19140#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019141
Martin v. Löwisd5843682002-11-21 20:41:28 +000019142int
19143main ()
19144{
19145void* p = setgroups
19146 ;
19147 return 0;
19148}
19149_ACEOF
19150rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019151if { (ac_try="$ac_compile"
19152case "(($ac_try" in
19153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19154 *) ac_try_echo=$ac_try;;
19155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019159 grep -v '^ *+' conftest.er1 >conftest.err
19160 rm -f conftest.er1
19161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019163 (exit $ac_status); } && {
19164 test -z "$ac_c_werror_flag" ||
19165 test ! -s conftest.err
19166 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019167
19168cat >>confdefs.h <<\_ACEOF
19169#define HAVE_SETGROUPS 1
19170_ACEOF
19171
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019172 { echo "$as_me:$LINENO: result: yes" >&5
19173echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019176sed 's/^/| /' conftest.$ac_ext >&5
19177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019178 { echo "$as_me:$LINENO: result: no" >&5
19179echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019180
19181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019182
19183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019184
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019185# check for openpty and forkpty
19186
Martin v. Löwis11437992002-04-12 09:54:03 +000019187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019188for ac_func in openpty
19189do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19191{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019193if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019195else
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 cat >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öwis4ddc78a2006-01-29 09:53:44 +000019202/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19203 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19204#define $ac_func innocuous_$ac_func
19205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019206/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019207 which can conflict with char $ac_func (); below.
19208 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019209 <limits.h> exists even on freestanding compilers. */
19210
19211#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019212# include <limits.h>
19213#else
19214# include <assert.h>
19215#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019216
19217#undef $ac_func
19218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019219/* Override any GCC internal prototype to avoid an error.
19220 Use char because int might match the return type of a GCC
19221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019222#ifdef __cplusplus
19223extern "C"
19224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019225char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019226/* The GNU C library defines this for functions which it implements
19227 to always fail with ENOSYS. Some functions are actually named
19228 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019229#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019230choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019231#endif
19232
Skip Montanaro6dead952003-09-25 14:50:04 +000019233int
19234main ()
19235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019236return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019237 ;
19238 return 0;
19239}
19240_ACEOF
19241rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019242if { (ac_try="$ac_link"
19243case "(($ac_try" in
19244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19245 *) ac_try_echo=$ac_try;;
19246esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019250 grep -v '^ *+' conftest.er1 >conftest.err
19251 rm -f conftest.er1
19252 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019254 (exit $ac_status); } && {
19255 test -z "$ac_c_werror_flag" ||
19256 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019257 } && test -s conftest$ac_exeext &&
19258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262sed 's/^/| /' conftest.$ac_ext >&5
19263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019264 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019266
19267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019268 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019269fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019270ac_res=`eval echo '${'$as_ac_var'}'`
19271 { echo "$as_me:$LINENO: result: $ac_res" >&5
19272echo "${ECHO_T}$ac_res" >&6; }
19273if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019275#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019276_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019279 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19280echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019281if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019283else
Martin v. Löwis11437992002-04-12 09:54:03 +000019284 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019285LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019293/* Override any GCC internal prototype to avoid an error.
19294 Use char because int might match the return type of a GCC
19295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019296#ifdef __cplusplus
19297extern "C"
19298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019299char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019300int
19301main ()
19302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019303return openpty ();
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 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +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 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000019336LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019337fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019338{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19339echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19340if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019342#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019343_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019344 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019346 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19347echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019348if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019349 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019350else
19351 ac_check_lib_save_LIBS=$LIBS
19352LIBS="-lbsd $LIBS"
19353cat >conftest.$ac_ext <<_ACEOF
19354/* confdefs.h. */
19355_ACEOF
19356cat confdefs.h >>conftest.$ac_ext
19357cat >>conftest.$ac_ext <<_ACEOF
19358/* end confdefs.h. */
19359
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öwisfd9a72a2006-01-08 10:07:33 +000019363#ifdef __cplusplus
19364extern "C"
19365#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019366char openpty ();
19367int
19368main ()
19369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019370return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +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öwisfd9a72a2006-01-08 10:07:33 +000019383 ac_status=$?
19384 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öwisfd9a72a2006-01-08 10:07:33 +000019393 ac_cv_lib_bsd_openpty=yes
19394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019395 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019396sed 's/^/| /' conftest.$ac_ext >&5
19397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398 ac_cv_lib_bsd_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 \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019402 conftest$ac_exeext conftest.$ac_ext
19403LIBS=$ac_check_lib_save_LIBS
19404fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019405{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19406echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19407if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019408 cat >>confdefs.h <<\_ACEOF
19409#define HAVE_OPENPTY 1
19410_ACEOF
19411 LIBS="$LIBS -lbsd"
19412fi
19413
19414
19415fi
19416
Fred Drake8cef4cf2000-06-28 16:40:38 +000019417
19418fi
19419done
19420
Martin v. Löwis11437992002-04-12 09:54:03 +000019421
Fred Drake8cef4cf2000-06-28 16:40:38 +000019422for ac_func in forkpty
19423do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19425{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019428 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019429else
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019431/* confdefs.h. */
19432_ACEOF
19433cat confdefs.h >>conftest.$ac_ext
19434cat >>conftest.$ac_ext <<_ACEOF
19435/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019436/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19437 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19438#define $ac_func innocuous_$ac_func
19439
Fred Drake8cef4cf2000-06-28 16:40:38 +000019440/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019441 which can conflict with char $ac_func (); below.
19442 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019443 <limits.h> exists even on freestanding compilers. */
19444
19445#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019446# include <limits.h>
19447#else
19448# include <assert.h>
19449#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019450
19451#undef $ac_func
19452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019453/* Override any GCC internal prototype to avoid an error.
19454 Use char because int might match the return type of a GCC
19455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019456#ifdef __cplusplus
19457extern "C"
19458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019459char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019460/* The GNU C library defines this for functions which it implements
19461 to always fail with ENOSYS. Some functions are actually named
19462 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019463#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019464choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019465#endif
19466
Skip Montanaro6dead952003-09-25 14:50:04 +000019467int
19468main ()
19469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019470return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019471 ;
19472 return 0;
19473}
19474_ACEOF
19475rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019476if { (ac_try="$ac_link"
19477case "(($ac_try" in
19478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19479 *) ac_try_echo=$ac_try;;
19480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019484 grep -v '^ *+' conftest.er1 >conftest.err
19485 rm -f conftest.er1
19486 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019488 (exit $ac_status); } && {
19489 test -z "$ac_c_werror_flag" ||
19490 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019491 } && test -s conftest$ac_exeext &&
19492 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019494else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019496sed 's/^/| /' conftest.$ac_ext >&5
19497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019498 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019500
19501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019503fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019504ac_res=`eval echo '${'$as_ac_var'}'`
19505 { echo "$as_me:$LINENO: result: $ac_res" >&5
19506echo "${ECHO_T}$ac_res" >&6; }
19507if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019509#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019510_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019511
Fred Drake8cef4cf2000-06-28 16:40:38 +000019512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019513 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19514echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019515if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019516 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019517else
Martin v. Löwis11437992002-04-12 09:54:03 +000019518 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019519LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019527/* Override any GCC internal prototype to avoid an error.
19528 Use char because int might match the return type of a GCC
19529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019530#ifdef __cplusplus
19531extern "C"
19532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019533char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019534int
19535main ()
19536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019537return forkpty ();
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 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +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 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000019570LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019572{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19573echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19574if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019575 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019576#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019577_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019578 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019580 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19581echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019582if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019584else
19585 ac_check_lib_save_LIBS=$LIBS
19586LIBS="-lbsd $LIBS"
19587cat >conftest.$ac_ext <<_ACEOF
19588/* confdefs.h. */
19589_ACEOF
19590cat confdefs.h >>conftest.$ac_ext
19591cat >>conftest.$ac_ext <<_ACEOF
19592/* end confdefs.h. */
19593
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öwisfd9a72a2006-01-08 10:07:33 +000019597#ifdef __cplusplus
19598extern "C"
19599#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019600char forkpty ();
19601int
19602main ()
19603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019604return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +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öwisfd9a72a2006-01-08 10:07:33 +000019617 ac_status=$?
19618 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öwisfd9a72a2006-01-08 10:07:33 +000019627 ac_cv_lib_bsd_forkpty=yes
19628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019629 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019630sed 's/^/| /' conftest.$ac_ext >&5
19631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019632 ac_cv_lib_bsd_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 \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019636 conftest$ac_exeext conftest.$ac_ext
19637LIBS=$ac_check_lib_save_LIBS
19638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019639{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19640echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19641if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019642 cat >>confdefs.h <<\_ACEOF
19643#define HAVE_FORKPTY 1
19644_ACEOF
19645 LIBS="$LIBS -lbsd"
19646fi
19647
19648
19649fi
19650
Fred Drake8cef4cf2000-06-28 16:40:38 +000019651
19652fi
19653done
19654
Jack Jansendd19cf82001-12-06 22:36:17 +000019655
Christian Heimesb186d002008-03-18 15:15:01 +000019656# Stuff for expat.
19657
19658for ac_func in memmove
19659do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19661{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019664 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019665else
19666 cat >conftest.$ac_ext <<_ACEOF
19667/* confdefs.h. */
19668_ACEOF
19669cat confdefs.h >>conftest.$ac_ext
19670cat >>conftest.$ac_ext <<_ACEOF
19671/* end confdefs.h. */
19672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19674#define $ac_func innocuous_$ac_func
19675
19676/* System header to define __stub macros and hopefully few prototypes,
19677 which can conflict with char $ac_func (); below.
19678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19679 <limits.h> exists even on freestanding compilers. */
19680
19681#ifdef __STDC__
19682# include <limits.h>
19683#else
19684# include <assert.h>
19685#endif
19686
19687#undef $ac_func
19688
19689/* Override any GCC internal prototype to avoid an error.
19690 Use char because int might match the return type of a GCC
19691 builtin and then its argument prototype would still apply. */
19692#ifdef __cplusplus
19693extern "C"
19694#endif
19695char $ac_func ();
19696/* The GNU C library defines this for functions which it implements
19697 to always fail with ENOSYS. Some functions are actually named
19698 something starting with __ and the normal name is an alias. */
19699#if defined __stub_$ac_func || defined __stub___$ac_func
19700choke me
19701#endif
19702
19703int
19704main ()
19705{
19706return $ac_func ();
19707 ;
19708 return 0;
19709}
19710_ACEOF
19711rm -f conftest.$ac_objext conftest$ac_exeext
19712if { (ac_try="$ac_link"
19713case "(($ac_try" in
19714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19715 *) ac_try_echo=$ac_try;;
19716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019718 (eval "$ac_link") 2>conftest.er1
19719 ac_status=$?
19720 grep -v '^ *+' conftest.er1 >conftest.err
19721 rm -f conftest.er1
19722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019724 (exit $ac_status); } && {
19725 test -z "$ac_c_werror_flag" ||
19726 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019727 } && test -s conftest$ac_exeext &&
19728 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019729 eval "$as_ac_var=yes"
19730else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019731 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019732sed 's/^/| /' conftest.$ac_ext >&5
19733
19734 eval "$as_ac_var=no"
19735fi
19736
19737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19738 conftest$ac_exeext conftest.$ac_ext
19739fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019740ac_res=`eval echo '${'$as_ac_var'}'`
19741 { echo "$as_me:$LINENO: result: $ac_res" >&5
19742echo "${ECHO_T}$ac_res" >&6; }
19743if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019744 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019746_ACEOF
19747
19748fi
19749done
19750
19751
Michael W. Hudson54241132001-12-07 15:38:26 +000019752# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019753
19754
19755
19756
19757
19758
Fred Drake8cef4cf2000-06-28 16:40:38 +000019759for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19760do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19762{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019764if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019766else
Martin v. Löwis11437992002-04-12 09:54:03 +000019767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019768/* confdefs.h. */
19769_ACEOF
19770cat confdefs.h >>conftest.$ac_ext
19771cat >>conftest.$ac_ext <<_ACEOF
19772/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19775#define $ac_func innocuous_$ac_func
19776
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019777/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019778 which can conflict with char $ac_func (); below.
19779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019780 <limits.h> exists even on freestanding compilers. */
19781
19782#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019783# include <limits.h>
19784#else
19785# include <assert.h>
19786#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019787
19788#undef $ac_func
19789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790/* Override any GCC internal prototype to avoid an error.
19791 Use char because int might match the return type of a GCC
19792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019793#ifdef __cplusplus
19794extern "C"
19795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019796char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019797/* The GNU C library defines this for functions which it implements
19798 to always fail with ENOSYS. Some functions are actually named
19799 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019800#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019801choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019802#endif
19803
Skip Montanaro6dead952003-09-25 14:50:04 +000019804int
19805main ()
19806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019807return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 ;
19809 return 0;
19810}
19811_ACEOF
19812rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019813if { (ac_try="$ac_link"
19814case "(($ac_try" in
19815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19816 *) ac_try_echo=$ac_try;;
19817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019819 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019821 grep -v '^ *+' conftest.er1 >conftest.err
19822 rm -f conftest.er1
19823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825 (exit $ac_status); } && {
19826 test -z "$ac_c_werror_flag" ||
19827 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019828 } && test -s conftest$ac_exeext &&
19829 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019830 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019831else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019833sed 's/^/| /' conftest.$ac_ext >&5
19834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019835 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019837
19838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019840fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019841ac_res=`eval echo '${'$as_ac_var'}'`
19842 { echo "$as_me:$LINENO: result: $ac_res" >&5
19843echo "${ECHO_T}$ac_res" >&6; }
19844if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019847_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019849fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019850done
19851
Michael W. Hudson54241132001-12-07 15:38:26 +000019852
Martin v. Löwis11437992002-04-12 09:54:03 +000019853
19854
19855
Christian Heimesb186d002008-03-18 15:15:01 +000019856for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019857do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019858as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19859{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19860echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019861if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019863else
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019865/* confdefs.h. */
19866_ACEOF
19867cat confdefs.h >>conftest.$ac_ext
19868cat >>conftest.$ac_ext <<_ACEOF
19869/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019870/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19871 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19872#define $ac_func innocuous_$ac_func
19873
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019874/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019875 which can conflict with char $ac_func (); below.
19876 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019877 <limits.h> exists even on freestanding compilers. */
19878
19879#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019880# include <limits.h>
19881#else
19882# include <assert.h>
19883#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019884
19885#undef $ac_func
19886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019887/* Override any GCC internal prototype to avoid an error.
19888 Use char because int might match the return type of a GCC
19889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019890#ifdef __cplusplus
19891extern "C"
19892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019893char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019894/* The GNU C library defines this for functions which it implements
19895 to always fail with ENOSYS. Some functions are actually named
19896 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019897#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019898choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019899#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019900
Skip Montanaro6dead952003-09-25 14:50:04 +000019901int
19902main ()
19903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019905 ;
19906 return 0;
19907}
19908_ACEOF
19909rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019910if { (ac_try="$ac_link"
19911case "(($ac_try" in
19912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19913 *) ac_try_echo=$ac_try;;
19914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019918 grep -v '^ *+' conftest.er1 >conftest.err
19919 rm -f conftest.er1
19920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019922 (exit $ac_status); } && {
19923 test -z "$ac_c_werror_flag" ||
19924 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019925 } && test -s conftest$ac_exeext &&
19926 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019930sed 's/^/| /' conftest.$ac_ext >&5
19931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019932 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019934
19935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019938ac_res=`eval echo '${'$as_ac_var'}'`
19939 { echo "$as_me:$LINENO: result: $ac_res" >&5
19940echo "${ECHO_T}$ac_res" >&6; }
19941if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019943#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019944_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019945
Martin v. Löwis1142de32002-03-29 16:28:31 +000019946else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019947 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019948 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019949 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19950 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019951esac
19952
Martin v. Löwis1142de32002-03-29 16:28:31 +000019953fi
19954done
19955
19956
Martin v. Löwis11437992002-04-12 09:54:03 +000019957
Martin v. Löwis1142de32002-03-29 16:28:31 +000019958for ac_func in getpgrp
19959do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19961{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019963if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019965else
Martin v. Löwis11437992002-04-12 09:54:03 +000019966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019967/* confdefs.h. */
19968_ACEOF
19969cat confdefs.h >>conftest.$ac_ext
19970cat >>conftest.$ac_ext <<_ACEOF
19971/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019972/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19973 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19974#define $ac_func innocuous_$ac_func
19975
Martin v. Löwis1142de32002-03-29 16:28:31 +000019976/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019977 which can conflict with char $ac_func (); below.
19978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019979 <limits.h> exists even on freestanding compilers. */
19980
19981#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019982# include <limits.h>
19983#else
19984# include <assert.h>
19985#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019986
19987#undef $ac_func
19988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019989/* Override any GCC internal prototype to avoid an error.
19990 Use char because int might match the return type of a GCC
19991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019992#ifdef __cplusplus
19993extern "C"
19994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019995char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019996/* The GNU C library defines this for functions which it implements
19997 to always fail with ENOSYS. Some functions are actually named
19998 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019999#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020000choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020001#endif
20002
Skip Montanaro6dead952003-09-25 14:50:04 +000020003int
20004main ()
20005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020006return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020007 ;
20008 return 0;
20009}
20010_ACEOF
20011rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020012if { (ac_try="$ac_link"
20013case "(($ac_try" in
20014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20015 *) ac_try_echo=$ac_try;;
20016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020 grep -v '^ *+' conftest.er1 >conftest.err
20021 rm -f conftest.er1
20022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020024 (exit $ac_status); } && {
20025 test -z "$ac_c_werror_flag" ||
20026 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020027 } && test -s conftest$ac_exeext &&
20028 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020029 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020032sed 's/^/| /' conftest.$ac_ext >&5
20033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020034 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020036
20037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020038 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020039fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020040ac_res=`eval echo '${'$as_ac_var'}'`
20041 { echo "$as_me:$LINENO: result: $ac_res" >&5
20042echo "${ECHO_T}$ac_res" >&6; }
20043if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020046_ACEOF
20047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020048/* confdefs.h. */
20049_ACEOF
20050cat confdefs.h >>conftest.$ac_ext
20051cat >>conftest.$ac_ext <<_ACEOF
20052/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020053#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020054int
20055main ()
20056{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020057getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 ;
20059 return 0;
20060}
20061_ACEOF
20062rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020063if { (ac_try="$ac_compile"
20064case "(($ac_try" in
20065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20066 *) ac_try_echo=$ac_try;;
20067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020071 grep -v '^ *+' conftest.er1 >conftest.err
20072 rm -f conftest.er1
20073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020075 (exit $ac_status); } && {
20076 test -z "$ac_c_werror_flag" ||
20077 test ! -s conftest.err
20078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020079
20080cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020081#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020082_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020083
Martin v. Löwis11437992002-04-12 09:54:03 +000020084
Guido van Rossumf78abae1997-01-21 22:02:36 +000020085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020087sed 's/^/| /' conftest.$ac_ext >&5
20088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089
Guido van Rossum627b2d71993-12-24 10:39:16 +000020090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020091
20092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020093
Guido van Rossum627b2d71993-12-24 10:39:16 +000020094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020095done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020096
Jack Jansen150753c2003-03-29 22:07:47 +000020097
20098for ac_func in setpgrp
20099do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020100as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20101{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20102echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020103if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020105else
Martin v. Löwis11437992002-04-12 09:54:03 +000020106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020107/* confdefs.h. */
20108_ACEOF
20109cat confdefs.h >>conftest.$ac_ext
20110cat >>conftest.$ac_ext <<_ACEOF
20111/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020112/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20113 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20114#define $ac_func innocuous_$ac_func
20115
Jack Jansen150753c2003-03-29 22:07:47 +000020116/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020117 which can conflict with char $ac_func (); below.
20118 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020119 <limits.h> exists even on freestanding compilers. */
20120
20121#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020122# include <limits.h>
20123#else
20124# include <assert.h>
20125#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020126
20127#undef $ac_func
20128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020129/* Override any GCC internal prototype to avoid an error.
20130 Use char because int might match the return type of a GCC
20131 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020132#ifdef __cplusplus
20133extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020134#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020135char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020136/* The GNU C library defines this for functions which it implements
20137 to always fail with ENOSYS. Some functions are actually named
20138 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020139#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020140choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020141#endif
20142
Skip Montanaro6dead952003-09-25 14:50:04 +000020143int
20144main ()
20145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 ;
20148 return 0;
20149}
20150_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020151rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152if { (ac_try="$ac_link"
20153case "(($ac_try" in
20154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20155 *) ac_try_echo=$ac_try;;
20156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020160 grep -v '^ *+' conftest.er1 >conftest.err
20161 rm -f conftest.er1
20162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020164 (exit $ac_status); } && {
20165 test -z "$ac_c_werror_flag" ||
20166 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020167 } && test -s conftest$ac_exeext &&
20168 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020169 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020172sed 's/^/| /' conftest.$ac_ext >&5
20173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020174 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020176
20177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020178 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020179fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020180ac_res=`eval echo '${'$as_ac_var'}'`
20181 { echo "$as_me:$LINENO: result: $ac_res" >&5
20182echo "${ECHO_T}$ac_res" >&6; }
20183if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020184 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020185#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020186_ACEOF
20187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020188/* confdefs.h. */
20189_ACEOF
20190cat confdefs.h >>conftest.$ac_ext
20191cat >>conftest.$ac_ext <<_ACEOF
20192/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020193#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020194int
20195main ()
20196{
20197setpgrp(0,0);
20198 ;
20199 return 0;
20200}
20201_ACEOF
20202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020203if { (ac_try="$ac_compile"
20204case "(($ac_try" in
20205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20206 *) ac_try_echo=$ac_try;;
20207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020209 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020211 grep -v '^ *+' conftest.er1 >conftest.err
20212 rm -f conftest.er1
20213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020215 (exit $ac_status); } && {
20216 test -z "$ac_c_werror_flag" ||
20217 test ! -s conftest.err
20218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020219
20220cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020221#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020222_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020223
Jack Jansen150753c2003-03-29 22:07:47 +000020224
20225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020227sed 's/^/| /' conftest.$ac_ext >&5
20228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020231
20232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020233
20234fi
20235done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020236
Martin v. Löwis11437992002-04-12 09:54:03 +000020237
Thomas Wouters3a584202000-08-05 23:28:51 +000020238for ac_func in gettimeofday
20239do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020240as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20241{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20242echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020245else
Martin v. Löwis11437992002-04-12 09:54:03 +000020246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020247/* confdefs.h. */
20248_ACEOF
20249cat confdefs.h >>conftest.$ac_ext
20250cat >>conftest.$ac_ext <<_ACEOF
20251/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020252/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20253 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20254#define $ac_func innocuous_$ac_func
20255
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020256/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020257 which can conflict with char $ac_func (); below.
20258 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020259 <limits.h> exists even on freestanding compilers. */
20260
20261#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020262# include <limits.h>
20263#else
20264# include <assert.h>
20265#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020266
20267#undef $ac_func
20268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020269/* Override any GCC internal prototype to avoid an error.
20270 Use char because int might match the return type of a GCC
20271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020272#ifdef __cplusplus
20273extern "C"
20274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020275char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020276/* The GNU C library defines this for functions which it implements
20277 to always fail with ENOSYS. Some functions are actually named
20278 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020279#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020280choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020281#endif
20282
Skip Montanaro6dead952003-09-25 14:50:04 +000020283int
20284main ()
20285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020286return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020287 ;
20288 return 0;
20289}
20290_ACEOF
20291rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020292if { (ac_try="$ac_link"
20293case "(($ac_try" in
20294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20295 *) ac_try_echo=$ac_try;;
20296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020300 grep -v '^ *+' conftest.er1 >conftest.err
20301 rm -f conftest.er1
20302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020304 (exit $ac_status); } && {
20305 test -z "$ac_c_werror_flag" ||
20306 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020307 } && test -s conftest$ac_exeext &&
20308 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020309 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020312sed 's/^/| /' conftest.$ac_ext >&5
20313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020316
20317rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020318 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020319fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020320ac_res=`eval echo '${'$as_ac_var'}'`
20321 { echo "$as_me:$LINENO: result: $ac_res" >&5
20322echo "${ECHO_T}$ac_res" >&6; }
20323if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020324 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020325#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020326_ACEOF
20327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020328/* confdefs.h. */
20329_ACEOF
20330cat confdefs.h >>conftest.$ac_ext
20331cat >>conftest.$ac_ext <<_ACEOF
20332/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020333#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020334int
20335main ()
20336{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020337gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020338 ;
20339 return 0;
20340}
20341_ACEOF
20342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343if { (ac_try="$ac_compile"
20344case "(($ac_try" in
20345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20346 *) ac_try_echo=$ac_try;;
20347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020351 grep -v '^ *+' conftest.er1 >conftest.err
20352 rm -f conftest.er1
20353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020355 (exit $ac_status); } && {
20356 test -z "$ac_c_werror_flag" ||
20357 test ! -s conftest.err
20358 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020359 :
20360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020362sed 's/^/| /' conftest.$ac_ext >&5
20363
Martin v. Löwis11437992002-04-12 09:54:03 +000020364
20365cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020366#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020367_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020368
Martin v. Löwis11437992002-04-12 09:54:03 +000020369
Guido van Rossum627b2d71993-12-24 10:39:16 +000020370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371
20372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020374fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020375done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020376
Michael W. Hudson54241132001-12-07 15:38:26 +000020377
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020378{ echo "$as_me:$LINENO: checking for major" >&5
20379echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020381/* confdefs.h. */
20382_ACEOF
20383cat confdefs.h >>conftest.$ac_ext
20384cat >>conftest.$ac_ext <<_ACEOF
20385/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020386
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020387#if defined(MAJOR_IN_MKDEV)
20388#include <sys/mkdev.h>
20389#elif defined(MAJOR_IN_SYSMACROS)
20390#include <sys/sysmacros.h>
20391#else
20392#include <sys/types.h>
20393#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020394
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020395int
20396main ()
20397{
20398
20399 makedev(major(0),minor(0));
20400
20401 ;
20402 return 0;
20403}
20404_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020405rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020406if { (ac_try="$ac_link"
20407case "(($ac_try" in
20408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20409 *) ac_try_echo=$ac_try;;
20410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020414 grep -v '^ *+' conftest.er1 >conftest.err
20415 rm -f conftest.er1
20416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020418 (exit $ac_status); } && {
20419 test -z "$ac_c_werror_flag" ||
20420 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020421 } && test -s conftest$ac_exeext &&
20422 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020423
20424
20425cat >>confdefs.h <<\_ACEOF
20426#define HAVE_DEVICE_MACROS 1
20427_ACEOF
20428
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020429 { echo "$as_me:$LINENO: result: yes" >&5
20430echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020431
20432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020434sed 's/^/| /' conftest.$ac_ext >&5
20435
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020436
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020437 { echo "$as_me:$LINENO: result: no" >&5
20438echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020439
20440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020441
20442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020443 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020444
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020445# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020446# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020447{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20448echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020450/* confdefs.h. */
20451_ACEOF
20452cat confdefs.h >>conftest.$ac_ext
20453cat >>conftest.$ac_ext <<_ACEOF
20454/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020455
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020456#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020457#include <sys/socket.h>
20458#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020459#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020460
Martin v. Löwis11437992002-04-12 09:54:03 +000020461int
20462main ()
20463{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020464getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020465 ;
20466 return 0;
20467}
20468_ACEOF
20469rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020470if { (ac_try="$ac_link"
20471case "(($ac_try" in
20472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20473 *) ac_try_echo=$ac_try;;
20474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020478 grep -v '^ *+' conftest.er1 >conftest.err
20479 rm -f conftest.er1
20480 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020482 (exit $ac_status); } && {
20483 test -z "$ac_c_werror_flag" ||
20484 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020485 } && test -s conftest$ac_exeext &&
20486 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020487 have_getaddrinfo=yes
20488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020489 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020490sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020491
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020492 have_getaddrinfo=no
20493fi
20494
20495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20496 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020497{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20498echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020499if test $have_getaddrinfo = yes
20500then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020501 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20502echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020503 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020504 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020505else
20506 if test "$cross_compiling" = yes; then
20507 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020508else
Martin v. Löwis11437992002-04-12 09:54:03 +000020509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020510/* confdefs.h. */
20511_ACEOF
20512cat confdefs.h >>conftest.$ac_ext
20513cat >>conftest.$ac_ext <<_ACEOF
20514/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020515
20516#include <sys/types.h>
20517#include <netdb.h>
20518#include <string.h>
20519#include <sys/socket.h>
20520#include <netinet/in.h>
20521
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020522int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020523{
20524 int passive, gaierr, inet4 = 0, inet6 = 0;
20525 struct addrinfo hints, *ai, *aitop;
20526 char straddr[INET6_ADDRSTRLEN], strport[16];
20527
20528 for (passive = 0; passive <= 1; passive++) {
20529 memset(&hints, 0, sizeof(hints));
20530 hints.ai_family = AF_UNSPEC;
20531 hints.ai_flags = passive ? AI_PASSIVE : 0;
20532 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020533 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020534 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20535 (void)gai_strerror(gaierr);
20536 goto bad;
20537 }
20538 for (ai = aitop; ai; ai = ai->ai_next) {
20539 if (ai->ai_addr == NULL ||
20540 ai->ai_addrlen == 0 ||
20541 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20542 straddr, sizeof(straddr), strport, sizeof(strport),
20543 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20544 goto bad;
20545 }
20546 switch (ai->ai_family) {
20547 case AF_INET:
20548 if (strcmp(strport, "54321") != 0) {
20549 goto bad;
20550 }
20551 if (passive) {
20552 if (strcmp(straddr, "0.0.0.0") != 0) {
20553 goto bad;
20554 }
20555 } else {
20556 if (strcmp(straddr, "127.0.0.1") != 0) {
20557 goto bad;
20558 }
20559 }
20560 inet4++;
20561 break;
20562 case AF_INET6:
20563 if (strcmp(strport, "54321") != 0) {
20564 goto bad;
20565 }
20566 if (passive) {
20567 if (strcmp(straddr, "::") != 0) {
20568 goto bad;
20569 }
20570 } else {
20571 if (strcmp(straddr, "::1") != 0) {
20572 goto bad;
20573 }
20574 }
20575 inet6++;
20576 break;
20577 case AF_UNSPEC:
20578 goto bad;
20579 break;
20580 default:
20581 /* another family support? */
20582 break;
20583 }
20584 }
20585 }
20586
20587 if (!(inet4 == 0 || inet4 == 2))
20588 goto bad;
20589 if (!(inet6 == 0 || inet6 == 2))
20590 goto bad;
20591
20592 if (aitop)
20593 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020594 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020595
20596 bad:
20597 if (aitop)
20598 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020599 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020600}
20601
Martin v. Löwis11437992002-04-12 09:54:03 +000020602_ACEOF
20603rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020604if { (ac_try="$ac_link"
20605case "(($ac_try" in
20606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20607 *) ac_try_echo=$ac_try;;
20608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020610 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020614 { (case "(($ac_try" in
20615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20616 *) ac_try_echo=$ac_try;;
20617esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020619 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020623 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020625 echo "$as_me: program exited with status $ac_status" >&5
20626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020627sed 's/^/| /' conftest.$ac_ext >&5
20628
Martin v. Löwis11437992002-04-12 09:54:03 +000020629( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020630ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020632rm -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 +000020633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020634
20635
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020636fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020637
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639
Mark Dickinson2df5d282009-12-31 21:22:50 +000020640if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020641then
20642 if test $ipv6 = yes
20643 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020644 echo 'Fatal: You must get working getaddrinfo() function.'
20645 echo ' or you can specify "--disable-ipv6"'.
20646 exit 1
20647 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020648else
Martin v. Löwis11437992002-04-12 09:54:03 +000020649
20650cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020651#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020652_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020653
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020655
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020656for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020657do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20659{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020663else
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020665/* confdefs.h. */
20666_ACEOF
20667cat confdefs.h >>conftest.$ac_ext
20668cat >>conftest.$ac_ext <<_ACEOF
20669/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020670/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20671 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20672#define $ac_func innocuous_$ac_func
20673
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020674/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020675 which can conflict with char $ac_func (); below.
20676 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020677 <limits.h> exists even on freestanding compilers. */
20678
20679#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020680# include <limits.h>
20681#else
20682# include <assert.h>
20683#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020684
20685#undef $ac_func
20686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687/* Override any GCC internal prototype to avoid an error.
20688 Use char because int might match the return type of a GCC
20689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020690#ifdef __cplusplus
20691extern "C"
20692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020693char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020694/* The GNU C library defines this for functions which it implements
20695 to always fail with ENOSYS. Some functions are actually named
20696 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020697#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020698choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020699#endif
20700
Skip Montanaro6dead952003-09-25 14:50:04 +000020701int
20702main ()
20703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020705 ;
20706 return 0;
20707}
20708_ACEOF
20709rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020710if { (ac_try="$ac_link"
20711case "(($ac_try" in
20712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20713 *) ac_try_echo=$ac_try;;
20714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020716 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020718 grep -v '^ *+' conftest.er1 >conftest.err
20719 rm -f conftest.er1
20720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020722 (exit $ac_status); } && {
20723 test -z "$ac_c_werror_flag" ||
20724 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020725 } && test -s conftest$ac_exeext &&
20726 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020727 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020730sed 's/^/| /' conftest.$ac_ext >&5
20731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020732 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020734
20735rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020736 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020738ac_res=`eval echo '${'$as_ac_var'}'`
20739 { echo "$as_me:$LINENO: result: $ac_res" >&5
20740echo "${ECHO_T}$ac_res" >&6; }
20741if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020742 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020743#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020744_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020745
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746fi
20747done
20748
Michael W. Hudson54241132001-12-07 15:38:26 +000020749
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020750# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020751{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20752echo $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 +000020753if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755else
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020757/* confdefs.h. */
20758_ACEOF
20759cat confdefs.h >>conftest.$ac_ext
20760cat >>conftest.$ac_ext <<_ACEOF
20761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762#include <sys/types.h>
20763#include <sys/time.h>
20764#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020765
Martin v. Löwis11437992002-04-12 09:54:03 +000020766int
20767main ()
20768{
20769if ((struct tm *) 0)
20770return 0;
20771 ;
20772 return 0;
20773}
20774_ACEOF
20775rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020776if { (ac_try="$ac_compile"
20777case "(($ac_try" in
20778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20779 *) ac_try_echo=$ac_try;;
20780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020784 grep -v '^ *+' conftest.er1 >conftest.err
20785 rm -f conftest.er1
20786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020788 (exit $ac_status); } && {
20789 test -z "$ac_c_werror_flag" ||
20790 test ! -s conftest.err
20791 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020792 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020795sed 's/^/| /' conftest.$ac_ext >&5
20796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020797 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799
20800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020801fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020802{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20803echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020804if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020805
20806cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020807#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020808_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020809
20810fi
20811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020812{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20813echo $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 +000020814if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020816else
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020818/* confdefs.h. */
20819_ACEOF
20820cat confdefs.h >>conftest.$ac_ext
20821cat >>conftest.$ac_ext <<_ACEOF
20822/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020823#include <sys/types.h>
20824#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
Martin v. Löwis11437992002-04-12 09:54:03 +000020826int
20827main ()
20828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020829struct tm tm;
20830 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020831 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 ;
20833 return 0;
20834}
20835_ACEOF
20836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020837if { (ac_try="$ac_compile"
20838case "(($ac_try" in
20839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20840 *) ac_try_echo=$ac_try;;
20841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020845 grep -v '^ *+' conftest.er1 >conftest.err
20846 rm -f conftest.er1
20847 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 (exit $ac_status); } && {
20850 test -z "$ac_c_werror_flag" ||
20851 test ! -s conftest.err
20852 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853 ac_cv_struct_tm=time.h
20854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020856sed 's/^/| /' conftest.$ac_ext >&5
20857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020862fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020863{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20864echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020865if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020866
20867cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020868#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020869_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020870
20871fi
20872
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020873{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20874echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020875if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020877else
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020879/* confdefs.h. */
20880_ACEOF
20881cat confdefs.h >>conftest.$ac_ext
20882cat >>conftest.$ac_ext <<_ACEOF
20883/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884#include <sys/types.h>
20885#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020886
20887
Martin v. Löwis11437992002-04-12 09:54:03 +000020888int
20889main ()
20890{
20891static struct tm ac_aggr;
20892if (ac_aggr.tm_zone)
20893return 0;
20894 ;
20895 return 0;
20896}
20897_ACEOF
20898rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899if { (ac_try="$ac_compile"
20900case "(($ac_try" in
20901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20902 *) ac_try_echo=$ac_try;;
20903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020907 grep -v '^ *+' conftest.er1 >conftest.err
20908 rm -f conftest.er1
20909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020911 (exit $ac_status); } && {
20912 test -z "$ac_c_werror_flag" ||
20913 test ! -s conftest.err
20914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020918sed 's/^/| /' conftest.$ac_ext >&5
20919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020921/* confdefs.h. */
20922_ACEOF
20923cat confdefs.h >>conftest.$ac_ext
20924cat >>conftest.$ac_ext <<_ACEOF
20925/* end confdefs.h. */
20926#include <sys/types.h>
20927#include <$ac_cv_struct_tm>
20928
20929
20930int
20931main ()
20932{
20933static struct tm ac_aggr;
20934if (sizeof ac_aggr.tm_zone)
20935return 0;
20936 ;
20937 return 0;
20938}
20939_ACEOF
20940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941if { (ac_try="$ac_compile"
20942case "(($ac_try" in
20943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20944 *) ac_try_echo=$ac_try;;
20945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020949 grep -v '^ *+' conftest.er1 >conftest.err
20950 rm -f conftest.er1
20951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020953 (exit $ac_status); } && {
20954 test -z "$ac_c_werror_flag" ||
20955 test ! -s conftest.err
20956 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020957 ac_cv_member_struct_tm_tm_zone=yes
20958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020960sed 's/^/| /' conftest.$ac_ext >&5
20961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020962 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020964
20965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020967
20968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020969fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020970{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20971echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20972if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020973
20974cat >>confdefs.h <<_ACEOF
20975#define HAVE_STRUCT_TM_TM_ZONE 1
20976_ACEOF
20977
20978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020980
Martin v. Löwis11437992002-04-12 09:54:03 +000020981if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20982
20983cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020984#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020985_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020986
20987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020988 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20989echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020990if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020991 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992else
20993 cat >conftest.$ac_ext <<_ACEOF
20994/* confdefs.h. */
20995_ACEOF
20996cat confdefs.h >>conftest.$ac_ext
20997cat >>conftest.$ac_ext <<_ACEOF
20998/* end confdefs.h. */
20999#include <time.h>
21000
21001int
21002main ()
21003{
21004#ifndef tzname
21005 (void) tzname;
21006#endif
21007
21008 ;
21009 return 0;
21010}
21011_ACEOF
21012rm -f conftest.$ac_objext
21013if { (ac_try="$ac_compile"
21014case "(($ac_try" in
21015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21016 *) ac_try_echo=$ac_try;;
21017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021019 (eval "$ac_compile") 2>conftest.er1
21020 ac_status=$?
21021 grep -v '^ *+' conftest.er1 >conftest.err
21022 rm -f conftest.er1
21023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021025 (exit $ac_status); } && {
21026 test -z "$ac_c_werror_flag" ||
21027 test ! -s conftest.err
21028 } && test -s conftest.$ac_objext; then
21029 ac_cv_have_decl_tzname=yes
21030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021031 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
21034 ac_cv_have_decl_tzname=no
21035fi
21036
21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21038fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021039{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21040echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21041if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021042
21043cat >>confdefs.h <<_ACEOF
21044#define HAVE_DECL_TZNAME 1
21045_ACEOF
21046
21047
21048else
21049 cat >>confdefs.h <<_ACEOF
21050#define HAVE_DECL_TZNAME 0
21051_ACEOF
21052
21053
21054fi
21055
21056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021057 { echo "$as_me:$LINENO: checking for tzname" >&5
21058echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021059if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021061else
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021063/* confdefs.h. */
21064_ACEOF
21065cat confdefs.h >>conftest.$ac_ext
21066cat >>conftest.$ac_ext <<_ACEOF
21067/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021068#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021069#if !HAVE_DECL_TZNAME
21070extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021072
Martin v. Löwis11437992002-04-12 09:54:03 +000021073int
21074main ()
21075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021076return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021077 ;
21078 return 0;
21079}
21080_ACEOF
21081rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021082if { (ac_try="$ac_link"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021097 } && test -s conftest$ac_exeext &&
21098 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021099 ac_cv_var_tzname=yes
21100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021102sed 's/^/| /' conftest.$ac_ext >&5
21103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021104 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021106
21107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021108 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021110{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21111echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021112 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021113
21114cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021115#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021116_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021117
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021118 fi
21119fi
21120
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021121{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21122echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021123if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021125else
21126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021127/* confdefs.h. */
21128_ACEOF
21129cat confdefs.h >>conftest.$ac_ext
21130cat >>conftest.$ac_ext <<_ACEOF
21131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021132$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021133int
21134main ()
21135{
21136static struct stat ac_aggr;
21137if (ac_aggr.st_rdev)
21138return 0;
21139 ;
21140 return 0;
21141}
21142_ACEOF
21143rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021144if { (ac_try="$ac_compile"
21145case "(($ac_try" in
21146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21147 *) ac_try_echo=$ac_try;;
21148esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021152 grep -v '^ *+' conftest.er1 >conftest.err
21153 rm -f conftest.er1
21154 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156 (exit $ac_status); } && {
21157 test -z "$ac_c_werror_flag" ||
21158 test ! -s conftest.err
21159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021160 ac_cv_member_struct_stat_st_rdev=yes
21161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021163sed 's/^/| /' conftest.$ac_ext >&5
21164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021166/* confdefs.h. */
21167_ACEOF
21168cat confdefs.h >>conftest.$ac_ext
21169cat >>conftest.$ac_ext <<_ACEOF
21170/* end confdefs.h. */
21171$ac_includes_default
21172int
21173main ()
21174{
21175static struct stat ac_aggr;
21176if (sizeof ac_aggr.st_rdev)
21177return 0;
21178 ;
21179 return 0;
21180}
21181_ACEOF
21182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021183if { (ac_try="$ac_compile"
21184case "(($ac_try" in
21185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21186 *) ac_try_echo=$ac_try;;
21187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021189 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021191 grep -v '^ *+' conftest.er1 >conftest.err
21192 rm -f conftest.er1
21193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021195 (exit $ac_status); } && {
21196 test -z "$ac_c_werror_flag" ||
21197 test ! -s conftest.err
21198 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021199 ac_cv_member_struct_stat_st_rdev=yes
21200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021202sed 's/^/| /' conftest.$ac_ext >&5
21203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021206
21207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021209
21210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021211fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021212{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21213echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21214if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021215
21216cat >>confdefs.h <<_ACEOF
21217#define HAVE_STRUCT_STAT_ST_RDEV 1
21218_ACEOF
21219
21220
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021221fi
21222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021223{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21224echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021225if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021227else
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021229/* confdefs.h. */
21230_ACEOF
21231cat confdefs.h >>conftest.$ac_ext
21232cat >>conftest.$ac_ext <<_ACEOF
21233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021234$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021235int
21236main ()
21237{
21238static struct stat ac_aggr;
21239if (ac_aggr.st_blksize)
21240return 0;
21241 ;
21242 return 0;
21243}
21244_ACEOF
21245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021246if { (ac_try="$ac_compile"
21247case "(($ac_try" in
21248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21249 *) ac_try_echo=$ac_try;;
21250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021254 grep -v '^ *+' conftest.er1 >conftest.err
21255 rm -f conftest.er1
21256 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258 (exit $ac_status); } && {
21259 test -z "$ac_c_werror_flag" ||
21260 test ! -s conftest.err
21261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021262 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021263else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021265sed 's/^/| /' conftest.$ac_ext >&5
21266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021268/* confdefs.h. */
21269_ACEOF
21270cat confdefs.h >>conftest.$ac_ext
21271cat >>conftest.$ac_ext <<_ACEOF
21272/* end confdefs.h. */
21273$ac_includes_default
21274int
21275main ()
21276{
21277static struct stat ac_aggr;
21278if (sizeof ac_aggr.st_blksize)
21279return 0;
21280 ;
21281 return 0;
21282}
21283_ACEOF
21284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021285if { (ac_try="$ac_compile"
21286case "(($ac_try" in
21287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21288 *) ac_try_echo=$ac_try;;
21289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021291 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021293 grep -v '^ *+' conftest.er1 >conftest.err
21294 rm -f conftest.er1
21295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021297 (exit $ac_status); } && {
21298 test -z "$ac_c_werror_flag" ||
21299 test ! -s conftest.err
21300 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021301 ac_cv_member_struct_stat_st_blksize=yes
21302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021304sed 's/^/| /' conftest.$ac_ext >&5
21305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021308
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311
21312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021313fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021314{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21315echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21316if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021317
Martin v. Löwis11437992002-04-12 09:54:03 +000021318cat >>confdefs.h <<_ACEOF
21319#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21320_ACEOF
21321
21322
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021323fi
21324
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021325{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21326echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021327if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021328 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021329else
21330 cat >conftest.$ac_ext <<_ACEOF
21331/* confdefs.h. */
21332_ACEOF
21333cat confdefs.h >>conftest.$ac_ext
21334cat >>conftest.$ac_ext <<_ACEOF
21335/* end confdefs.h. */
21336$ac_includes_default
21337int
21338main ()
21339{
21340static struct stat ac_aggr;
21341if (ac_aggr.st_flags)
21342return 0;
21343 ;
21344 return 0;
21345}
21346_ACEOF
21347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021348if { (ac_try="$ac_compile"
21349case "(($ac_try" in
21350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21351 *) ac_try_echo=$ac_try;;
21352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021354 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021355 ac_status=$?
21356 grep -v '^ *+' conftest.er1 >conftest.err
21357 rm -f conftest.er1
21358 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360 (exit $ac_status); } && {
21361 test -z "$ac_c_werror_flag" ||
21362 test ! -s conftest.err
21363 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021364 ac_cv_member_struct_stat_st_flags=yes
21365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021366 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021367sed 's/^/| /' conftest.$ac_ext >&5
21368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021370/* confdefs.h. */
21371_ACEOF
21372cat confdefs.h >>conftest.$ac_ext
21373cat >>conftest.$ac_ext <<_ACEOF
21374/* end confdefs.h. */
21375$ac_includes_default
21376int
21377main ()
21378{
21379static struct stat ac_aggr;
21380if (sizeof ac_aggr.st_flags)
21381return 0;
21382 ;
21383 return 0;
21384}
21385_ACEOF
21386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021387if { (ac_try="$ac_compile"
21388case "(($ac_try" in
21389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21390 *) ac_try_echo=$ac_try;;
21391esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021393 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021394 ac_status=$?
21395 grep -v '^ *+' conftest.er1 >conftest.err
21396 rm -f conftest.er1
21397 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399 (exit $ac_status); } && {
21400 test -z "$ac_c_werror_flag" ||
21401 test ! -s conftest.err
21402 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021403 ac_cv_member_struct_stat_st_flags=yes
21404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021405 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021406sed 's/^/| /' conftest.$ac_ext >&5
21407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021410
21411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413
21414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021415fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021416{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21417echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21418if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021419
21420cat >>confdefs.h <<_ACEOF
21421#define HAVE_STRUCT_STAT_ST_FLAGS 1
21422_ACEOF
21423
21424
21425fi
21426
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021427{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21428echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021429if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021431else
21432 cat >conftest.$ac_ext <<_ACEOF
21433/* confdefs.h. */
21434_ACEOF
21435cat confdefs.h >>conftest.$ac_ext
21436cat >>conftest.$ac_ext <<_ACEOF
21437/* end confdefs.h. */
21438$ac_includes_default
21439int
21440main ()
21441{
21442static struct stat ac_aggr;
21443if (ac_aggr.st_gen)
21444return 0;
21445 ;
21446 return 0;
21447}
21448_ACEOF
21449rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021450if { (ac_try="$ac_compile"
21451case "(($ac_try" in
21452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21453 *) ac_try_echo=$ac_try;;
21454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021457 ac_status=$?
21458 grep -v '^ *+' conftest.er1 >conftest.err
21459 rm -f conftest.er1
21460 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462 (exit $ac_status); } && {
21463 test -z "$ac_c_werror_flag" ||
21464 test ! -s conftest.err
21465 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021466 ac_cv_member_struct_stat_st_gen=yes
21467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021468 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021469sed 's/^/| /' conftest.$ac_ext >&5
21470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021471 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021472/* confdefs.h. */
21473_ACEOF
21474cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */
21477$ac_includes_default
21478int
21479main ()
21480{
21481static struct stat ac_aggr;
21482if (sizeof ac_aggr.st_gen)
21483return 0;
21484 ;
21485 return 0;
21486}
21487_ACEOF
21488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021489if { (ac_try="$ac_compile"
21490case "(($ac_try" in
21491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21492 *) ac_try_echo=$ac_try;;
21493esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021496 ac_status=$?
21497 grep -v '^ *+' conftest.er1 >conftest.err
21498 rm -f conftest.er1
21499 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021501 (exit $ac_status); } && {
21502 test -z "$ac_c_werror_flag" ||
21503 test ! -s conftest.err
21504 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021505 ac_cv_member_struct_stat_st_gen=yes
21506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021507 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021508sed 's/^/| /' conftest.$ac_ext >&5
21509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021512
21513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021515
21516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021517fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021518{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21519echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21520if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021521
21522cat >>confdefs.h <<_ACEOF
21523#define HAVE_STRUCT_STAT_ST_GEN 1
21524_ACEOF
21525
21526
21527fi
21528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021529{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21530echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021531if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021532 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021533else
21534 cat >conftest.$ac_ext <<_ACEOF
21535/* confdefs.h. */
21536_ACEOF
21537cat confdefs.h >>conftest.$ac_ext
21538cat >>conftest.$ac_ext <<_ACEOF
21539/* end confdefs.h. */
21540$ac_includes_default
21541int
21542main ()
21543{
21544static struct stat ac_aggr;
21545if (ac_aggr.st_birthtime)
21546return 0;
21547 ;
21548 return 0;
21549}
21550_ACEOF
21551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021552if { (ac_try="$ac_compile"
21553case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021559 ac_status=$?
21560 grep -v '^ *+' conftest.er1 >conftest.err
21561 rm -f conftest.er1
21562 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564 (exit $ac_status); } && {
21565 test -z "$ac_c_werror_flag" ||
21566 test ! -s conftest.err
21567 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021568 ac_cv_member_struct_stat_st_birthtime=yes
21569else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021570 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021571sed 's/^/| /' conftest.$ac_ext >&5
21572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021574/* confdefs.h. */
21575_ACEOF
21576cat confdefs.h >>conftest.$ac_ext
21577cat >>conftest.$ac_ext <<_ACEOF
21578/* end confdefs.h. */
21579$ac_includes_default
21580int
21581main ()
21582{
21583static struct stat ac_aggr;
21584if (sizeof ac_aggr.st_birthtime)
21585return 0;
21586 ;
21587 return 0;
21588}
21589_ACEOF
21590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021591if { (ac_try="$ac_compile"
21592case "(($ac_try" in
21593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21594 *) ac_try_echo=$ac_try;;
21595esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021598 ac_status=$?
21599 grep -v '^ *+' conftest.er1 >conftest.err
21600 rm -f conftest.er1
21601 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021603 (exit $ac_status); } && {
21604 test -z "$ac_c_werror_flag" ||
21605 test ! -s conftest.err
21606 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021607 ac_cv_member_struct_stat_st_birthtime=yes
21608else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021609 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021610sed 's/^/| /' conftest.$ac_ext >&5
21611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021614
21615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617
21618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021619fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021620{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21621echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21622if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021623
21624cat >>confdefs.h <<_ACEOF
21625#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21626_ACEOF
21627
21628
21629fi
21630
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021631{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21632echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021633if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021635else
Martin v. Löwis11437992002-04-12 09:54:03 +000021636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021637/* confdefs.h. */
21638_ACEOF
21639cat confdefs.h >>conftest.$ac_ext
21640cat >>conftest.$ac_ext <<_ACEOF
21641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021643int
21644main ()
21645{
21646static struct stat ac_aggr;
21647if (ac_aggr.st_blocks)
21648return 0;
21649 ;
21650 return 0;
21651}
21652_ACEOF
21653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021654if { (ac_try="$ac_compile"
21655case "(($ac_try" in
21656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21657 *) ac_try_echo=$ac_try;;
21658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021662 grep -v '^ *+' conftest.er1 >conftest.err
21663 rm -f conftest.er1
21664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666 (exit $ac_status); } && {
21667 test -z "$ac_c_werror_flag" ||
21668 test ! -s conftest.err
21669 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021673sed 's/^/| /' conftest.$ac_ext >&5
21674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021676/* confdefs.h. */
21677_ACEOF
21678cat confdefs.h >>conftest.$ac_ext
21679cat >>conftest.$ac_ext <<_ACEOF
21680/* end confdefs.h. */
21681$ac_includes_default
21682int
21683main ()
21684{
21685static struct stat ac_aggr;
21686if (sizeof ac_aggr.st_blocks)
21687return 0;
21688 ;
21689 return 0;
21690}
21691_ACEOF
21692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693if { (ac_try="$ac_compile"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021699 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021701 grep -v '^ *+' conftest.er1 >conftest.err
21702 rm -f conftest.er1
21703 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021705 (exit $ac_status); } && {
21706 test -z "$ac_c_werror_flag" ||
21707 test ! -s conftest.err
21708 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021709 ac_cv_member_struct_stat_st_blocks=yes
21710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021712sed 's/^/| /' conftest.$ac_ext >&5
21713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021714 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021716
21717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719
21720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021721fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021722{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21723echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21724if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021725
Martin v. Löwis11437992002-04-12 09:54:03 +000021726cat >>confdefs.h <<_ACEOF
21727#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21728_ACEOF
21729
21730
21731cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021732#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021733_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021734
21735else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021736 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021737 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21739 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021740esac
21741
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021742fi
21743
Michael W. Hudson54241132001-12-07 15:38:26 +000021744
Martin v. Löwis11437992002-04-12 09:54:03 +000021745
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021746{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21747echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021748if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021750else
Martin v. Löwis11437992002-04-12 09:54:03 +000021751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021752/* confdefs.h. */
21753_ACEOF
21754cat confdefs.h >>conftest.$ac_ext
21755cat >>conftest.$ac_ext <<_ACEOF
21756/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021757#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021758int
21759main ()
21760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021761return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021762 ;
21763 return 0;
21764}
21765_ACEOF
21766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021767if { (ac_try="$ac_compile"
21768case "(($ac_try" in
21769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21770 *) ac_try_echo=$ac_try;;
21771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021775 grep -v '^ *+' conftest.er1 >conftest.err
21776 rm -f conftest.er1
21777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021779 (exit $ac_status); } && {
21780 test -z "$ac_c_werror_flag" ||
21781 test ! -s conftest.err
21782 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021783 ac_cv_header_time_altzone=yes
21784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021786sed 's/^/| /' conftest.$ac_ext >&5
21787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21792fi
21793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021794{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21795echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021796if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021797
21798cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021799#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021801
21802fi
21803
Guido van Rossumda88dad1995-01-26 00:46:29 +000021804was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021805{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21806echo $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 +000021807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021808/* confdefs.h. */
21809_ACEOF
21810cat confdefs.h >>conftest.$ac_ext
21811cat >>conftest.$ac_ext <<_ACEOF
21812/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021813
21814#include <sys/types.h>
21815#include <sys/select.h>
21816#include <sys/time.h>
21817
Martin v. Löwis11437992002-04-12 09:54:03 +000021818int
21819main ()
21820{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021821;
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 ;
21823 return 0;
21824}
21825_ACEOF
21826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021827if { (ac_try="$ac_compile"
21828case "(($ac_try" in
21829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21830 *) ac_try_echo=$ac_try;;
21831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021835 grep -v '^ *+' conftest.er1 >conftest.err
21836 rm -f conftest.er1
21837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839 (exit $ac_status); } && {
21840 test -z "$ac_c_werror_flag" ||
21841 test ! -s conftest.err
21842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021843
21844
21845cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021846#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021847_ACEOF
21848
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021849 was_it_defined=yes
21850
Guido van Rossumf78abae1997-01-21 22:02:36 +000021851else
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 Wouters477c8d52006-05-27 19:21:47 +000021855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856fi
21857
21858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021859{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21860echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021862{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21863echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021864if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021866else
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021868/* confdefs.h. */
21869_ACEOF
21870cat confdefs.h >>conftest.$ac_ext
21871cat >>conftest.$ac_ext <<_ACEOF
21872/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021873
21874# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021875int
21876main ()
21877{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021878struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021879 ;
21880 return 0;
21881}
21882_ACEOF
21883rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884if { (ac_try="$ac_compile"
21885case "(($ac_try" in
21886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21887 *) ac_try_echo=$ac_try;;
21888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021892 grep -v '^ *+' conftest.er1 >conftest.err
21893 rm -f conftest.er1
21894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021896 (exit $ac_status); } && {
21897 test -z "$ac_c_werror_flag" ||
21898 test ! -s conftest.err
21899 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021900 ac_cv_struct_addrinfo=yes
21901else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021903sed 's/^/| /' conftest.$ac_ext >&5
21904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21909fi
21910
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021911{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21912echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021913if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021914
21915cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021916#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021917_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021918
21919fi
21920
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021921{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21922echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021923if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021925else
Martin v. Löwis11437992002-04-12 09:54:03 +000021926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021927/* confdefs.h. */
21928_ACEOF
21929cat confdefs.h >>conftest.$ac_ext
21930cat >>conftest.$ac_ext <<_ACEOF
21931/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021932
21933# include <sys/types.h>
21934# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021935int
21936main ()
21937{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021938struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 ;
21940 return 0;
21941}
21942_ACEOF
21943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021944if { (ac_try="$ac_compile"
21945case "(($ac_try" in
21946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947 *) ac_try_echo=$ac_try;;
21948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021952 grep -v '^ *+' conftest.er1 >conftest.err
21953 rm -f conftest.er1
21954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021956 (exit $ac_status); } && {
21957 test -z "$ac_c_werror_flag" ||
21958 test ! -s conftest.err
21959 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021960 ac_cv_struct_sockaddr_storage=yes
21961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021963sed 's/^/| /' conftest.$ac_ext >&5
21964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021965 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021966fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21969fi
21970
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021971{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21972echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021973if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021974
21975cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021976#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021977_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978
21979fi
21980
Guido van Rossum627b2d71993-12-24 10:39:16 +000021981# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021982
Michael W. Hudson54241132001-12-07 15:38:26 +000021983
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021984{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21985echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021986if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021987 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021988else
Martin v. Löwis11437992002-04-12 09:54:03 +000021989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021990/* confdefs.h. */
21991_ACEOF
21992cat confdefs.h >>conftest.$ac_ext
21993cat >>conftest.$ac_ext <<_ACEOF
21994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021995$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021996int
21997main ()
21998{
21999static int test_array [1 - 2 * !(((char) -1) < 0)];
22000test_array [0] = 0
22001
22002 ;
22003 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022004}
Martin v. Löwis11437992002-04-12 09:54:03 +000022005_ACEOF
22006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022007if { (ac_try="$ac_compile"
22008case "(($ac_try" in
22009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22010 *) ac_try_echo=$ac_try;;
22011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022015 grep -v '^ *+' conftest.er1 >conftest.err
22016 rm -f conftest.er1
22017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022019 (exit $ac_status); } && {
22020 test -z "$ac_c_werror_flag" ||
22021 test ! -s conftest.err
22022 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022023 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022024else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022026sed 's/^/| /' conftest.$ac_ext >&5
22027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022030
22031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022032fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022033{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22034echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022035if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022036 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022037#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022038_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022039
22040fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022041
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022042{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22043echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022044if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022046else
22047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022048/* confdefs.h. */
22049_ACEOF
22050cat confdefs.h >>conftest.$ac_ext
22051cat >>conftest.$ac_ext <<_ACEOF
22052/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022053
Martin v. Löwis11437992002-04-12 09:54:03 +000022054int
22055main ()
22056{
22057/* FIXME: Include the comments suggested by Paul. */
22058#ifndef __cplusplus
22059 /* Ultrix mips cc rejects this. */
22060 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022061 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022063 char const *const *pcpcc;
22064 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022065 /* NEC SVR4.0.2 mips cc rejects this. */
22066 struct point {int x, y;};
22067 static struct point const zero = {0,0};
22068 /* AIX XL C 1.02.0.0 rejects this.
22069 It does not let you subtract one const X* pointer from another in
22070 an arm of an if-expression whose if-part is not a constant
22071 expression */
22072 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022075 ++pcpcc;
22076 ppc = (char**) pcpcc;
22077 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022078 { /* SCO 3.2v4 cc rejects this. */
22079 char *t;
22080 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022081
Martin v. Löwis11437992002-04-12 09:54:03 +000022082 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022083 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022084 }
22085 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22086 int x[] = {25, 17};
22087 const int *foo = &x[0];
22088 ++foo;
22089 }
22090 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22091 typedef const int *iptr;
22092 iptr p = 0;
22093 ++p;
22094 }
22095 { /* AIX XL C 1.02.0.0 rejects this saying
22096 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22097 struct s { int j; const int *ap[3]; };
22098 struct s *b; b->j = 5;
22099 }
22100 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22101 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022102 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022105#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022106
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 ;
22108 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022109}
Martin v. Löwis11437992002-04-12 09:54:03 +000022110_ACEOF
22111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022112if { (ac_try="$ac_compile"
22113case "(($ac_try" in
22114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22115 *) ac_try_echo=$ac_try;;
22116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022120 grep -v '^ *+' conftest.er1 >conftest.err
22121 rm -f conftest.er1
22122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022124 (exit $ac_status); } && {
22125 test -z "$ac_c_werror_flag" ||
22126 test ! -s conftest.err
22127 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022128 ac_cv_c_const=yes
22129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022131sed 's/^/| /' conftest.$ac_ext >&5
22132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022135
22136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022137fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022138{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22139echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022140if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022141
22142cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022143#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022145
22146fi
22147
Michael W. Hudson54241132001-12-07 15:38:26 +000022148
Guido van Rossumda88dad1995-01-26 00:46:29 +000022149works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022150{ echo "$as_me:$LINENO: checking for working volatile" >&5
22151echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022153/* confdefs.h. */
22154_ACEOF
22155cat confdefs.h >>conftest.$ac_ext
22156cat >>conftest.$ac_ext <<_ACEOF
22157/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022158
Martin v. Löwis11437992002-04-12 09:54:03 +000022159int
22160main ()
22161{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022162volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022163 ;
22164 return 0;
22165}
22166_ACEOF
22167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022168if { (ac_try="$ac_compile"
22169case "(($ac_try" in
22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22171 *) ac_try_echo=$ac_try;;
22172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022176 grep -v '^ *+' conftest.er1 >conftest.err
22177 rm -f conftest.er1
22178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022180 (exit $ac_status); } && {
22181 test -z "$ac_c_werror_flag" ||
22182 test ! -s conftest.err
22183 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022184 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022187sed 's/^/| /' conftest.$ac_ext >&5
22188
Martin v. Löwis11437992002-04-12 09:54:03 +000022189
22190cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022191#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022192_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022193
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022194
Guido van Rossum627b2d71993-12-24 10:39:16 +000022195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022196
22197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022198{ echo "$as_me:$LINENO: result: $works" >&5
22199echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022200
Guido van Rossumda88dad1995-01-26 00:46:29 +000022201works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022202{ echo "$as_me:$LINENO: checking for working signed char" >&5
22203echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022205/* confdefs.h. */
22206_ACEOF
22207cat confdefs.h >>conftest.$ac_ext
22208cat >>conftest.$ac_ext <<_ACEOF
22209/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022210
Martin v. Löwis11437992002-04-12 09:54:03 +000022211int
22212main ()
22213{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022214signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022215 ;
22216 return 0;
22217}
22218_ACEOF
22219rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022220if { (ac_try="$ac_compile"
22221case "(($ac_try" in
22222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22223 *) ac_try_echo=$ac_try;;
22224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022228 grep -v '^ *+' conftest.er1 >conftest.err
22229 rm -f conftest.er1
22230 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022232 (exit $ac_status); } && {
22233 test -z "$ac_c_werror_flag" ||
22234 test ! -s conftest.err
22235 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022236 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022239sed 's/^/| /' conftest.$ac_ext >&5
22240
Martin v. Löwis11437992002-04-12 09:54:03 +000022241
22242cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022243#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022244_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022245
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022246
Guido van Rossum7f43da71994-08-01 12:15:30 +000022247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022248
22249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022250{ echo "$as_me:$LINENO: result: $works" >&5
22251echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022252
Guido van Rossumda88dad1995-01-26 00:46:29 +000022253have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022254{ echo "$as_me:$LINENO: checking for prototypes" >&5
22255echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022257/* confdefs.h. */
22258_ACEOF
22259cat confdefs.h >>conftest.$ac_ext
22260cat >>conftest.$ac_ext <<_ACEOF
22261/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022262int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022263int
22264main ()
22265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022266return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022267 ;
22268 return 0;
22269}
22270_ACEOF
22271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022272if { (ac_try="$ac_compile"
22273case "(($ac_try" in
22274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22275 *) ac_try_echo=$ac_try;;
22276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022280 grep -v '^ *+' conftest.er1 >conftest.err
22281 rm -f conftest.er1
22282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022284 (exit $ac_status); } && {
22285 test -z "$ac_c_werror_flag" ||
22286 test ! -s conftest.err
22287 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022288
22289
22290cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022291#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292_ACEOF
22293
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022294 have_prototypes=yes
22295
Guido van Rossumf78abae1997-01-21 22:02:36 +000022296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022298sed 's/^/| /' conftest.$ac_ext >&5
22299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022300
Guido van Rossum7f43da71994-08-01 12:15:30 +000022301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022302
22303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022304{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22305echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022306
Guido van Rossumda88dad1995-01-26 00:46:29 +000022307works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022308{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22309echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022311/* confdefs.h. */
22312_ACEOF
22313cat confdefs.h >>conftest.$ac_ext
22314cat >>conftest.$ac_ext <<_ACEOF
22315/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022316
22317#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022318int foo(int x, ...) {
22319 va_list va;
22320 va_start(va, x);
22321 va_arg(va, int);
22322 va_arg(va, char *);
22323 va_arg(va, double);
22324 return 0;
22325}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022326
Martin v. Löwis11437992002-04-12 09:54:03 +000022327int
22328main ()
22329{
Guido van Rossum90eea071996-08-30 20:58:57 +000022330return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 ;
22332 return 0;
22333}
22334_ACEOF
22335rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022336if { (ac_try="$ac_compile"
22337case "(($ac_try" in
22338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22339 *) ac_try_echo=$ac_try;;
22340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022344 grep -v '^ *+' conftest.er1 >conftest.err
22345 rm -f conftest.er1
22346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022348 (exit $ac_status); } && {
22349 test -z "$ac_c_werror_flag" ||
22350 test ! -s conftest.err
22351 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022352
22353
22354cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022355#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022356_ACEOF
22357
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022358 works=yes
22359
Guido van Rossumf78abae1997-01-21 22:02:36 +000022360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022362sed 's/^/| /' conftest.$ac_ext >&5
22363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022364
Guido van Rossum627b2d71993-12-24 10:39:16 +000022365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022366
22367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022368{ echo "$as_me:$LINENO: result: $works" >&5
22369echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022370
Martin v. Löwisd6320502004-08-12 13:45:08 +000022371# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022372{ echo "$as_me:$LINENO: checking for socketpair" >&5
22373echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022374cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022375/* confdefs.h. */
22376_ACEOF
22377cat confdefs.h >>conftest.$ac_ext
22378cat >>conftest.$ac_ext <<_ACEOF
22379/* end confdefs.h. */
22380
22381#include <sys/types.h>
22382#include <sys/socket.h>
22383
22384int
22385main ()
22386{
22387void *x=socketpair
22388 ;
22389 return 0;
22390}
22391_ACEOF
22392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022393if { (ac_try="$ac_compile"
22394case "(($ac_try" in
22395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22396 *) ac_try_echo=$ac_try;;
22397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022401 grep -v '^ *+' conftest.er1 >conftest.err
22402 rm -f conftest.er1
22403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022405 (exit $ac_status); } && {
22406 test -z "$ac_c_werror_flag" ||
22407 test ! -s conftest.err
22408 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022409
22410cat >>confdefs.h <<\_ACEOF
22411#define HAVE_SOCKETPAIR 1
22412_ACEOF
22413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022414 { echo "$as_me:$LINENO: result: yes" >&5
22415echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022417 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022418sed 's/^/| /' conftest.$ac_ext >&5
22419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022420 { echo "$as_me:$LINENO: result: no" >&5
22421echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022422
22423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022424
22425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022426
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022427# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022428{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22429echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022431/* confdefs.h. */
22432_ACEOF
22433cat confdefs.h >>conftest.$ac_ext
22434cat >>conftest.$ac_ext <<_ACEOF
22435/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022436#include <sys/types.h>
22437#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022438int
22439main ()
22440{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022441struct sockaddr x;
22442x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022443 ;
22444 return 0;
22445}
22446_ACEOF
22447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022448if { (ac_try="$ac_compile"
22449case "(($ac_try" in
22450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22451 *) ac_try_echo=$ac_try;;
22452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022456 grep -v '^ *+' conftest.er1 >conftest.err
22457 rm -f conftest.er1
22458 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022460 (exit $ac_status); } && {
22461 test -z "$ac_c_werror_flag" ||
22462 test ! -s conftest.err
22463 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022464 { echo "$as_me:$LINENO: result: yes" >&5
22465echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022466
22467cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022468#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022469_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022470
22471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022473sed 's/^/| /' conftest.$ac_ext >&5
22474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022475 { echo "$as_me:$LINENO: result: no" >&5
22476echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022478
22479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022480
Guido van Rossumda88dad1995-01-26 00:46:29 +000022481va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022482{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22483echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022484cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022485/* confdefs.h. */
22486_ACEOF
22487cat confdefs.h >>conftest.$ac_ext
22488cat >>conftest.$ac_ext <<_ACEOF
22489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022490
22491#ifdef HAVE_STDARG_PROTOTYPES
22492#include <stdarg.h>
22493#else
22494#include <varargs.h>
22495#endif
22496
Martin v. Löwis11437992002-04-12 09:54:03 +000022497int
22498main ()
22499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022500va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022501 ;
22502 return 0;
22503}
22504_ACEOF
22505rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022506if { (ac_try="$ac_compile"
22507case "(($ac_try" in
22508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22509 *) ac_try_echo=$ac_try;;
22510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022514 grep -v '^ *+' conftest.er1 >conftest.err
22515 rm -f conftest.er1
22516 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022518 (exit $ac_status); } && {
22519 test -z "$ac_c_werror_flag" ||
22520 test ! -s conftest.err
22521 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022522 :
22523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022525sed 's/^/| /' conftest.$ac_ext >&5
22526
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
22528
22529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022530#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022531_ACEOF
22532
Guido van Rossumda88dad1995-01-26 00:46:29 +000022533 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022536
22537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022538{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22539echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022541# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022542
22543
22544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22546echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022547if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022548 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022549else
Martin v. Löwis11437992002-04-12 09:54:03 +000022550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022551/* confdefs.h. */
22552_ACEOF
22553cat confdefs.h >>conftest.$ac_ext
22554cat >>conftest.$ac_ext <<_ACEOF
22555/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022556/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22557 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22558#define gethostbyname_r innocuous_gethostbyname_r
22559
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022560/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022561 which can conflict with char gethostbyname_r (); below.
22562 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022563 <limits.h> exists even on freestanding compilers. */
22564
22565#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022566# include <limits.h>
22567#else
22568# include <assert.h>
22569#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022570
22571#undef gethostbyname_r
22572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573/* Override any GCC internal prototype to avoid an error.
22574 Use char because int might match the return type of a GCC
22575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022576#ifdef __cplusplus
22577extern "C"
22578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022579char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022580/* The GNU C library defines this for functions which it implements
22581 to always fail with ENOSYS. Some functions are actually named
22582 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022583#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022584choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022585#endif
22586
Skip Montanaro6dead952003-09-25 14:50:04 +000022587int
22588main ()
22589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022590return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022591 ;
22592 return 0;
22593}
22594_ACEOF
22595rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022596if { (ac_try="$ac_link"
22597case "(($ac_try" in
22598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22599 *) ac_try_echo=$ac_try;;
22600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022602 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022604 grep -v '^ *+' conftest.er1 >conftest.err
22605 rm -f conftest.er1
22606 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022608 (exit $ac_status); } && {
22609 test -z "$ac_c_werror_flag" ||
22610 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022611 } && test -s conftest$ac_exeext &&
22612 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022613 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022616sed 's/^/| /' conftest.$ac_ext >&5
22617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022618 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022620
22621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022622 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022623fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022624{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22625echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22626if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022627
Martin v. Löwis11437992002-04-12 09:54:03 +000022628 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022629#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022630_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022632 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22633echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022634 OLD_CFLAGS=$CFLAGS
22635 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022637/* confdefs.h. */
22638_ACEOF
22639cat confdefs.h >>conftest.$ac_ext
22640cat >>conftest.$ac_ext <<_ACEOF
22641/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022642
22643# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022644
Martin v. Löwis11437992002-04-12 09:54:03 +000022645int
22646main ()
22647{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022648
22649 char *name;
22650 struct hostent *he, *res;
22651 char buffer[2048];
22652 int buflen = 2048;
22653 int h_errnop;
22654
22655 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022656
22657 ;
22658 return 0;
22659}
22660_ACEOF
22661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022662if { (ac_try="$ac_compile"
22663case "(($ac_try" in
22664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22665 *) ac_try_echo=$ac_try;;
22666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022670 grep -v '^ *+' conftest.er1 >conftest.err
22671 rm -f conftest.er1
22672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022674 (exit $ac_status); } && {
22675 test -z "$ac_c_werror_flag" ||
22676 test ! -s conftest.err
22677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022678
22679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022680#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022681_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022682
Martin v. Löwis11437992002-04-12 09:54:03 +000022683
22684cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022685#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022686_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022688 { echo "$as_me:$LINENO: result: yes" >&5
22689echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022693sed 's/^/| /' conftest.$ac_ext >&5
22694
Martin v. Löwis11437992002-04-12 09:54:03 +000022695
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022696 { echo "$as_me:$LINENO: result: no" >&5
22697echo "${ECHO_T}no" >&6; }
22698 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22699echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022701/* confdefs.h. */
22702_ACEOF
22703cat confdefs.h >>conftest.$ac_ext
22704cat >>conftest.$ac_ext <<_ACEOF
22705/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022706
22707# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022708
Martin v. Löwis11437992002-04-12 09:54:03 +000022709int
22710main ()
22711{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022712
22713 char *name;
22714 struct hostent *he;
22715 char buffer[2048];
22716 int buflen = 2048;
22717 int h_errnop;
22718
22719 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022720
22721 ;
22722 return 0;
22723}
22724_ACEOF
22725rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022726if { (ac_try="$ac_compile"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022738 (exit $ac_status); } && {
22739 test -z "$ac_c_werror_flag" ||
22740 test ! -s conftest.err
22741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022742
22743 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022744#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022745_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022746
Martin v. Löwis11437992002-04-12 09:54:03 +000022747
22748cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022749#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022750_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022752 { echo "$as_me:$LINENO: result: yes" >&5
22753echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022754
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022757sed 's/^/| /' conftest.$ac_ext >&5
22758
Martin v. Löwis11437992002-04-12 09:54:03 +000022759
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022760 { echo "$as_me:$LINENO: result: no" >&5
22761echo "${ECHO_T}no" >&6; }
22762 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22763echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022770
22771# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022772
Martin v. Löwis11437992002-04-12 09:54:03 +000022773int
22774main ()
22775{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022776
22777 char *name;
22778 struct hostent *he;
22779 struct hostent_data data;
22780
22781 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022782
22783 ;
22784 return 0;
22785}
22786_ACEOF
22787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022788if { (ac_try="$ac_compile"
22789case "(($ac_try" in
22790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22791 *) ac_try_echo=$ac_try;;
22792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022796 grep -v '^ *+' conftest.er1 >conftest.err
22797 rm -f conftest.er1
22798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022800 (exit $ac_status); } && {
22801 test -z "$ac_c_werror_flag" ||
22802 test ! -s conftest.err
22803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022804
22805 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022806#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022807_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022808
Martin v. Löwis11437992002-04-12 09:54:03 +000022809
22810cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022811#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022812_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022813
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022814 { echo "$as_me:$LINENO: result: yes" >&5
22815echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022819sed 's/^/| /' conftest.$ac_ext >&5
22820
Martin v. Löwis11437992002-04-12 09:54:03 +000022821
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022822 { echo "$as_me:$LINENO: result: no" >&5
22823echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022826
22827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022828
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022830
22831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022832
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022834
22835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022836 CFLAGS=$OLD_CFLAGS
22837
22838else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022839
Martin v. Löwis11437992002-04-12 09:54:03 +000022840
22841for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022842do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22844{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022846if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022848else
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022850/* confdefs.h. */
22851_ACEOF
22852cat confdefs.h >>conftest.$ac_ext
22853cat >>conftest.$ac_ext <<_ACEOF
22854/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022855/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22856 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22857#define $ac_func innocuous_$ac_func
22858
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022859/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022860 which can conflict with char $ac_func (); below.
22861 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022862 <limits.h> exists even on freestanding compilers. */
22863
22864#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022865# include <limits.h>
22866#else
22867# include <assert.h>
22868#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022869
22870#undef $ac_func
22871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022872/* Override any GCC internal prototype to avoid an error.
22873 Use char because int might match the return type of a GCC
22874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022875#ifdef __cplusplus
22876extern "C"
22877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022878char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022879/* The GNU C library defines this for functions which it implements
22880 to always fail with ENOSYS. Some functions are actually named
22881 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022882#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022883choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022884#endif
22885
Skip Montanaro6dead952003-09-25 14:50:04 +000022886int
22887main ()
22888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022889return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022890 ;
22891 return 0;
22892}
22893_ACEOF
22894rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022895if { (ac_try="$ac_link"
22896case "(($ac_try" in
22897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22898 *) ac_try_echo=$ac_try;;
22899esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022903 grep -v '^ *+' conftest.er1 >conftest.err
22904 rm -f conftest.er1
22905 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022907 (exit $ac_status); } && {
22908 test -z "$ac_c_werror_flag" ||
22909 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022910 } && test -s conftest$ac_exeext &&
22911 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022912 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022913else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022915sed 's/^/| /' conftest.$ac_ext >&5
22916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022917 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022919
22920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022922fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022923ac_res=`eval echo '${'$as_ac_var'}'`
22924 { echo "$as_me:$LINENO: result: $ac_res" >&5
22925echo "${ECHO_T}$ac_res" >&6; }
22926if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022927 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022929_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022931fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022932done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022933
Michael W. Hudson54241132001-12-07 15:38:26 +000022934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022935fi
22936
Michael W. Hudson54241132001-12-07 15:38:26 +000022937
22938
22939
22940
22941
22942
Guido van Rossum627b2d71993-12-24 10:39:16 +000022943# checks for system services
22944# (none yet)
22945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022946# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022947{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22948echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022949if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022950 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022951else
Martin v. Löwis11437992002-04-12 09:54:03 +000022952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022953/* confdefs.h. */
22954_ACEOF
22955cat confdefs.h >>conftest.$ac_ext
22956cat >>conftest.$ac_ext <<_ACEOF
22957/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022958/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22959 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22960#define __fpu_control innocuous___fpu_control
22961
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022962/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022963 which can conflict with char __fpu_control (); below.
22964 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022965 <limits.h> exists even on freestanding compilers. */
22966
22967#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022968# include <limits.h>
22969#else
22970# include <assert.h>
22971#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022972
22973#undef __fpu_control
22974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022975/* Override any GCC internal prototype to avoid an error.
22976 Use char because int might match the return type of a GCC
22977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022978#ifdef __cplusplus
22979extern "C"
22980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022981char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022982/* The GNU C library defines this for functions which it implements
22983 to always fail with ENOSYS. Some functions are actually named
22984 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022985#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022986choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022987#endif
22988
Skip Montanaro6dead952003-09-25 14:50:04 +000022989int
22990main ()
22991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022992return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022993 ;
22994 return 0;
22995}
22996_ACEOF
22997rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022998if { (ac_try="$ac_link"
22999case "(($ac_try" in
23000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23001 *) ac_try_echo=$ac_try;;
23002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023004 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023006 grep -v '^ *+' conftest.er1 >conftest.err
23007 rm -f conftest.er1
23008 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023010 (exit $ac_status); } && {
23011 test -z "$ac_c_werror_flag" ||
23012 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023013 } && test -s conftest$ac_exeext &&
23014 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023015 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023018sed 's/^/| /' conftest.$ac_ext >&5
23019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023020 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023022
23023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023024 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023026{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23027echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23028if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023029 :
23030else
Martin v. Löwis11437992002-04-12 09:54:03 +000023031
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023032{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23033echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023034if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023036else
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023038LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023040/* confdefs.h. */
23041_ACEOF
23042cat confdefs.h >>conftest.$ac_ext
23043cat >>conftest.$ac_ext <<_ACEOF
23044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023046/* Override any GCC internal prototype to avoid an error.
23047 Use char because int might match the return type of a GCC
23048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023049#ifdef __cplusplus
23050extern "C"
23051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023052char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023053int
23054main ()
23055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023056return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023057 ;
23058 return 0;
23059}
23060_ACEOF
23061rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023062if { (ac_try="$ac_link"
23063case "(($ac_try" in
23064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23065 *) ac_try_echo=$ac_try;;
23066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023070 grep -v '^ *+' conftest.er1 >conftest.err
23071 rm -f conftest.er1
23072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023074 (exit $ac_status); } && {
23075 test -z "$ac_c_werror_flag" ||
23076 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023077 } && test -s conftest$ac_exeext &&
23078 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023079 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023082sed 's/^/| /' conftest.$ac_ext >&5
23083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023084 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023086
23087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023089LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023090fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023091{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23092echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23093if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023094 cat >>confdefs.h <<_ACEOF
23095#define HAVE_LIBIEEE 1
23096_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023097
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023098 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023099
Guido van Rossum627b2d71993-12-24 10:39:16 +000023100fi
23101
Michael W. Hudson54241132001-12-07 15:38:26 +000023102
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023103fi
23104
Michael W. Hudson54241132001-12-07 15:38:26 +000023105
Guido van Rossum7f253911997-05-09 02:42:48 +000023106# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023107{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23108echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023110# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023111if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023112 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023113if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023114then
23115
23116cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023117#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023118_ACEOF
23119
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023120 { echo "$as_me:$LINENO: result: yes" >&5
23121echo "${ECHO_T}yes" >&6; }
23122else { echo "$as_me:$LINENO: result: no" >&5
23123echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023124fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023126 { echo "$as_me:$LINENO: result: no" >&5
23127echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023128fi
23129
Guido van Rossum7f253911997-05-09 02:42:48 +000023130
Guido van Rossum7f43da71994-08-01 12:15:30 +000023131# check for --with-libm=...
23132
Guido van Rossum563e7081996-09-10 18:20:48 +000023133case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023134Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023135*) LIBM=-lm
23136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023137{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23138echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023140# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023141if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023142 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023143if test "$withval" = no
23144then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023145 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23146echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023147elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023148then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23150echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23151else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23152echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023153 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023154fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023156 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23157echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023158fi
23159
Guido van Rossum7f43da71994-08-01 12:15:30 +000023160
23161# check for --with-libc=...
23162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023163{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23164echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023166# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023167if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023168 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023169if test "$withval" = no
23170then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023171 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23172echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023173elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023174then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023175 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23176echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23177else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23178echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023179 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023180fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023182 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23183echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023184fi
23185
Guido van Rossum7f43da71994-08-01 12:15:30 +000023186
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023187# **************************************************
23188# * Check for various properties of floating point *
23189# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23192echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023193if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023194 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023195else
23196
23197if test "$cross_compiling" = yes; then
23198 ac_cv_little_endian_double=no
23199else
23200 cat >conftest.$ac_ext <<_ACEOF
23201/* confdefs.h. */
23202_ACEOF
23203cat confdefs.h >>conftest.$ac_ext
23204cat >>conftest.$ac_ext <<_ACEOF
23205/* end confdefs.h. */
23206
23207#include <string.h>
23208int main() {
23209 double x = 9006104071832581.0;
23210 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23211 return 0;
23212 else
23213 return 1;
23214}
23215
23216_ACEOF
23217rm -f conftest$ac_exeext
23218if { (ac_try="$ac_link"
23219case "(($ac_try" in
23220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23221 *) ac_try_echo=$ac_try;;
23222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023224 (eval "$ac_link") 2>&5
23225 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23228 { (case "(($ac_try" in
23229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23230 *) ac_try_echo=$ac_try;;
23231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023233 (eval "$ac_try") 2>&5
23234 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023236 (exit $ac_status); }; }; then
23237 ac_cv_little_endian_double=yes
23238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023239 echo "$as_me: program exited with status $ac_status" >&5
23240echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023241sed 's/^/| /' conftest.$ac_ext >&5
23242
23243( exit $ac_status )
23244ac_cv_little_endian_double=no
23245fi
23246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23247fi
23248
23249
23250fi
23251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23253echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023254if test "$ac_cv_little_endian_double" = yes
23255then
23256
23257cat >>confdefs.h <<\_ACEOF
23258#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23259_ACEOF
23260
23261fi
23262
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23264echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023265if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023266 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023267else
23268
23269if test "$cross_compiling" = yes; then
23270 ac_cv_big_endian_double=no
23271else
23272 cat >conftest.$ac_ext <<_ACEOF
23273/* confdefs.h. */
23274_ACEOF
23275cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */
23278
23279#include <string.h>
23280int main() {
23281 double x = 9006104071832581.0;
23282 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23283 return 0;
23284 else
23285 return 1;
23286}
23287
23288_ACEOF
23289rm -f conftest$ac_exeext
23290if { (ac_try="$ac_link"
23291case "(($ac_try" in
23292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23293 *) ac_try_echo=$ac_try;;
23294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023296 (eval "$ac_link") 2>&5
23297 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023299 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23300 { (case "(($ac_try" in
23301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23302 *) ac_try_echo=$ac_try;;
23303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023305 (eval "$ac_try") 2>&5
23306 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023308 (exit $ac_status); }; }; then
23309 ac_cv_big_endian_double=yes
23310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311 echo "$as_me: program exited with status $ac_status" >&5
23312echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023313sed 's/^/| /' conftest.$ac_ext >&5
23314
23315( exit $ac_status )
23316ac_cv_big_endian_double=no
23317fi
23318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23319fi
23320
23321
23322fi
23323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023324{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23325echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023326if test "$ac_cv_big_endian_double" = yes
23327then
23328
23329cat >>confdefs.h <<\_ACEOF
23330#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23331_ACEOF
23332
23333fi
23334
23335# Some ARM platforms use a mixed-endian representation for doubles.
23336# While Python doesn't currently have full support for these platforms
23337# (see e.g., issue 1762561), we can at least make sure that float <-> string
23338# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023339{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23340echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023341if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023342 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023343else
23344
23345if test "$cross_compiling" = yes; then
23346 ac_cv_mixed_endian_double=no
23347else
23348 cat >conftest.$ac_ext <<_ACEOF
23349/* confdefs.h. */
23350_ACEOF
23351cat confdefs.h >>conftest.$ac_ext
23352cat >>conftest.$ac_ext <<_ACEOF
23353/* end confdefs.h. */
23354
23355#include <string.h>
23356int main() {
23357 double x = 9006104071832581.0;
23358 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23359 return 0;
23360 else
23361 return 1;
23362}
23363
23364_ACEOF
23365rm -f conftest$ac_exeext
23366if { (ac_try="$ac_link"
23367case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
23376 { (case "(($ac_try" in
23377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23378 *) ac_try_echo=$ac_try;;
23379esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023381 (eval "$ac_try") 2>&5
23382 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023384 (exit $ac_status); }; }; then
23385 ac_cv_mixed_endian_double=yes
23386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023387 echo "$as_me: program exited with status $ac_status" >&5
23388echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023389sed 's/^/| /' conftest.$ac_ext >&5
23390
23391( exit $ac_status )
23392ac_cv_mixed_endian_double=no
23393fi
23394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23395fi
23396
23397
23398fi
23399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023400{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23401echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023402if test "$ac_cv_mixed_endian_double" = yes
23403then
23404
23405cat >>confdefs.h <<\_ACEOF
23406#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23407_ACEOF
23408
23409fi
23410
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023411# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023412# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023413# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023414# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023415# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023416# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023417
23418# This inline assembler syntax may also work for suncc and icc,
23419# so we try it on all platforms.
23420
23421{ 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 +000023422echo $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 +000023423cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023424/* confdefs.h. */
23425_ACEOF
23426cat confdefs.h >>conftest.$ac_ext
23427cat >>conftest.$ac_ext <<_ACEOF
23428/* end confdefs.h. */
23429
23430int
23431main ()
23432{
23433
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023434 unsigned short cw;
23435 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23436 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023437
23438 ;
23439 return 0;
23440}
23441_ACEOF
23442rm -f conftest.$ac_objext
23443if { (ac_try="$ac_compile"
23444case "(($ac_try" in
23445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23446 *) ac_try_echo=$ac_try;;
23447esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023449 (eval "$ac_compile") 2>conftest.er1
23450 ac_status=$?
23451 grep -v '^ *+' conftest.er1 >conftest.err
23452 rm -f conftest.er1
23453 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023455 (exit $ac_status); } && {
23456 test -z "$ac_c_werror_flag" ||
23457 test ! -s conftest.err
23458 } && test -s conftest.$ac_objext; then
23459 have_gcc_asm_for_x87=yes
23460else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023461 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023462sed 's/^/| /' conftest.$ac_ext >&5
23463
23464 have_gcc_asm_for_x87=no
23465fi
23466
23467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023468{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023469echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023470if test "$have_gcc_asm_for_x87" = yes
23471then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023472
23473cat >>confdefs.h <<\_ACEOF
23474#define HAVE_GCC_ASM_FOR_X87 1
23475_ACEOF
23476
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023478
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023479# Detect whether system arithmetic is subject to x87-style double
23480# rounding issues. The result of this test has little meaning on non
23481# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23482# mode is round-to-nearest and double rounding issues are present, and
23483# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023484{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23485echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023486# $BASECFLAGS may affect the result
23487ac_save_cc="$CC"
23488CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023489if test "$cross_compiling" = yes; then
23490 ac_cv_x87_double_rounding=no
23491else
23492 cat >conftest.$ac_ext <<_ACEOF
23493/* confdefs.h. */
23494_ACEOF
23495cat confdefs.h >>conftest.$ac_ext
23496cat >>conftest.$ac_ext <<_ACEOF
23497/* end confdefs.h. */
23498
23499#include <stdlib.h>
23500#include <math.h>
23501int main() {
23502 volatile double x, y, z;
23503 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23504 x = 0.99999999999999989; /* 1-2**-53 */
23505 y = 1./x;
23506 if (y != 1.)
23507 exit(0);
23508 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23509 x = 1e16;
23510 y = 2.99999;
23511 z = x + y;
23512 if (z != 1e16+4.)
23513 exit(0);
23514 /* both tests show evidence of double rounding */
23515 exit(1);
23516}
23517
23518_ACEOF
23519rm -f conftest$ac_exeext
23520if { (ac_try="$ac_link"
23521case "(($ac_try" in
23522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23523 *) ac_try_echo=$ac_try;;
23524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023526 (eval "$ac_link") 2>&5
23527 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23530 { (case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023535 (eval "$ac_try") 2>&5
23536 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023538 (exit $ac_status); }; }; then
23539 ac_cv_x87_double_rounding=no
23540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023541 echo "$as_me: program exited with status $ac_status" >&5
23542echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023543sed 's/^/| /' conftest.$ac_ext >&5
23544
23545( exit $ac_status )
23546ac_cv_x87_double_rounding=yes
23547fi
23548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23549fi
23550
23551
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023552CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023553{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23554echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023555if test "$ac_cv_x87_double_rounding" = yes
23556then
23557
23558cat >>confdefs.h <<\_ACEOF
23559#define X87_DOUBLE_ROUNDING 1
23560_ACEOF
23561
23562fi
23563
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023564# ************************************
23565# * Check for mathematical functions *
23566# ************************************
23567
23568LIBS_SAVE=$LIBS
23569LIBS="$LIBS $LIBM"
23570
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023571# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23572# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023573{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23574echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023575if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023576 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023577else
23578
23579if test "$cross_compiling" = yes; then
23580 ac_cv_tanh_preserves_zero_sign=no
23581else
23582 cat >conftest.$ac_ext <<_ACEOF
23583/* confdefs.h. */
23584_ACEOF
23585cat confdefs.h >>conftest.$ac_ext
23586cat >>conftest.$ac_ext <<_ACEOF
23587/* end confdefs.h. */
23588
23589#include <math.h>
23590#include <stdlib.h>
23591int main() {
23592 /* return 0 if either negative zeros don't exist
23593 on this platform or if negative zeros exist
23594 and tanh(-0.) == -0. */
23595 if (atan2(0., -1.) == atan2(-0., -1.) ||
23596 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23597 else exit(1);
23598}
23599
23600_ACEOF
23601rm -f conftest$ac_exeext
23602if { (ac_try="$ac_link"
23603case "(($ac_try" in
23604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23605 *) ac_try_echo=$ac_try;;
23606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023608 (eval "$ac_link") 2>&5
23609 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23612 { (case "(($ac_try" in
23613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23614 *) ac_try_echo=$ac_try;;
23615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023617 (eval "$ac_try") 2>&5
23618 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023620 (exit $ac_status); }; }; then
23621 ac_cv_tanh_preserves_zero_sign=yes
23622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023623 echo "$as_me: program exited with status $ac_status" >&5
23624echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023625sed 's/^/| /' conftest.$ac_ext >&5
23626
23627( exit $ac_status )
23628ac_cv_tanh_preserves_zero_sign=no
23629fi
23630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23631fi
23632
23633
23634fi
23635
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023636{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23637echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023638if test "$ac_cv_tanh_preserves_zero_sign" = yes
23639then
23640
23641cat >>confdefs.h <<\_ACEOF
23642#define TANH_PRESERVES_ZERO_SIGN 1
23643_ACEOF
23644
23645fi
23646
23647
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023648
Michael W. Hudson54241132001-12-07 15:38:26 +000023649
Christian Heimes99170a52007-12-19 02:07:34 +000023650
23651
23652
23653
23654
Mark Dickinsonf2537862009-04-18 13:58:18 +000023655
Mark Dickinson9c113362009-09-05 10:36:23 +000023656for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23657do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23659{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023661if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023662 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023663else
23664 cat >conftest.$ac_ext <<_ACEOF
23665/* confdefs.h. */
23666_ACEOF
23667cat confdefs.h >>conftest.$ac_ext
23668cat >>conftest.$ac_ext <<_ACEOF
23669/* end confdefs.h. */
23670/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23671 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23672#define $ac_func innocuous_$ac_func
23673
23674/* System header to define __stub macros and hopefully few prototypes,
23675 which can conflict with char $ac_func (); below.
23676 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23677 <limits.h> exists even on freestanding compilers. */
23678
23679#ifdef __STDC__
23680# include <limits.h>
23681#else
23682# include <assert.h>
23683#endif
23684
23685#undef $ac_func
23686
23687/* Override any GCC internal prototype to avoid an error.
23688 Use char because int might match the return type of a GCC
23689 builtin and then its argument prototype would still apply. */
23690#ifdef __cplusplus
23691extern "C"
23692#endif
23693char $ac_func ();
23694/* The GNU C library defines this for functions which it implements
23695 to always fail with ENOSYS. Some functions are actually named
23696 something starting with __ and the normal name is an alias. */
23697#if defined __stub_$ac_func || defined __stub___$ac_func
23698choke me
23699#endif
23700
23701int
23702main ()
23703{
23704return $ac_func ();
23705 ;
23706 return 0;
23707}
23708_ACEOF
23709rm -f conftest.$ac_objext conftest$ac_exeext
23710if { (ac_try="$ac_link"
23711case "(($ac_try" in
23712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23713 *) ac_try_echo=$ac_try;;
23714esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023716 (eval "$ac_link") 2>conftest.er1
23717 ac_status=$?
23718 grep -v '^ *+' conftest.er1 >conftest.err
23719 rm -f conftest.er1
23720 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023722 (exit $ac_status); } && {
23723 test -z "$ac_c_werror_flag" ||
23724 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023725 } && test -s conftest$ac_exeext &&
23726 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023727 eval "$as_ac_var=yes"
23728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023729 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023730sed 's/^/| /' conftest.$ac_ext >&5
23731
23732 eval "$as_ac_var=no"
23733fi
23734
23735rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23736 conftest$ac_exeext conftest.$ac_ext
23737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023738ac_res=`eval echo '${'$as_ac_var'}'`
23739 { echo "$as_me:$LINENO: result: $ac_res" >&5
23740echo "${ECHO_T}$ac_res" >&6; }
23741if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023742 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023743#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023744_ACEOF
23745
23746fi
23747done
23748
23749
23750
23751
23752
23753
23754for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023755do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23757{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023759if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023760 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023761else
23762 cat >conftest.$ac_ext <<_ACEOF
23763/* confdefs.h. */
23764_ACEOF
23765cat confdefs.h >>conftest.$ac_ext
23766cat >>conftest.$ac_ext <<_ACEOF
23767/* end confdefs.h. */
23768/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23769 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23770#define $ac_func innocuous_$ac_func
23771
23772/* System header to define __stub macros and hopefully few prototypes,
23773 which can conflict with char $ac_func (); below.
23774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23775 <limits.h> exists even on freestanding compilers. */
23776
23777#ifdef __STDC__
23778# include <limits.h>
23779#else
23780# include <assert.h>
23781#endif
23782
23783#undef $ac_func
23784
23785/* Override any GCC internal prototype to avoid an error.
23786 Use char because int might match the return type of a GCC
23787 builtin and then its argument prototype would still apply. */
23788#ifdef __cplusplus
23789extern "C"
23790#endif
23791char $ac_func ();
23792/* The GNU C library defines this for functions which it implements
23793 to always fail with ENOSYS. Some functions are actually named
23794 something starting with __ and the normal name is an alias. */
23795#if defined __stub_$ac_func || defined __stub___$ac_func
23796choke me
23797#endif
23798
23799int
23800main ()
23801{
23802return $ac_func ();
23803 ;
23804 return 0;
23805}
23806_ACEOF
23807rm -f conftest.$ac_objext conftest$ac_exeext
23808if { (ac_try="$ac_link"
23809case "(($ac_try" in
23810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23811 *) ac_try_echo=$ac_try;;
23812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023814 (eval "$ac_link") 2>conftest.er1
23815 ac_status=$?
23816 grep -v '^ *+' conftest.er1 >conftest.err
23817 rm -f conftest.er1
23818 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023820 (exit $ac_status); } && {
23821 test -z "$ac_c_werror_flag" ||
23822 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023823 } && test -s conftest$ac_exeext &&
23824 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023825 eval "$as_ac_var=yes"
23826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023827 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023828sed 's/^/| /' conftest.$ac_ext >&5
23829
23830 eval "$as_ac_var=no"
23831fi
23832
23833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23834 conftest$ac_exeext conftest.$ac_ext
23835fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023836ac_res=`eval echo '${'$as_ac_var'}'`
23837 { echo "$as_me:$LINENO: result: $ac_res" >&5
23838echo "${ECHO_T}$ac_res" >&6; }
23839if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023840 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023842_ACEOF
23843
23844fi
23845done
23846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023847{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23848echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023849if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023850 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023851else
23852 cat >conftest.$ac_ext <<_ACEOF
23853/* confdefs.h. */
23854_ACEOF
23855cat confdefs.h >>conftest.$ac_ext
23856cat >>conftest.$ac_ext <<_ACEOF
23857/* end confdefs.h. */
23858#include <math.h>
23859
23860int
23861main ()
23862{
23863#ifndef isinf
23864 (void) isinf;
23865#endif
23866
23867 ;
23868 return 0;
23869}
23870_ACEOF
23871rm -f conftest.$ac_objext
23872if { (ac_try="$ac_compile"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023878 (eval "$ac_compile") 2>conftest.er1
23879 ac_status=$?
23880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
23888 ac_cv_have_decl_isinf=yes
23889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023890 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023891sed 's/^/| /' conftest.$ac_ext >&5
23892
23893 ac_cv_have_decl_isinf=no
23894fi
23895
23896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23897fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023898{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23899echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23900if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023901
23902cat >>confdefs.h <<_ACEOF
23903#define HAVE_DECL_ISINF 1
23904_ACEOF
23905
23906
23907else
23908 cat >>confdefs.h <<_ACEOF
23909#define HAVE_DECL_ISINF 0
23910_ACEOF
23911
23912
23913fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023914{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23915echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023916if test "${ac_cv_have_decl_isnan+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 isnan
23931 (void) isnan;
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_isnan=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_isnan=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_isnan" >&5
23966echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23967if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023968
23969cat >>confdefs.h <<_ACEOF
23970#define HAVE_DECL_ISNAN 1
23971_ACEOF
23972
23973
23974else
23975 cat >>confdefs.h <<_ACEOF
23976#define HAVE_DECL_ISNAN 0
23977_ACEOF
23978
23979
23980fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023981{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23982echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023983if test "${ac_cv_have_decl_isfinite+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 isfinite
23998 (void) isfinite;
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_isfinite=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_isfinite=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_isfinite" >&5
24033echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24034if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024035
24036cat >>confdefs.h <<_ACEOF
24037#define HAVE_DECL_ISFINITE 1
24038_ACEOF
24039
24040
24041else
24042 cat >>confdefs.h <<_ACEOF
24043#define HAVE_DECL_ISFINITE 0
24044_ACEOF
24045
24046
24047fi
24048
24049
Christian Heimes99170a52007-12-19 02:07:34 +000024050
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024051LIBS=$LIBS_SAVE
24052
Mark Dickinsona614f042009-11-28 12:48:43 +000024053# For multiprocessing module, check that sem_open
24054# actually works. For FreeBSD versions <= 7.2,
24055# the kernel module that provides POSIX semaphores
24056# isn't loaded by default, so an attempt to call
24057# sem_open results in a 'Signal 12' error.
24058{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24059echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24060if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24061 echo $ECHO_N "(cached) $ECHO_C" >&6
24062else
24063 if test "$cross_compiling" = yes; then
24064 ac_cv_posix_semaphores_enabled=yes
24065else
24066 cat >conftest.$ac_ext <<_ACEOF
24067/* confdefs.h. */
24068_ACEOF
24069cat confdefs.h >>conftest.$ac_ext
24070cat >>conftest.$ac_ext <<_ACEOF
24071/* end confdefs.h. */
24072
24073#include <unistd.h>
24074#include <fcntl.h>
24075#include <stdio.h>
24076#include <semaphore.h>
24077#include <sys/stat.h>
24078
24079int main(void) {
24080 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24081 if (a == SEM_FAILED) {
24082 perror("sem_open");
24083 return 1;
24084 }
24085 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024086 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024087 return 0;
24088}
24089
24090_ACEOF
24091rm -f conftest$ac_exeext
24092if { (ac_try="$ac_link"
24093case "(($ac_try" in
24094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24095 *) ac_try_echo=$ac_try;;
24096esac
24097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24098 (eval "$ac_link") 2>&5
24099 ac_status=$?
24100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24102 { (case "(($ac_try" in
24103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24104 *) ac_try_echo=$ac_try;;
24105esac
24106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24107 (eval "$ac_try") 2>&5
24108 ac_status=$?
24109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24110 (exit $ac_status); }; }; then
24111 ac_cv_posix_semaphores_enabled=yes
24112else
24113 echo "$as_me: program exited with status $ac_status" >&5
24114echo "$as_me: failed program was:" >&5
24115sed 's/^/| /' conftest.$ac_ext >&5
24116
24117( exit $ac_status )
24118ac_cv_posix_semaphores_enabled=no
24119fi
24120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24121fi
24122
24123
24124
24125fi
24126
24127{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24128echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24129if test $ac_cv_posix_semaphores_enabled = no
24130then
24131
24132cat >>confdefs.h <<\_ACEOF
24133#define POSIX_SEMAPHORES_NOT_ENABLED 1
24134_ACEOF
24135
24136fi
24137
Mark Dickinson10683072009-04-18 21:18:19 +000024138# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024139{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24140echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024141if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024142 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024143else
24144 if test "$cross_compiling" = yes; then
24145 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024146else
24147 cat >conftest.$ac_ext <<_ACEOF
24148/* confdefs.h. */
24149_ACEOF
24150cat confdefs.h >>conftest.$ac_ext
24151cat >>conftest.$ac_ext <<_ACEOF
24152/* end confdefs.h. */
24153
24154#include <unistd.h>
24155#include <fcntl.h>
24156#include <stdio.h>
24157#include <semaphore.h>
24158#include <sys/stat.h>
24159
24160int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024161 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024162 int count;
24163 int res;
24164 if(a==SEM_FAILED){
24165 perror("sem_open");
24166 return 1;
24167
24168 }
24169 res = sem_getvalue(a, &count);
24170 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024171 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024172 return res==-1 ? 1 : 0;
24173}
24174
Mark Dickinson10683072009-04-18 21:18:19 +000024175_ACEOF
24176rm -f conftest$ac_exeext
24177if { (ac_try="$ac_link"
24178case "(($ac_try" in
24179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24180 *) ac_try_echo=$ac_try;;
24181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024183 (eval "$ac_link") 2>&5
24184 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24187 { (case "(($ac_try" in
24188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24189 *) ac_try_echo=$ac_try;;
24190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024192 (eval "$ac_try") 2>&5
24193 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024195 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024196 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024198 echo "$as_me: program exited with status $ac_status" >&5
24199echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024200sed 's/^/| /' conftest.$ac_ext >&5
24201
24202( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024203ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024204fi
24205rm -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 +000024206fi
24207
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024208
24209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024210fi
24211
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024212{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24213echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024214if test $ac_cv_broken_sem_getvalue = yes
24215then
24216
24217cat >>confdefs.h <<\_ACEOF
24218#define HAVE_BROKEN_SEM_GETVALUE 1
24219_ACEOF
24220
24221fi
24222
Mark Dickinsonbd792642009-03-18 20:06:12 +000024223# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024224{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24225echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024226# Check whether --enable-big-digits was given.
24227if test "${enable_big_digits+set}" = set; then
24228 enableval=$enable_big_digits; case $enable_big_digits in
24229yes)
24230 enable_big_digits=30 ;;
24231no)
24232 enable_big_digits=15 ;;
2423315|30)
24234 ;;
24235*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024236 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24237echo "$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 +000024238 { (exit 1); exit 1; }; } ;;
24239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024240{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24241echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024242
24243cat >>confdefs.h <<_ACEOF
24244#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24245_ACEOF
24246
24247
24248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024249 { echo "$as_me:$LINENO: result: no value specified" >&5
24250echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024251fi
24252
24253
Guido van Rossumef2255b2000-03-10 22:30:29 +000024254# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024255if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024256 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24257echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024258if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024259 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024260fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024261{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24262echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024263else
Martin v. Löwis11437992002-04-12 09:54:03 +000024264 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024265{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24266echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024268/* confdefs.h. */
24269_ACEOF
24270cat confdefs.h >>conftest.$ac_ext
24271cat >>conftest.$ac_ext <<_ACEOF
24272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024273$ac_includes_default
24274#include <wchar.h>
24275_ACEOF
24276rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024277if { (ac_try="$ac_compile"
24278case "(($ac_try" in
24279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24280 *) ac_try_echo=$ac_try;;
24281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024285 grep -v '^ *+' conftest.er1 >conftest.err
24286 rm -f conftest.er1
24287 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024289 (exit $ac_status); } && {
24290 test -z "$ac_c_werror_flag" ||
24291 test ! -s conftest.err
24292 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024293 ac_header_compiler=yes
24294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024296sed 's/^/| /' conftest.$ac_ext >&5
24297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024300
24301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024302{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24303echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024304
24305# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024306{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24307echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024309/* confdefs.h. */
24310_ACEOF
24311cat confdefs.h >>conftest.$ac_ext
24312cat >>conftest.$ac_ext <<_ACEOF
24313/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024314#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024315_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316if { (ac_try="$ac_cpp conftest.$ac_ext"
24317case "(($ac_try" in
24318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24319 *) ac_try_echo=$ac_try;;
24320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024322 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024323 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024324 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024325 rm -f conftest.er1
24326 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024328 (exit $ac_status); } >/dev/null && {
24329 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24330 test ! -s conftest.err
24331 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024332 ac_header_preproc=yes
24333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024335sed 's/^/| /' conftest.$ac_ext >&5
24336
Martin v. Löwis11437992002-04-12 09:54:03 +000024337 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024339
Martin v. Löwis11437992002-04-12 09:54:03 +000024340rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024341{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24342echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024343
24344# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024345case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24346 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024347 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24348echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24349 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24350echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024351 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024352 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024353 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024354 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24355echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24356 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24357echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24358 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24359echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24360 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24361echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24362 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24363echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24364 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24365echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024367## -------------------------------------- ##
24368## Report this to http://bugs.python.org/ ##
24369## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024370_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024371 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024372 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024374{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24375echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024376if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024378else
24379 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024381{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24382echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024383
24384fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024385if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024386
24387
24388cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024389#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024390_ACEOF
24391
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024392 wchar_h="yes"
24393
Guido van Rossumef2255b2000-03-10 22:30:29 +000024394else
Martin v. Löwis11437992002-04-12 09:54:03 +000024395 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024396
24397fi
24398
Michael W. Hudson54241132001-12-07 15:38:26 +000024399
Martin v. Löwis11437992002-04-12 09:54:03 +000024400
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024401# determine wchar_t size
24402if test "$wchar_h" = yes
24403then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024404 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24405echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24406if test "${ac_cv_type_wchar_t+set}" = set; then
24407 echo $ECHO_N "(cached) $ECHO_C" >&6
24408else
24409 cat >conftest.$ac_ext <<_ACEOF
24410/* confdefs.h. */
24411_ACEOF
24412cat confdefs.h >>conftest.$ac_ext
24413cat >>conftest.$ac_ext <<_ACEOF
24414/* end confdefs.h. */
24415#include <wchar.h>
24416
24417typedef wchar_t ac__type_new_;
24418int
24419main ()
24420{
24421if ((ac__type_new_ *) 0)
24422 return 0;
24423if (sizeof (ac__type_new_))
24424 return 0;
24425 ;
24426 return 0;
24427}
24428_ACEOF
24429rm -f conftest.$ac_objext
24430if { (ac_try="$ac_compile"
24431case "(($ac_try" in
24432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24433 *) ac_try_echo=$ac_try;;
24434esac
24435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24436 (eval "$ac_compile") 2>conftest.er1
24437 ac_status=$?
24438 grep -v '^ *+' conftest.er1 >conftest.err
24439 rm -f conftest.er1
24440 cat conftest.err >&5
24441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24442 (exit $ac_status); } && {
24443 test -z "$ac_c_werror_flag" ||
24444 test ! -s conftest.err
24445 } && test -s conftest.$ac_objext; then
24446 ac_cv_type_wchar_t=yes
24447else
24448 echo "$as_me: failed program was:" >&5
24449sed 's/^/| /' conftest.$ac_ext >&5
24450
24451 ac_cv_type_wchar_t=no
24452fi
24453
24454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24455fi
24456{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24457echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24458
24459# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24462# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024463{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24464echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024465if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024467else
Martin v. Löwis11437992002-04-12 09:54:03 +000024468 if test "$cross_compiling" = yes; then
24469 # Depending upon the size, compute the lo and hi bounds.
24470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024471/* confdefs.h. */
24472_ACEOF
24473cat confdefs.h >>conftest.$ac_ext
24474cat >>conftest.$ac_ext <<_ACEOF
24475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024476#include <wchar.h>
24477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024478 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024479int
24480main ()
24481{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024482static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024483test_array [0] = 0
24484
24485 ;
24486 return 0;
24487}
24488_ACEOF
24489rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024490if { (ac_try="$ac_compile"
24491case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;;
24494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024498 grep -v '^ *+' conftest.er1 >conftest.err
24499 rm -f conftest.er1
24500 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502 (exit $ac_status); } && {
24503 test -z "$ac_c_werror_flag" ||
24504 test ! -s conftest.err
24505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024506 ac_lo=0 ac_mid=0
24507 while :; do
24508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024509/* confdefs.h. */
24510_ACEOF
24511cat confdefs.h >>conftest.$ac_ext
24512cat >>conftest.$ac_ext <<_ACEOF
24513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024514#include <wchar.h>
24515
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024516 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024517int
24518main ()
24519{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024521test_array [0] = 0
24522
24523 ;
24524 return 0;
24525}
24526_ACEOF
24527rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024528if { (ac_try="$ac_compile"
24529case "(($ac_try" in
24530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24531 *) ac_try_echo=$ac_try;;
24532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024536 grep -v '^ *+' conftest.er1 >conftest.err
24537 rm -f conftest.er1
24538 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024540 (exit $ac_status); } && {
24541 test -z "$ac_c_werror_flag" ||
24542 test ! -s conftest.err
24543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024544 ac_hi=$ac_mid; break
24545else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024547sed 's/^/| /' conftest.$ac_ext >&5
24548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549 ac_lo=`expr $ac_mid + 1`
24550 if test $ac_lo -le $ac_mid; then
24551 ac_lo= ac_hi=
24552 break
24553 fi
24554 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024556
24557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024558 done
24559else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024561sed 's/^/| /' conftest.$ac_ext >&5
24562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024564/* confdefs.h. */
24565_ACEOF
24566cat confdefs.h >>conftest.$ac_ext
24567cat >>conftest.$ac_ext <<_ACEOF
24568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024569#include <wchar.h>
24570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024571 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024572int
24573main ()
24574{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024576test_array [0] = 0
24577
24578 ;
24579 return 0;
24580}
24581_ACEOF
24582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024583if { (ac_try="$ac_compile"
24584case "(($ac_try" in
24585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24586 *) ac_try_echo=$ac_try;;
24587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024591 grep -v '^ *+' conftest.er1 >conftest.err
24592 rm -f conftest.er1
24593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024595 (exit $ac_status); } && {
24596 test -z "$ac_c_werror_flag" ||
24597 test ! -s conftest.err
24598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 ac_hi=-1 ac_mid=-1
24600 while :; do
24601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024602/* confdefs.h. */
24603_ACEOF
24604cat confdefs.h >>conftest.$ac_ext
24605cat >>conftest.$ac_ext <<_ACEOF
24606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024607#include <wchar.h>
24608
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024609 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024610int
24611main ()
24612{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024613static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024614test_array [0] = 0
24615
24616 ;
24617 return 0;
24618}
24619_ACEOF
24620rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621if { (ac_try="$ac_compile"
24622case "(($ac_try" in
24623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24624 *) ac_try_echo=$ac_try;;
24625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024629 grep -v '^ *+' conftest.er1 >conftest.err
24630 rm -f conftest.er1
24631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024633 (exit $ac_status); } && {
24634 test -z "$ac_c_werror_flag" ||
24635 test ! -s conftest.err
24636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024637 ac_lo=$ac_mid; break
24638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024640sed 's/^/| /' conftest.$ac_ext >&5
24641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024642 ac_hi=`expr '(' $ac_mid ')' - 1`
24643 if test $ac_mid -le $ac_hi; then
24644 ac_lo= ac_hi=
24645 break
24646 fi
24647 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024649
24650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024651 done
24652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024654sed 's/^/| /' conftest.$ac_ext >&5
24655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024656 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024658
24659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024661
24662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024663# Binary search between lo and hi bounds.
24664while test "x$ac_lo" != "x$ac_hi"; do
24665 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024667/* confdefs.h. */
24668_ACEOF
24669cat confdefs.h >>conftest.$ac_ext
24670cat >>conftest.$ac_ext <<_ACEOF
24671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024672#include <wchar.h>
24673
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024674 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024675int
24676main ()
24677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024679test_array [0] = 0
24680
24681 ;
24682 return 0;
24683}
24684_ACEOF
24685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024686if { (ac_try="$ac_compile"
24687case "(($ac_try" in
24688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24689 *) ac_try_echo=$ac_try;;
24690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024694 grep -v '^ *+' conftest.er1 >conftest.err
24695 rm -f conftest.er1
24696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024698 (exit $ac_status); } && {
24699 test -z "$ac_c_werror_flag" ||
24700 test ! -s conftest.err
24701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024702 ac_hi=$ac_mid
24703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024705sed 's/^/| /' conftest.$ac_ext >&5
24706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024709
24710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024711done
24712case $ac_lo in
24713?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024714'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024715 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024716See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024717echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024718See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024719 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024720 else
24721 ac_cv_sizeof_wchar_t=0
24722 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024723esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024724else
Martin v. Löwis11437992002-04-12 09:54:03 +000024725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024726/* confdefs.h. */
24727_ACEOF
24728cat confdefs.h >>conftest.$ac_ext
24729cat >>conftest.$ac_ext <<_ACEOF
24730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024731#include <wchar.h>
24732
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024733 typedef wchar_t ac__type_sizeof_;
24734static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24735static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024736#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024737#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024738int
24739main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024740{
Martin v. Löwis11437992002-04-12 09:54:03 +000024741
24742 FILE *f = fopen ("conftest.val", "w");
24743 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024746 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024747 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024749 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024750 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024751 }
24752 else
24753 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024754 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024755 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024756 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024757 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024758 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024760
24761 ;
24762 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024763}
Martin v. Löwis11437992002-04-12 09:54:03 +000024764_ACEOF
24765rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024766if { (ac_try="$ac_link"
24767case "(($ac_try" in
24768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24769 *) ac_try_echo=$ac_try;;
24770esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024772 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024773 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024776 { (case "(($ac_try" in
24777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24778 *) ac_try_echo=$ac_try;;
24779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024782 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024784 (exit $ac_status); }; }; then
24785 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024787 echo "$as_me: program exited with status $ac_status" >&5
24788echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024789sed 's/^/| /' conftest.$ac_ext >&5
24790
Martin v. Löwis11437992002-04-12 09:54:03 +000024791( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024792if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024793 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024794See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024795echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024796See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024797 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024798 else
24799 ac_cv_sizeof_wchar_t=0
24800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024802rm -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 +000024803fi
24804rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024805fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024806{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24807echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024808
24809
24810
Martin v. Löwis11437992002-04-12 09:54:03 +000024811cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024812#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024813_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024814
Michael W. Hudson54241132001-12-07 15:38:26 +000024815
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024816fi
24817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024818{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24819echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024820have_ucs4_tcl=no
24821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024822/* confdefs.h. */
24823_ACEOF
24824cat confdefs.h >>conftest.$ac_ext
24825cat >>conftest.$ac_ext <<_ACEOF
24826/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024827
24828#include <tcl.h>
24829#if TCL_UTF_MAX != 6
24830# error "NOT UCS4_TCL"
24831#endif
24832int
24833main ()
24834{
24835
24836 ;
24837 return 0;
24838}
24839_ACEOF
24840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841if { (ac_try="$ac_compile"
24842case "(($ac_try" in
24843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24844 *) ac_try_echo=$ac_try;;
24845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024849 grep -v '^ *+' conftest.er1 >conftest.err
24850 rm -f conftest.er1
24851 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024853 (exit $ac_status); } && {
24854 test -z "$ac_c_werror_flag" ||
24855 test ! -s conftest.err
24856 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024857
24858
24859cat >>confdefs.h <<\_ACEOF
24860#define HAVE_UCS4_TCL 1
24861_ACEOF
24862
24863 have_ucs4_tcl=yes
24864
24865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024867sed 's/^/| /' conftest.$ac_ext >&5
24868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024869
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871
24872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24874echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024875
Skip Montanaro6dead952003-09-25 14:50:04 +000024876# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024877if test "$wchar_h" = yes
24878then
24879 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024880 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24881echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024882 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024883 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024884else
24885
24886 if test "$cross_compiling" = yes; then
24887 ac_cv_wchar_t_signed=yes
24888else
24889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024890/* confdefs.h. */
24891_ACEOF
24892cat confdefs.h >>conftest.$ac_ext
24893cat >>conftest.$ac_ext <<_ACEOF
24894/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024895
24896 #include <wchar.h>
24897 int main()
24898 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024899 /* Success: exit code 0 */
24900 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024901 }
24902
24903_ACEOF
24904rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024905if { (ac_try="$ac_link"
24906case "(($ac_try" in
24907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24908 *) ac_try_echo=$ac_try;;
24909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024911 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024912 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024915 { (case "(($ac_try" in
24916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24917 *) ac_try_echo=$ac_try;;
24918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024920 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024921 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024923 (exit $ac_status); }; }; then
24924 ac_cv_wchar_t_signed=yes
24925else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024926 echo "$as_me: program exited with status $ac_status" >&5
24927echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024928sed 's/^/| /' conftest.$ac_ext >&5
24929
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024930( exit $ac_status )
24931ac_cv_wchar_t_signed=no
24932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024933rm -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 +000024934fi
24935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024937fi
24938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024939 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24940echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941fi
24942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024943{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24944echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024945
24946# Check whether --with-wide-unicode was given.
24947if test "${with_wide_unicode+set}" = set; then
24948 withval=$with_wide_unicode;
24949if test "$withval" != no
24950then unicode_size="4"
24951else unicode_size="2"
24952fi
24953
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024954else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024955
Georg Brandl52d168a2008-01-07 18:10:24 +000024956case "$have_ucs4_tcl" in
24957 yes) unicode_size="4" ;;
24958 *) unicode_size="2" ;;
24959esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024960
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024961fi
24962
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024963
24964
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024965
Georg Brandl52d168a2008-01-07 18:10:24 +000024966case "$unicode_size" in
24967 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024968#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024969_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024970 ;;
24971 *) cat >>confdefs.h <<\_ACEOF
24972#define Py_UNICODE_SIZE 2
24973_ACEOF
24974 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024975esac
24976
Michael W. Hudson54241132001-12-07 15:38:26 +000024977
Martin v. Löwis11437992002-04-12 09:54:03 +000024978
24979
Georg Brandl52d168a2008-01-07 18:10:24 +000024980# wchar_t is only usable if it maps to an unsigned type
24981if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024982 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024983then
24984 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024985
Martin v. Löwis11437992002-04-12 09:54:03 +000024986cat >>confdefs.h <<\_ACEOF
24987#define HAVE_USABLE_WCHAR_T 1
24988_ACEOF
24989
Georg Brandl52d168a2008-01-07 18:10:24 +000024990 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024991#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024992_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024993
Georg Brandl52d168a2008-01-07 18:10:24 +000024994elif test "$ac_cv_sizeof_short" = "$unicode_size"
24995then
24996 PY_UNICODE_TYPE="unsigned short"
24997 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024998#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024999_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025000
Georg Brandl52d168a2008-01-07 18:10:24 +000025001elif test "$ac_cv_sizeof_long" = "$unicode_size"
25002then
25003 PY_UNICODE_TYPE="unsigned long"
25004 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025005#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025006_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025007
Georg Brandl52d168a2008-01-07 18:10:24 +000025008else
25009 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025010fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025011{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25012echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025013
25014# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025015{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25016echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025017if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025018 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025020 # See if sys/param.h defines the BYTE_ORDER macro.
25021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025022/* confdefs.h. */
25023_ACEOF
25024cat confdefs.h >>conftest.$ac_ext
25025cat >>conftest.$ac_ext <<_ACEOF
25026/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025027#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025028#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025029
Martin v. Löwis11437992002-04-12 09:54:03 +000025030int
25031main ()
25032{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025033#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25034 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25035 bogus endian macros
25036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025037
25038 ;
25039 return 0;
25040}
25041_ACEOF
25042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025043if { (ac_try="$ac_compile"
25044case "(($ac_try" in
25045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25046 *) ac_try_echo=$ac_try;;
25047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025051 grep -v '^ *+' conftest.er1 >conftest.err
25052 rm -f conftest.er1
25053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025055 (exit $ac_status); } && {
25056 test -z "$ac_c_werror_flag" ||
25057 test ! -s conftest.err
25058 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025059 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025061/* confdefs.h. */
25062_ACEOF
25063cat confdefs.h >>conftest.$ac_ext
25064cat >>conftest.$ac_ext <<_ACEOF
25065/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025066#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025067#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025068
Martin v. Löwis11437992002-04-12 09:54:03 +000025069int
25070main ()
25071{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025072#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025073 not big endian
25074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025075
25076 ;
25077 return 0;
25078}
25079_ACEOF
25080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025081if { (ac_try="$ac_compile"
25082case "(($ac_try" in
25083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25084 *) ac_try_echo=$ac_try;;
25085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025089 grep -v '^ *+' conftest.er1 >conftest.err
25090 rm -f conftest.er1
25091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025093 (exit $ac_status); } && {
25094 test -z "$ac_c_werror_flag" ||
25095 test ! -s conftest.err
25096 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025097 ac_cv_c_bigendian=yes
25098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025100sed 's/^/| /' conftest.$ac_ext >&5
25101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025102 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025104
25105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025108sed 's/^/| /' conftest.$ac_ext >&5
25109
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025110 # It does not; compile a test program.
25111if test "$cross_compiling" = yes; then
25112 # try to guess the endianness by grepping values into an object file
25113 ac_cv_c_bigendian=unknown
25114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025115/* confdefs.h. */
25116_ACEOF
25117cat confdefs.h >>conftest.$ac_ext
25118cat >>conftest.$ac_ext <<_ACEOF
25119/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025120short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25121short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25122void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25123short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25124short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25125void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025126int
25127main ()
25128{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025129 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025130 ;
25131 return 0;
25132}
25133_ACEOF
25134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025135if { (ac_try="$ac_compile"
25136case "(($ac_try" in
25137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25138 *) ac_try_echo=$ac_try;;
25139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025143 grep -v '^ *+' conftest.er1 >conftest.err
25144 rm -f conftest.er1
25145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025147 (exit $ac_status); } && {
25148 test -z "$ac_c_werror_flag" ||
25149 test ! -s conftest.err
25150 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025151 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025152 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025153fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025154if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25155 if test "$ac_cv_c_bigendian" = unknown; then
25156 ac_cv_c_bigendian=no
25157 else
25158 # finding both strings is unlikely to happen, but who knows?
25159 ac_cv_c_bigendian=unknown
25160 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025161fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025164sed 's/^/| /' conftest.$ac_ext >&5
25165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025166
Martin v. Löwis11437992002-04-12 09:54:03 +000025167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025168
25169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025170else
25171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025172/* confdefs.h. */
25173_ACEOF
25174cat confdefs.h >>conftest.$ac_ext
25175cat >>conftest.$ac_ext <<_ACEOF
25176/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025177$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025178int
25179main ()
25180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025182 /* Are we little or big endian? From Harbison&Steele. */
25183 union
25184 {
25185 long int l;
25186 char c[sizeof (long int)];
25187 } u;
25188 u.l = 1;
25189 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025190
25191 ;
25192 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025193}
Martin v. Löwis11437992002-04-12 09:54:03 +000025194_ACEOF
25195rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196if { (ac_try="$ac_link"
25197case "(($ac_try" in
25198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199 *) ac_try_echo=$ac_try;;
25200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025203 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025206 { (case "(($ac_try" in
25207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25208 *) ac_try_echo=$ac_try;;
25209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025212 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025214 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025215 ac_cv_c_bigendian=no
25216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025217 echo "$as_me: program exited with status $ac_status" >&5
25218echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025219sed 's/^/| /' conftest.$ac_ext >&5
25220
Martin v. Löwis11437992002-04-12 09:54:03 +000025221( exit $ac_status )
25222ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025224rm -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 +000025225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025226
25227
Martin v. Löwis11437992002-04-12 09:54:03 +000025228fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025229
25230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25231fi
25232{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25233echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25234case $ac_cv_c_bigendian in
25235 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025236
25237cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025238#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025239_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025240 ;;
25241 no)
25242 ;;
25243 *)
25244 { { echo "$as_me:$LINENO: error: unknown endianness
25245presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25246echo "$as_me: error: unknown endianness
25247presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025249esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025250
Michael W. Hudson54241132001-12-07 15:38:26 +000025251
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025252# Check whether right shifting a negative integer extends the sign bit
25253# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025254{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25255echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025256if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025257 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025258else
Martin v. Löwis11437992002-04-12 09:54:03 +000025259
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025260if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025261 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025262else
Martin v. Löwis11437992002-04-12 09:54:03 +000025263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025264/* confdefs.h. */
25265_ACEOF
25266cat confdefs.h >>conftest.$ac_ext
25267cat >>conftest.$ac_ext <<_ACEOF
25268/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025269
25270int main()
25271{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025272 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025273}
25274
Martin v. Löwis11437992002-04-12 09:54:03 +000025275_ACEOF
25276rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025277if { (ac_try="$ac_link"
25278case "(($ac_try" in
25279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25280 *) ac_try_echo=$ac_try;;
25281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025284 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025287 { (case "(($ac_try" in
25288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25289 *) ac_try_echo=$ac_try;;
25290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025292 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025293 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025295 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025296 ac_cv_rshift_extends_sign=yes
25297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025298 echo "$as_me: program exited with status $ac_status" >&5
25299echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025300sed 's/^/| /' conftest.$ac_ext >&5
25301
Martin v. Löwis11437992002-04-12 09:54:03 +000025302( exit $ac_status )
25303ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025305rm -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 +000025306fi
25307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308
25309fi
25310
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025311{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25312echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025313if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025314then
Martin v. Löwis11437992002-04-12 09:54:03 +000025315
25316cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025317#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025318_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025319
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025320fi
25321
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025322# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025323{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25324echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025325if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025327else
Martin v. Löwis11437992002-04-12 09:54:03 +000025328
25329cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025330/* confdefs.h. */
25331_ACEOF
25332cat confdefs.h >>conftest.$ac_ext
25333cat >>conftest.$ac_ext <<_ACEOF
25334/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025335#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025336int
25337main ()
25338{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025339
25340 FILE *f = fopen("/dev/null", "r");
25341 flockfile(f);
25342 getc_unlocked(f);
25343 funlockfile(f);
25344
Martin v. Löwis11437992002-04-12 09:54:03 +000025345 ;
25346 return 0;
25347}
25348_ACEOF
25349rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025350if { (ac_try="$ac_link"
25351case "(($ac_try" in
25352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25353 *) ac_try_echo=$ac_try;;
25354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025358 grep -v '^ *+' conftest.er1 >conftest.err
25359 rm -f conftest.er1
25360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025362 (exit $ac_status); } && {
25363 test -z "$ac_c_werror_flag" ||
25364 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025365 } && test -s conftest$ac_exeext &&
25366 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025367 ac_cv_have_getc_unlocked=yes
25368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025370sed 's/^/| /' conftest.$ac_ext >&5
25371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025372 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025374
25375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025376 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025377fi
25378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025379{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25380echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025381if test "$ac_cv_have_getc_unlocked" = yes
25382then
Martin v. Löwis11437992002-04-12 09:54:03 +000025383
25384cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025385#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025386_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025387
25388fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025389
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025390# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025391# save the value of LIBS so we don't actually link Python with readline
25392LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025393
Gregory P. Smith18820942008-09-07 06:24:49 +000025394# On some systems we need to link readline to a termcap compatible
25395# library. NOTE: Keep the precedence of listed libraries synchronised
25396# with setup.py.
25397py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025398{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25399echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025400for py_libtermcap in "" ncursesw ncurses curses termcap; do
25401 if test -z "$py_libtermcap"; then
25402 READLINE_LIBS="-lreadline"
25403 else
25404 READLINE_LIBS="-lreadline -l$py_libtermcap"
25405 fi
25406 LIBS="$READLINE_LIBS $LIBS_no_readline"
25407 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025408/* confdefs.h. */
25409_ACEOF
25410cat confdefs.h >>conftest.$ac_ext
25411cat >>conftest.$ac_ext <<_ACEOF
25412/* end confdefs.h. */
25413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025414/* Override any GCC internal prototype to avoid an error.
25415 Use char because int might match the return type of a GCC
25416 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025417#ifdef __cplusplus
25418extern "C"
25419#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025420char readline ();
25421int
25422main ()
25423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025424return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025425 ;
25426 return 0;
25427}
25428_ACEOF
25429rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025430if { (ac_try="$ac_link"
25431case "(($ac_try" in
25432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25433 *) ac_try_echo=$ac_try;;
25434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025436 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025437 ac_status=$?
25438 grep -v '^ *+' conftest.er1 >conftest.err
25439 rm -f conftest.er1
25440 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025442 (exit $ac_status); } && {
25443 test -z "$ac_c_werror_flag" ||
25444 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025445 } && test -s conftest$ac_exeext &&
25446 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025447 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025449 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025450sed 's/^/| /' conftest.$ac_ext >&5
25451
Gregory P. Smith18820942008-09-07 06:24:49 +000025452
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025454
25455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025456 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025457 if test $py_cv_lib_readline = yes; then
25458 break
25459 fi
25460done
25461# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25462#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025463if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025464 { echo "$as_me:$LINENO: result: none" >&5
25465echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025467 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25468echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025469
25470cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025471#define HAVE_LIBREADLINE 1
25472_ACEOF
25473
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025474fi
25475
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025476# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025477{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25478echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025479if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025480 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025481else
25482 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025483LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025484cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025485/* confdefs.h. */
25486_ACEOF
25487cat confdefs.h >>conftest.$ac_ext
25488cat >>conftest.$ac_ext <<_ACEOF
25489/* end confdefs.h. */
25490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491/* Override any GCC internal prototype to avoid an error.
25492 Use char because int might match the return type of a GCC
25493 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025494#ifdef __cplusplus
25495extern "C"
25496#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025497char rl_callback_handler_install ();
25498int
25499main ()
25500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025502 ;
25503 return 0;
25504}
25505_ACEOF
25506rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025507if { (ac_try="$ac_link"
25508case "(($ac_try" in
25509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25510 *) ac_try_echo=$ac_try;;
25511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025513 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025515 grep -v '^ *+' conftest.er1 >conftest.err
25516 rm -f conftest.er1
25517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025519 (exit $ac_status); } && {
25520 test -z "$ac_c_werror_flag" ||
25521 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025522 } && test -s conftest$ac_exeext &&
25523 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025524 ac_cv_lib_readline_rl_callback_handler_install=yes
25525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025526 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025527sed 's/^/| /' conftest.$ac_ext >&5
25528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025529 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025531
25532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025533 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025534LIBS=$ac_check_lib_save_LIBS
25535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025536{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25537echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25538if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025539
25540cat >>confdefs.h <<\_ACEOF
25541#define HAVE_RL_CALLBACK 1
25542_ACEOF
25543
25544fi
25545
25546
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025547# check for readline 2.2
25548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025549/* confdefs.h. */
25550_ACEOF
25551cat confdefs.h >>conftest.$ac_ext
25552cat >>conftest.$ac_ext <<_ACEOF
25553/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025554#include <readline/readline.h>
25555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025556if { (ac_try="$ac_cpp conftest.$ac_ext"
25557case "(($ac_try" in
25558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25559 *) ac_try_echo=$ac_try;;
25560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025563 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025564 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025565 rm -f conftest.er1
25566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568 (exit $ac_status); } >/dev/null && {
25569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25570 test ! -s conftest.err
25571 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025572 have_readline=yes
25573else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025575sed 's/^/| /' conftest.$ac_ext >&5
25576
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025577 have_readline=no
25578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025579
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025580rm -f conftest.err conftest.$ac_ext
25581if test $have_readline = yes
25582then
25583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025584/* confdefs.h. */
25585_ACEOF
25586cat confdefs.h >>conftest.$ac_ext
25587cat >>conftest.$ac_ext <<_ACEOF
25588/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025589#include <readline/readline.h>
25590
25591_ACEOF
25592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025593 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025594
25595cat >>confdefs.h <<\_ACEOF
25596#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25597_ACEOF
25598
25599fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025600rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025601
Antoine Pitroud5131772009-10-26 19:22:14 +000025602 cat >conftest.$ac_ext <<_ACEOF
25603/* confdefs.h. */
25604_ACEOF
25605cat confdefs.h >>conftest.$ac_ext
25606cat >>conftest.$ac_ext <<_ACEOF
25607/* end confdefs.h. */
25608#include <readline/readline.h>
25609
25610_ACEOF
25611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25612 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25613
25614cat >>confdefs.h <<\_ACEOF
25615#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25616_ACEOF
25617
25618fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025619rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025620
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025621fi
25622
Martin v. Löwis0daad592001-09-30 21:09:59 +000025623# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025624{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25625echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025626if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025628else
Martin v. Löwis11437992002-04-12 09:54:03 +000025629 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025630LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025632/* confdefs.h. */
25633_ACEOF
25634cat confdefs.h >>conftest.$ac_ext
25635cat >>conftest.$ac_ext <<_ACEOF
25636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025638/* Override any GCC internal prototype to avoid an error.
25639 Use char because int might match the return type of a GCC
25640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025641#ifdef __cplusplus
25642extern "C"
25643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025644char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025645int
25646main ()
25647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025648return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025649 ;
25650 return 0;
25651}
25652_ACEOF
25653rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025654if { (ac_try="$ac_link"
25655case "(($ac_try" in
25656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25657 *) ac_try_echo=$ac_try;;
25658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025660 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025662 grep -v '^ *+' conftest.er1 >conftest.err
25663 rm -f conftest.er1
25664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025666 (exit $ac_status); } && {
25667 test -z "$ac_c_werror_flag" ||
25668 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025669 } && test -s conftest$ac_exeext &&
25670 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025671 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025674sed 's/^/| /' conftest.$ac_ext >&5
25675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025676 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025678
25679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025681LIBS=$ac_check_lib_save_LIBS
25682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025683{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25684echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25685if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025686
Martin v. Löwis11437992002-04-12 09:54:03 +000025687cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025688#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025689_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025690
Martin v. Löwis0daad592001-09-30 21:09:59 +000025691fi
25692
Michael W. Hudson54241132001-12-07 15:38:26 +000025693
Thomas Wouters89d996e2007-09-08 17:39:28 +000025694# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025695{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25696echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025697if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025698 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025699else
25700 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025701LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025702cat >conftest.$ac_ext <<_ACEOF
25703/* confdefs.h. */
25704_ACEOF
25705cat confdefs.h >>conftest.$ac_ext
25706cat >>conftest.$ac_ext <<_ACEOF
25707/* end confdefs.h. */
25708
25709/* Override any GCC internal prototype to avoid an error.
25710 Use char because int might match the return type of a GCC
25711 builtin and then its argument prototype would still apply. */
25712#ifdef __cplusplus
25713extern "C"
25714#endif
25715char rl_completion_display_matches_hook ();
25716int
25717main ()
25718{
25719return rl_completion_display_matches_hook ();
25720 ;
25721 return 0;
25722}
25723_ACEOF
25724rm -f conftest.$ac_objext conftest$ac_exeext
25725if { (ac_try="$ac_link"
25726case "(($ac_try" in
25727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25728 *) ac_try_echo=$ac_try;;
25729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025731 (eval "$ac_link") 2>conftest.er1
25732 ac_status=$?
25733 grep -v '^ *+' conftest.er1 >conftest.err
25734 rm -f conftest.er1
25735 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025737 (exit $ac_status); } && {
25738 test -z "$ac_c_werror_flag" ||
25739 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025740 } && test -s conftest$ac_exeext &&
25741 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025742 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25743else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025744 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025745sed 's/^/| /' conftest.$ac_ext >&5
25746
25747 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25748fi
25749
25750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25751 conftest$ac_exeext conftest.$ac_ext
25752LIBS=$ac_check_lib_save_LIBS
25753fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025754{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25755echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25756if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025757
25758cat >>confdefs.h <<\_ACEOF
25759#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25760_ACEOF
25761
25762fi
25763
25764
Martin v. Löwis0daad592001-09-30 21:09:59 +000025765# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025766{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25767echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025768if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025769 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025770else
Martin v. Löwis11437992002-04-12 09:54:03 +000025771 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025772LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025774/* confdefs.h. */
25775_ACEOF
25776cat confdefs.h >>conftest.$ac_ext
25777cat >>conftest.$ac_ext <<_ACEOF
25778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025780/* Override any GCC internal prototype to avoid an error.
25781 Use char because int might match the return type of a GCC
25782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025783#ifdef __cplusplus
25784extern "C"
25785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025786char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025787int
25788main ()
25789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025790return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025791 ;
25792 return 0;
25793}
25794_ACEOF
25795rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796if { (ac_try="$ac_link"
25797case "(($ac_try" in
25798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25799 *) ac_try_echo=$ac_try;;
25800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025804 grep -v '^ *+' conftest.er1 >conftest.err
25805 rm -f conftest.er1
25806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025808 (exit $ac_status); } && {
25809 test -z "$ac_c_werror_flag" ||
25810 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025811 } && test -s conftest$ac_exeext &&
25812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025813 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025816sed 's/^/| /' conftest.$ac_ext >&5
25817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025818 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025820
25821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025823LIBS=$ac_check_lib_save_LIBS
25824fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025825{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25826echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25827if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025828
Martin v. Löwis11437992002-04-12 09:54:03 +000025829cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025830#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025831_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025832
Guido van Rossum353ae582001-07-10 16:45:32 +000025833fi
25834
Jack Jansendd19cf82001-12-06 22:36:17 +000025835
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025836# also in readline 4.2
25837cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025838/* confdefs.h. */
25839_ACEOF
25840cat confdefs.h >>conftest.$ac_ext
25841cat >>conftest.$ac_ext <<_ACEOF
25842/* end confdefs.h. */
25843#include <readline/readline.h>
25844_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025845if { (ac_try="$ac_cpp conftest.$ac_ext"
25846case "(($ac_try" in
25847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25848 *) ac_try_echo=$ac_try;;
25849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025851 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025852 ac_status=$?
25853 grep -v '^ *+' conftest.er1 >conftest.err
25854 rm -f conftest.er1
25855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857 (exit $ac_status); } >/dev/null && {
25858 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25859 test ! -s conftest.err
25860 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025861 have_readline=yes
25862else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025863 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025864sed 's/^/| /' conftest.$ac_ext >&5
25865
25866 have_readline=no
25867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025868
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025869rm -f conftest.err conftest.$ac_ext
25870if test $have_readline = yes
25871then
25872 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025873/* confdefs.h. */
25874_ACEOF
25875cat confdefs.h >>conftest.$ac_ext
25876cat >>conftest.$ac_ext <<_ACEOF
25877/* end confdefs.h. */
25878#include <readline/readline.h>
25879
25880_ACEOF
25881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25882 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25883
25884cat >>confdefs.h <<\_ACEOF
25885#define HAVE_RL_CATCH_SIGNAL 1
25886_ACEOF
25887
25888fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025889rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025890
25891fi
25892
Martin v. Löwis82bca632006-02-10 20:49:30 +000025893# End of readline checks: restore LIBS
25894LIBS=$LIBS_no_readline
25895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025896{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25897echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025898if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025899 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025900else
Martin v. Löwis11437992002-04-12 09:54:03 +000025901
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025902if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025903 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025904else
Martin v. Löwis11437992002-04-12 09:54:03 +000025905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025906/* confdefs.h. */
25907_ACEOF
25908cat confdefs.h >>conftest.$ac_ext
25909cat >>conftest.$ac_ext <<_ACEOF
25910/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025911
25912int main()
25913{
25914 int val1 = nice(1);
25915 if (val1 != -1 && val1 == nice(2))
25916 exit(0);
25917 exit(1);
25918}
25919
Martin v. Löwis11437992002-04-12 09:54:03 +000025920_ACEOF
25921rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922if { (ac_try="$ac_link"
25923case "(($ac_try" in
25924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25925 *) ac_try_echo=$ac_try;;
25926esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025928 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025932 { (case "(($ac_try" in
25933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25934 *) ac_try_echo=$ac_try;;
25935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025938 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025940 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025941 ac_cv_broken_nice=yes
25942else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025943 echo "$as_me: program exited with status $ac_status" >&5
25944echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025945sed 's/^/| /' conftest.$ac_ext >&5
25946
Martin v. Löwis11437992002-04-12 09:54:03 +000025947( exit $ac_status )
25948ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025950rm -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 +000025951fi
25952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025953
25954fi
25955
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025956{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25957echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025958if test "$ac_cv_broken_nice" = yes
25959then
Martin v. Löwis11437992002-04-12 09:54:03 +000025960
25961cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025962#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025963_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025964
25965fi
25966
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025967{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25968echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025969if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025970 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025971else
25972 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025973 ac_cv_broken_poll=no
25974else
25975 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025976/* confdefs.h. */
25977_ACEOF
25978cat confdefs.h >>conftest.$ac_ext
25979cat >>conftest.$ac_ext <<_ACEOF
25980/* end confdefs.h. */
25981
25982#include <poll.h>
25983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025984int main()
25985{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025986 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025987 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025988
25989 close (42);
25990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025991 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025992 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025993 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025994 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025995 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025996 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025997 return 1;
25998}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025999
26000_ACEOF
26001rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026002if { (ac_try="$ac_link"
26003case "(($ac_try" in
26004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26005 *) ac_try_echo=$ac_try;;
26006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026009 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026012 { (case "(($ac_try" in
26013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26014 *) ac_try_echo=$ac_try;;
26015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026017 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026018 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026020 (exit $ac_status); }; }; then
26021 ac_cv_broken_poll=yes
26022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026023 echo "$as_me: program exited with status $ac_status" >&5
26024echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026025sed 's/^/| /' conftest.$ac_ext >&5
26026
26027( exit $ac_status )
26028ac_cv_broken_poll=no
26029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030rm -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 +000026031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026032
26033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026034fi
26035
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026036{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26037echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026038if test "$ac_cv_broken_poll" = yes
26039then
26040
26041cat >>confdefs.h <<\_ACEOF
26042#define HAVE_BROKEN_POLL 1
26043_ACEOF
26044
26045fi
26046
Brett Cannon43802422005-02-10 20:48:03 +000026047# 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 +000026048# (which is not required by ISO C or UNIX spec) and/or if we support
26049# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026050{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26051echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026052if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026053 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026054else
26055 cat >conftest.$ac_ext <<_ACEOF
26056/* confdefs.h. */
26057_ACEOF
26058cat confdefs.h >>conftest.$ac_ext
26059cat >>conftest.$ac_ext <<_ACEOF
26060/* end confdefs.h. */
26061#include <sys/types.h>
26062#include <$ac_cv_struct_tm>
26063
26064
26065int
26066main ()
26067{
26068static struct tm ac_aggr;
26069if (ac_aggr.tm_zone)
26070return 0;
26071 ;
26072 return 0;
26073}
26074_ACEOF
26075rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026076if { (ac_try="$ac_compile"
26077case "(($ac_try" in
26078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26079 *) ac_try_echo=$ac_try;;
26080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026083 ac_status=$?
26084 grep -v '^ *+' conftest.er1 >conftest.err
26085 rm -f conftest.er1
26086 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026088 (exit $ac_status); } && {
26089 test -z "$ac_c_werror_flag" ||
26090 test ! -s conftest.err
26091 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026092 ac_cv_member_struct_tm_tm_zone=yes
26093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026094 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026095sed 's/^/| /' conftest.$ac_ext >&5
26096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026098/* confdefs.h. */
26099_ACEOF
26100cat confdefs.h >>conftest.$ac_ext
26101cat >>conftest.$ac_ext <<_ACEOF
26102/* end confdefs.h. */
26103#include <sys/types.h>
26104#include <$ac_cv_struct_tm>
26105
26106
26107int
26108main ()
26109{
26110static struct tm ac_aggr;
26111if (sizeof ac_aggr.tm_zone)
26112return 0;
26113 ;
26114 return 0;
26115}
26116_ACEOF
26117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118if { (ac_try="$ac_compile"
26119case "(($ac_try" in
26120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26121 *) ac_try_echo=$ac_try;;
26122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026125 ac_status=$?
26126 grep -v '^ *+' conftest.er1 >conftest.err
26127 rm -f conftest.er1
26128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026130 (exit $ac_status); } && {
26131 test -z "$ac_c_werror_flag" ||
26132 test ! -s conftest.err
26133 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026134 ac_cv_member_struct_tm_tm_zone=yes
26135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026136 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026137sed 's/^/| /' conftest.$ac_ext >&5
26138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026139 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026141
26142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026144
26145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026147{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26148echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26149if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026150
26151cat >>confdefs.h <<_ACEOF
26152#define HAVE_STRUCT_TM_TM_ZONE 1
26153_ACEOF
26154
26155
26156fi
26157
26158if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26159
26160cat >>confdefs.h <<\_ACEOF
26161#define HAVE_TM_ZONE 1
26162_ACEOF
26163
26164else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026165 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26166echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026168 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026169else
26170 cat >conftest.$ac_ext <<_ACEOF
26171/* confdefs.h. */
26172_ACEOF
26173cat confdefs.h >>conftest.$ac_ext
26174cat >>conftest.$ac_ext <<_ACEOF
26175/* end confdefs.h. */
26176#include <time.h>
26177
26178int
26179main ()
26180{
26181#ifndef tzname
26182 (void) tzname;
26183#endif
26184
26185 ;
26186 return 0;
26187}
26188_ACEOF
26189rm -f conftest.$ac_objext
26190if { (ac_try="$ac_compile"
26191case "(($ac_try" in
26192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26193 *) ac_try_echo=$ac_try;;
26194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026196 (eval "$ac_compile") 2>conftest.er1
26197 ac_status=$?
26198 grep -v '^ *+' conftest.er1 >conftest.err
26199 rm -f conftest.er1
26200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026202 (exit $ac_status); } && {
26203 test -z "$ac_c_werror_flag" ||
26204 test ! -s conftest.err
26205 } && test -s conftest.$ac_objext; then
26206 ac_cv_have_decl_tzname=yes
26207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026208 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209sed 's/^/| /' conftest.$ac_ext >&5
26210
26211 ac_cv_have_decl_tzname=no
26212fi
26213
26214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26215fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026216{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26217echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26218if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026219
26220cat >>confdefs.h <<_ACEOF
26221#define HAVE_DECL_TZNAME 1
26222_ACEOF
26223
26224
26225else
26226 cat >>confdefs.h <<_ACEOF
26227#define HAVE_DECL_TZNAME 0
26228_ACEOF
26229
26230
26231fi
26232
26233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026234 { echo "$as_me:$LINENO: checking for tzname" >&5
26235echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026236if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026237 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026238else
26239 cat >conftest.$ac_ext <<_ACEOF
26240/* confdefs.h. */
26241_ACEOF
26242cat confdefs.h >>conftest.$ac_ext
26243cat >>conftest.$ac_ext <<_ACEOF
26244/* end confdefs.h. */
26245#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026246#if !HAVE_DECL_TZNAME
26247extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026248#endif
26249
26250int
26251main ()
26252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026253return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026254 ;
26255 return 0;
26256}
26257_ACEOF
26258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026259if { (ac_try="$ac_link"
26260case "(($ac_try" in
26261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26262 *) ac_try_echo=$ac_try;;
26263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026266 ac_status=$?
26267 grep -v '^ *+' conftest.er1 >conftest.err
26268 rm -f conftest.er1
26269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026271 (exit $ac_status); } && {
26272 test -z "$ac_c_werror_flag" ||
26273 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026274 } && test -s conftest$ac_exeext &&
26275 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026276 ac_cv_var_tzname=yes
26277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026278 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026279sed 's/^/| /' conftest.$ac_ext >&5
26280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026283
26284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026285 conftest$ac_exeext conftest.$ac_ext
26286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026287{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26288echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026289 if test $ac_cv_var_tzname = yes; then
26290
26291cat >>confdefs.h <<\_ACEOF
26292#define HAVE_TZNAME 1
26293_ACEOF
26294
26295 fi
26296fi
26297
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026298
Martin v. Löwis1d459062005-03-14 21:23:33 +000026299# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026300{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26301echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026302if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026303 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026304else
26305
26306if test "$cross_compiling" = yes; then
26307 ac_cv_working_tzset=no
26308else
26309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026310/* confdefs.h. */
26311_ACEOF
26312cat confdefs.h >>conftest.$ac_ext
26313cat >>conftest.$ac_ext <<_ACEOF
26314/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026315
26316#include <stdlib.h>
26317#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026318#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026319
26320#if HAVE_TZNAME
26321extern char *tzname[];
26322#endif
26323
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026324int main()
26325{
Brett Cannon18367812003-09-19 00:59:16 +000026326 /* Note that we need to ensure that not only does tzset(3)
26327 do 'something' with localtime, but it works as documented
26328 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026329 This includes making sure that tzname is set properly if
26330 tm->tm_zone does not exist since it is the alternative way
26331 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026332
26333 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026334 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026335 */
26336
Martin v. Löwis1d459062005-03-14 21:23:33 +000026337 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026338 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26339
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026340 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026341 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026342 if (localtime(&groundhogday)->tm_hour != 0)
26343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026344#if HAVE_TZNAME
26345 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26346 if (strcmp(tzname[0], "UTC") ||
26347 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26348 exit(1);
26349#endif
Brett Cannon18367812003-09-19 00:59:16 +000026350
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026351 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026352 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026353 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026354 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026355#if HAVE_TZNAME
26356 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26357 exit(1);
26358#endif
Brett Cannon18367812003-09-19 00:59:16 +000026359
26360 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26361 tzset();
26362 if (localtime(&groundhogday)->tm_hour != 11)
26363 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026364#if HAVE_TZNAME
26365 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26366 exit(1);
26367#endif
26368
26369#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026370 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26371 exit(1);
26372 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26373 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026374#endif
Brett Cannon18367812003-09-19 00:59:16 +000026375
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026376 exit(0);
26377}
26378
26379_ACEOF
26380rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026381if { (ac_try="$ac_link"
26382case "(($ac_try" in
26383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26384 *) ac_try_echo=$ac_try;;
26385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026387 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026388 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026390 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026391 { (case "(($ac_try" in
26392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26393 *) ac_try_echo=$ac_try;;
26394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026396 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026397 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026399 (exit $ac_status); }; }; then
26400 ac_cv_working_tzset=yes
26401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026402 echo "$as_me: program exited with status $ac_status" >&5
26403echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026404sed 's/^/| /' conftest.$ac_ext >&5
26405
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026406( exit $ac_status )
26407ac_cv_working_tzset=no
26408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026409rm -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 +000026410fi
26411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026412
26413fi
26414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026415{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26416echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026417if test "$ac_cv_working_tzset" = yes
26418then
26419
26420cat >>confdefs.h <<\_ACEOF
26421#define HAVE_WORKING_TZSET 1
26422_ACEOF
26423
26424fi
26425
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026426# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026427{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26428echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026429if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026431else
26432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026433/* confdefs.h. */
26434_ACEOF
26435cat confdefs.h >>conftest.$ac_ext
26436cat >>conftest.$ac_ext <<_ACEOF
26437/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026438#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026439int
26440main ()
26441{
26442
26443struct stat st;
26444st.st_mtim.tv_nsec = 1;
26445
26446 ;
26447 return 0;
26448}
26449_ACEOF
26450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451if { (ac_try="$ac_compile"
26452case "(($ac_try" in
26453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26454 *) ac_try_echo=$ac_try;;
26455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026459 grep -v '^ *+' conftest.er1 >conftest.err
26460 rm -f conftest.er1
26461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026463 (exit $ac_status); } && {
26464 test -z "$ac_c_werror_flag" ||
26465 test ! -s conftest.err
26466 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026467 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026470sed 's/^/| /' conftest.$ac_ext >&5
26471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026473fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26476fi
26477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026478{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26479echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026480if test "$ac_cv_stat_tv_nsec" = yes
26481then
26482
26483cat >>confdefs.h <<\_ACEOF
26484#define HAVE_STAT_TV_NSEC 1
26485_ACEOF
26486
26487fi
26488
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026489# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026490{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26491echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026492if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026494else
26495 cat >conftest.$ac_ext <<_ACEOF
26496/* confdefs.h. */
26497_ACEOF
26498cat confdefs.h >>conftest.$ac_ext
26499cat >>conftest.$ac_ext <<_ACEOF
26500/* end confdefs.h. */
26501#include <sys/stat.h>
26502int
26503main ()
26504{
26505
26506struct stat st;
26507st.st_mtimespec.tv_nsec = 1;
26508
26509 ;
26510 return 0;
26511}
26512_ACEOF
26513rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026514if { (ac_try="$ac_compile"
26515case "(($ac_try" in
26516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26517 *) ac_try_echo=$ac_try;;
26518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026521 ac_status=$?
26522 grep -v '^ *+' conftest.er1 >conftest.err
26523 rm -f conftest.er1
26524 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026526 (exit $ac_status); } && {
26527 test -z "$ac_c_werror_flag" ||
26528 test ! -s conftest.err
26529 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026530 ac_cv_stat_tv_nsec2=yes
26531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026532 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026533sed 's/^/| /' conftest.$ac_ext >&5
26534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026535 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026536fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26539fi
26540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026541{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26542echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026543if test "$ac_cv_stat_tv_nsec2" = yes
26544then
26545
26546cat >>confdefs.h <<\_ACEOF
26547#define HAVE_STAT_TV_NSEC2 1
26548_ACEOF
26549
26550fi
26551
Jack Jansen666b1e72001-10-31 12:11:48 +000026552# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026553{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26554echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026555if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026556 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026557else
Martin v. Löwis11437992002-04-12 09:54:03 +000026558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026559/* confdefs.h. */
26560_ACEOF
26561cat confdefs.h >>conftest.$ac_ext
26562cat >>conftest.$ac_ext <<_ACEOF
26563/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026564#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026565int
26566main ()
26567{
Jack Jansen666b1e72001-10-31 12:11:48 +000026568
26569 int rtn;
26570 rtn = mvwdelch(0,0,0);
26571
Martin v. Löwis11437992002-04-12 09:54:03 +000026572 ;
26573 return 0;
26574}
26575_ACEOF
26576rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026577if { (ac_try="$ac_compile"
26578case "(($ac_try" in
26579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26580 *) ac_try_echo=$ac_try;;
26581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026585 grep -v '^ *+' conftest.er1 >conftest.err
26586 rm -f conftest.er1
26587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026589 (exit $ac_status); } && {
26590 test -z "$ac_c_werror_flag" ||
26591 test ! -s conftest.err
26592 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026593 ac_cv_mvwdelch_is_expression=yes
26594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026596sed 's/^/| /' conftest.$ac_ext >&5
26597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026598 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026599fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26602fi
26603
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026604{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26605echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026606
26607if test "$ac_cv_mvwdelch_is_expression" = yes
26608then
Martin v. Löwis11437992002-04-12 09:54:03 +000026609
26610cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026611#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026612_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026613
26614fi
26615
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026616{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26617echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026618if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026619 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026620else
Martin v. Löwis11437992002-04-12 09:54:03 +000026621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026622/* confdefs.h. */
26623_ACEOF
26624cat confdefs.h >>conftest.$ac_ext
26625cat >>conftest.$ac_ext <<_ACEOF
26626/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026627#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026628int
26629main ()
26630{
Jack Jansen666b1e72001-10-31 12:11:48 +000026631
26632 WINDOW *w;
26633 w->_flags = 0;
26634
Martin v. Löwis11437992002-04-12 09:54:03 +000026635 ;
26636 return 0;
26637}
26638_ACEOF
26639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026640if { (ac_try="$ac_compile"
26641case "(($ac_try" in
26642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26643 *) ac_try_echo=$ac_try;;
26644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026648 grep -v '^ *+' conftest.er1 >conftest.err
26649 rm -f conftest.er1
26650 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652 (exit $ac_status); } && {
26653 test -z "$ac_c_werror_flag" ||
26654 test ! -s conftest.err
26655 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026656 ac_cv_window_has_flags=yes
26657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026659sed 's/^/| /' conftest.$ac_ext >&5
26660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026661 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026662fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26665fi
26666
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026667{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26668echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026669
Jack Jansen666b1e72001-10-31 12:11:48 +000026670
26671if test "$ac_cv_window_has_flags" = yes
26672then
Martin v. Löwis11437992002-04-12 09:54:03 +000026673
26674cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026675#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026676_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026677
26678fi
26679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026680{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26681echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026682cat >conftest.$ac_ext <<_ACEOF
26683/* confdefs.h. */
26684_ACEOF
26685cat confdefs.h >>conftest.$ac_ext
26686cat >>conftest.$ac_ext <<_ACEOF
26687/* end confdefs.h. */
26688#include <curses.h>
26689int
26690main ()
26691{
26692void *x=is_term_resized
26693 ;
26694 return 0;
26695}
26696_ACEOF
26697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026698if { (ac_try="$ac_compile"
26699case "(($ac_try" in
26700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26701 *) ac_try_echo=$ac_try;;
26702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026704 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026705 ac_status=$?
26706 grep -v '^ *+' conftest.er1 >conftest.err
26707 rm -f conftest.er1
26708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026710 (exit $ac_status); } && {
26711 test -z "$ac_c_werror_flag" ||
26712 test ! -s conftest.err
26713 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026714
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026715cat >>confdefs.h <<\_ACEOF
26716#define HAVE_CURSES_IS_TERM_RESIZED 1
26717_ACEOF
26718
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026719 { echo "$as_me:$LINENO: result: yes" >&5
26720echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026722 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026723sed 's/^/| /' conftest.$ac_ext >&5
26724
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026725 { echo "$as_me:$LINENO: result: no" >&5
26726echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026727
26728fi
26729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26731
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026732{ echo "$as_me:$LINENO: checking for resize_term" >&5
26733echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026734cat >conftest.$ac_ext <<_ACEOF
26735/* confdefs.h. */
26736_ACEOF
26737cat confdefs.h >>conftest.$ac_ext
26738cat >>conftest.$ac_ext <<_ACEOF
26739/* end confdefs.h. */
26740#include <curses.h>
26741int
26742main ()
26743{
26744void *x=resize_term
26745 ;
26746 return 0;
26747}
26748_ACEOF
26749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750if { (ac_try="$ac_compile"
26751case "(($ac_try" in
26752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26753 *) ac_try_echo=$ac_try;;
26754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026756 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026757 ac_status=$?
26758 grep -v '^ *+' conftest.er1 >conftest.err
26759 rm -f conftest.er1
26760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026762 (exit $ac_status); } && {
26763 test -z "$ac_c_werror_flag" ||
26764 test ! -s conftest.err
26765 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026766
26767cat >>confdefs.h <<\_ACEOF
26768#define HAVE_CURSES_RESIZE_TERM 1
26769_ACEOF
26770
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026771 { echo "$as_me:$LINENO: result: yes" >&5
26772echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026774 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026775sed 's/^/| /' conftest.$ac_ext >&5
26776
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026777 { echo "$as_me:$LINENO: result: no" >&5
26778echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026779
26780fi
26781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26783
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026784{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26785echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026786cat >conftest.$ac_ext <<_ACEOF
26787/* confdefs.h. */
26788_ACEOF
26789cat confdefs.h >>conftest.$ac_ext
26790cat >>conftest.$ac_ext <<_ACEOF
26791/* end confdefs.h. */
26792#include <curses.h>
26793int
26794main ()
26795{
26796void *x=resizeterm
26797 ;
26798 return 0;
26799}
26800_ACEOF
26801rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026802if { (ac_try="$ac_compile"
26803case "(($ac_try" in
26804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26805 *) ac_try_echo=$ac_try;;
26806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026809 ac_status=$?
26810 grep -v '^ *+' conftest.er1 >conftest.err
26811 rm -f conftest.er1
26812 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026814 (exit $ac_status); } && {
26815 test -z "$ac_c_werror_flag" ||
26816 test ! -s conftest.err
26817 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026818
26819cat >>confdefs.h <<\_ACEOF
26820#define HAVE_CURSES_RESIZETERM 1
26821_ACEOF
26822
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026823 { echo "$as_me:$LINENO: result: yes" >&5
26824echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026826 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026827sed 's/^/| /' conftest.$ac_ext >&5
26828
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026829 { echo "$as_me:$LINENO: result: no" >&5
26830echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026831
26832fi
26833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026836{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26837echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026838
26839if test -r /dev/ptmx
26840then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026841 { echo "$as_me:$LINENO: result: yes" >&5
26842echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026843
26844cat >>confdefs.h <<\_ACEOF
26845#define HAVE_DEV_PTMX 1
26846_ACEOF
26847
Thomas Wouters89f507f2006-12-13 04:49:30 +000026848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026849 { echo "$as_me:$LINENO: result: no" >&5
26850echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026851fi
26852
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026853{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26854echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026855
26856if test -r /dev/ptc
26857then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026858 { echo "$as_me:$LINENO: result: yes" >&5
26859echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026860
26861cat >>confdefs.h <<\_ACEOF
26862#define HAVE_DEV_PTC 1
26863_ACEOF
26864
Thomas Wouters89f507f2006-12-13 04:49:30 +000026865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026866 { echo "$as_me:$LINENO: result: no" >&5
26867echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026868fi
26869
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026870if test "$have_long_long" = yes
26871then
26872 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26873echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26874 if test "${ac_cv_have_long_long_format+set}" = set; then
26875 echo $ECHO_N "(cached) $ECHO_C" >&6
26876else
26877 if test "$cross_compiling" = yes; then
26878 ac_cv_have_long_long_format=no
26879else
26880 cat >conftest.$ac_ext <<_ACEOF
26881/* confdefs.h. */
26882_ACEOF
26883cat confdefs.h >>conftest.$ac_ext
26884cat >>conftest.$ac_ext <<_ACEOF
26885/* end confdefs.h. */
26886
26887 #include <stdio.h>
26888 #include <stddef.h>
26889 #include <string.h>
26890
26891 #ifdef HAVE_SYS_TYPES_H
26892 #include <sys/types.h>
26893 #endif
26894
26895 int main()
26896 {
26897 char buffer[256];
26898
26899 if (sprintf(buffer, "%lld", (long long)123) < 0)
26900 return 1;
26901 if (strcmp(buffer, "123"))
26902 return 1;
26903
26904 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26905 return 1;
26906 if (strcmp(buffer, "-123"))
26907 return 1;
26908
26909 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26910 return 1;
26911 if (strcmp(buffer, "123"))
26912 return 1;
26913
26914 return 0;
26915 }
26916
26917_ACEOF
26918rm -f conftest$ac_exeext
26919if { (ac_try="$ac_link"
26920case "(($ac_try" in
26921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26922 *) ac_try_echo=$ac_try;;
26923esac
26924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26925 (eval "$ac_link") 2>&5
26926 ac_status=$?
26927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26929 { (case "(($ac_try" in
26930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26931 *) ac_try_echo=$ac_try;;
26932esac
26933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26934 (eval "$ac_try") 2>&5
26935 ac_status=$?
26936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26937 (exit $ac_status); }; }; then
26938 ac_cv_have_long_long_format=yes
26939else
26940 echo "$as_me: program exited with status $ac_status" >&5
26941echo "$as_me: failed program was:" >&5
26942sed 's/^/| /' conftest.$ac_ext >&5
26943
26944( exit $ac_status )
26945ac_cv_have_long_long_format=no
26946fi
26947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26948fi
26949
26950
26951
26952fi
26953
26954 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26955echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26956fi
26957
Mark Dickinson89d7d412009-12-31 20:50:59 +000026958if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026959then
26960
26961cat >>confdefs.h <<\_ACEOF
26962#define PY_FORMAT_LONG_LONG "ll"
26963_ACEOF
26964
26965fi
26966
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026967if test $ac_sys_system = Darwin
26968then
26969 LIBS="$LIBS -framework CoreFoundation"
26970fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026972{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26973echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026974if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026975 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026976else
26977 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026978 ac_cv_have_size_t_format="cross -- assuming yes"
26979
Thomas Wouters477c8d52006-05-27 19:21:47 +000026980else
26981 cat >conftest.$ac_ext <<_ACEOF
26982/* confdefs.h. */
26983_ACEOF
26984cat confdefs.h >>conftest.$ac_ext
26985cat >>conftest.$ac_ext <<_ACEOF
26986/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026987
Thomas Wouters477c8d52006-05-27 19:21:47 +000026988#include <stdio.h>
26989#include <stddef.h>
26990#include <string.h>
26991
Christian Heimes2c181612007-12-17 20:04:13 +000026992#ifdef HAVE_SYS_TYPES_H
26993#include <sys/types.h>
26994#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026995
26996#ifdef HAVE_SSIZE_T
26997typedef ssize_t Py_ssize_t;
26998#elif SIZEOF_VOID_P == SIZEOF_LONG
26999typedef long Py_ssize_t;
27000#else
27001typedef int Py_ssize_t;
27002#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027003
Christian Heimes2c181612007-12-17 20:04:13 +000027004int main()
27005{
27006 char buffer[256];
27007
Thomas Wouters477c8d52006-05-27 19:21:47 +000027008 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27009 return 1;
27010
Thomas Wouters89f507f2006-12-13 04:49:30 +000027011 if (strcmp(buffer, "123"))
27012 return 1;
27013
27014 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27015 return 1;
27016
27017 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027018 return 1;
27019
27020 return 0;
27021}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027022
Thomas Wouters477c8d52006-05-27 19:21:47 +000027023_ACEOF
27024rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027025if { (ac_try="$ac_link"
27026case "(($ac_try" in
27027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27028 *) ac_try_echo=$ac_try;;
27029esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027031 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027032 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027035 { (case "(($ac_try" in
27036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27037 *) ac_try_echo=$ac_try;;
27038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027040 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027041 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027043 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027044 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027046 echo "$as_me: program exited with status $ac_status" >&5
27047echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027048sed 's/^/| /' conftest.$ac_ext >&5
27049
27050( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027051ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027052fi
27053rm -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 +000027054fi
27055
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027056
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027057fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027058{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27059echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027060if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027061
27062cat >>confdefs.h <<\_ACEOF
27063#define PY_FORMAT_SIZE_T "z"
27064_ACEOF
27065
27066fi
27067
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027068{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27069echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027070if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027071 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027072else
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027074/* confdefs.h. */
27075_ACEOF
27076cat confdefs.h >>conftest.$ac_ext
27077cat >>conftest.$ac_ext <<_ACEOF
27078/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027079
27080#ifdef HAVE_SYS_TYPES_H
27081#include <sys/types.h>
27082#endif
27083#ifdef HAVE_SYS_SOCKET_H
27084#include <sys/socket.h>
27085#endif
27086
27087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027088typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027089int
27090main ()
27091{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027092if ((ac__type_new_ *) 0)
27093 return 0;
27094if (sizeof (ac__type_new_))
27095 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027096 ;
27097 return 0;
27098}
27099_ACEOF
27100rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027101if { (ac_try="$ac_compile"
27102case "(($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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027109 grep -v '^ *+' conftest.er1 >conftest.err
27110 rm -f conftest.er1
27111 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027113 (exit $ac_status); } && {
27114 test -z "$ac_c_werror_flag" ||
27115 test ! -s conftest.err
27116 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027117 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027118else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027120sed 's/^/| /' conftest.$ac_ext >&5
27121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027122 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027124
27125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027126fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027127{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27128echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27129if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027130 :
27131else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027132
Martin v. Löwis01c04012002-11-11 14:58:44 +000027133cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027134#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027135_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027136
27137fi
27138
Michael W. Hudson54241132001-12-07 15:38:26 +000027139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027140{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27141echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027142if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027143 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027144else
27145 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027146 ac_cv_broken_mbstowcs=no
27147else
27148 cat >conftest.$ac_ext <<_ACEOF
27149/* confdefs.h. */
27150_ACEOF
27151cat confdefs.h >>conftest.$ac_ext
27152cat >>conftest.$ac_ext <<_ACEOF
27153/* end confdefs.h. */
27154
27155#include<stdlib.h>
27156int main() {
27157 size_t len = -1;
27158 const char *str = "text";
27159 len = mbstowcs(NULL, str, 0);
27160 return (len != 4);
27161}
27162
27163_ACEOF
27164rm -f conftest$ac_exeext
27165if { (ac_try="$ac_link"
27166case "(($ac_try" in
27167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27168 *) ac_try_echo=$ac_try;;
27169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027171 (eval "$ac_link") 2>&5
27172 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027174 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27175 { (case "(($ac_try" in
27176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27177 *) ac_try_echo=$ac_try;;
27178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027180 (eval "$ac_try") 2>&5
27181 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027183 (exit $ac_status); }; }; then
27184 ac_cv_broken_mbstowcs=no
27185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027186 echo "$as_me: program exited with status $ac_status" >&5
27187echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027188sed 's/^/| /' conftest.$ac_ext >&5
27189
27190( exit $ac_status )
27191ac_cv_broken_mbstowcs=yes
27192fi
27193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27194fi
27195
27196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027197fi
27198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027199{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27200echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027201if test "$ac_cv_broken_mbstowcs" = yes
27202then
27203
27204cat >>confdefs.h <<\_ACEOF
27205#define HAVE_BROKEN_MBSTOWCS 1
27206_ACEOF
27207
27208fi
27209
Antoine Pitroub52ec782009-01-25 16:34:23 +000027210# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027211{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27212echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027213
27214# Check whether --with-computed-gotos was given.
27215if test "${with_computed_gotos+set}" = set; then
27216 withval=$with_computed_gotos;
27217if test "$withval" != no
27218then
27219
27220cat >>confdefs.h <<\_ACEOF
27221#define USE_COMPUTED_GOTOS 1
27222_ACEOF
27223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027224 { echo "$as_me:$LINENO: result: yes" >&5
27225echo "${ECHO_T}yes" >&6; }
27226else { echo "$as_me:$LINENO: result: no" >&5
27227echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027228fi
27229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027230 { echo "$as_me:$LINENO: result: no" >&5
27231echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027232fi
27233
27234
27235
Michael W. Hudson54241132001-12-07 15:38:26 +000027236
27237
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027238for h in `(cd $srcdir;echo Python/thread_*.h)`
27239do
27240 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27241done
27242
Michael W. Hudson54241132001-12-07 15:38:26 +000027243
Neal Norwitzd24499d2005-12-18 21:36:39 +000027244SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027245{ echo "$as_me:$LINENO: checking for build directories" >&5
27246echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027247for dir in $SRCDIRS; do
27248 if test ! -d $dir; then
27249 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027250 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027251done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027252{ echo "$as_me:$LINENO: result: done" >&5
27253echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027254
Guido van Rossum627b2d71993-12-24 10:39:16 +000027255# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027256ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027257
Martin v. Löwis11437992002-04-12 09:54:03 +000027258cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027259# This file is a shell script that caches the results of configure
27260# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027261# scripts and configure runs, see configure's option --config-cache.
27262# It is not useful on other systems. If it contains results you don't
27263# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027264#
Martin v. Löwis11437992002-04-12 09:54:03 +000027265# config.status only pays attention to the cache file if you give it
27266# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027267#
Skip Montanaro6dead952003-09-25 14:50:04 +000027268# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027269# loading this file, other *unset* `ac_cv_foo' will be assigned the
27270# following values.
27271
27272_ACEOF
27273
Guido van Rossumf78abae1997-01-21 22:02:36 +000027274# The following way of writing the cache mishandles newlines in values,
27275# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027276# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027277# Ultrix sh set writes to stderr and can't be redirected directly,
27278# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027279(
27280 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27281 eval ac_val=\$$ac_var
27282 case $ac_val in #(
27283 *${as_nl}*)
27284 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027285 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27286echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027287 esac
27288 case $ac_var in #(
27289 _ | IFS | as_nl) ;; #(
27290 *) $as_unset $ac_var ;;
27291 esac ;;
27292 esac
27293 done
27294
Martin v. Löwis11437992002-04-12 09:54:03 +000027295 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027296 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27297 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027298 # `set' does not quote correctly, so add quotes (double-quote
27299 # substitution turns \\\\ into \\, and sed turns \\ into \).
27300 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027301 "s/'/'\\\\''/g;
27302 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027304 *)
27305 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027306 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027307 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027308 esac |
27309 sort
27310) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027311 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027312 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027313 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027314 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027315 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27316 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027317 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27318 :end' >>confcache
27319if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27320 if test -w "$cache_file"; then
27321 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027322 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27323echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027324 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027325 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027326 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27327echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027328 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027329fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027330rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027332test "x$prefix" = xNONE && prefix=$ac_default_prefix
27333# Let make expand exec_prefix.
27334test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027336DEFS=-DHAVE_CONFIG_H
27337
Skip Montanaro6dead952003-09-25 14:50:04 +000027338ac_libobjs=
27339ac_ltlibobjs=
27340for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27341 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027342 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027343 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027344 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27345 # will be set to the directory where LIBOBJS objects are built.
27346 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27347 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027348done
27349LIBOBJS=$ac_libobjs
27350
27351LTLIBOBJS=$ac_ltlibobjs
27352
27353
Martin v. Löwis11437992002-04-12 09:54:03 +000027354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027355: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027356ac_clean_files_save=$ac_clean_files
27357ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027358{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27359echo "$as_me: creating $CONFIG_STATUS" >&6;}
27360cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027361#! $SHELL
27362# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027363# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027364# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027365# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027366
Martin v. Löwis11437992002-04-12 09:54:03 +000027367debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027368ac_cs_recheck=false
27369ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027370SHELL=\${CONFIG_SHELL-$SHELL}
27371_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027372
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027373cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027374## --------------------- ##
27375## M4sh Initialization. ##
27376## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378# Be more Bourne compatible
27379DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027380if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27381 emulate sh
27382 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027383 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027384 # is contrary to our usage. Disable this feature.
27385 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027386 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027387else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027388 case `(set -o) 2>/dev/null` in
27389 *posix*) set -o posix ;;
27390esac
27391
Michael W. Hudson54241132001-12-07 15:38:26 +000027392fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027393
27394
Michael W. Hudson54241132001-12-07 15:38:26 +000027395
Michael W. Hudson54241132001-12-07 15:38:26 +000027396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027397# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027398# Avoid depending upon Character Ranges.
27399as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27400as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27401as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27402as_cr_digits='0123456789'
27403as_cr_alnum=$as_cr_Letters$as_cr_digits
27404
27405# The user is always right.
27406if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027407 echo "#! /bin/sh" >conf$$.sh
27408 echo "exit 0" >>conf$$.sh
27409 chmod +x conf$$.sh
27410 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27411 PATH_SEPARATOR=';'
27412 else
27413 PATH_SEPARATOR=:
27414 fi
27415 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027416fi
27417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027418# Support unset when possible.
27419if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27420 as_unset=unset
27421else
27422 as_unset=false
27423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027425
27426# IFS
27427# We need space, tab and new line, in precisely that order. Quoting is
27428# there to prevent editors from complaining about space-tab.
27429# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27430# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027431as_nl='
27432'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027433IFS=" "" $as_nl"
27434
27435# Find who we are. Look in the path if we contain no directory separator.
27436case $0 in
27437 *[\\/]* ) as_myself=$0 ;;
27438 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027439for as_dir in $PATH
27440do
27441 IFS=$as_save_IFS
27442 test -z "$as_dir" && as_dir=.
27443 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27444done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027447 ;;
27448esac
27449# We did not find ourselves, most probably we were run as `sh COMMAND'
27450# in which case we are not to be found in the path.
27451if test "x$as_myself" = x; then
27452 as_myself=$0
27453fi
27454if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 { (exit 1); exit 1; }
27457fi
27458
27459# Work around bugs in pre-3.0 UWIN ksh.
27460for as_var in ENV MAIL MAILPATH
27461do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27462done
27463PS1='$ '
27464PS2='> '
27465PS4='+ '
27466
27467# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027468for as_var in \
27469 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27470 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27471 LC_TELEPHONE LC_TIME
27472do
27473 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27474 eval $as_var=C; export $as_var
27475 else
27476 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27477 fi
27478done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027479
27480# Required to use basename.
27481if expr a : '\(a\)' >/dev/null 2>&1 &&
27482 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27483 as_expr=expr
27484else
27485 as_expr=false
27486fi
27487
27488if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27489 as_basename=basename
27490else
27491 as_basename=false
27492fi
27493
27494
27495# Name of the executable.
27496as_me=`$as_basename -- "$0" ||
27497$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27498 X"$0" : 'X\(//\)$' \| \
27499 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027500echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027501 sed '/^.*\/\([^/][^/]*\)\/*$/{
27502 s//\1/
27503 q
27504 }
27505 /^X\/\(\/\/\)$/{
27506 s//\1/
27507 q
27508 }
27509 /^X\/\(\/\).*/{
27510 s//\1/
27511 q
27512 }
27513 s/.*/./; q'`
27514
27515# CDPATH.
27516$as_unset CDPATH
27517
27518
27519
Martin v. Löwis11437992002-04-12 09:54:03 +000027520 as_lineno_1=$LINENO
27521 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027522 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027523 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027524
Martin v. Löwis11437992002-04-12 09:54:03 +000027525 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27526 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027527 # line-number line after each line using $LINENO; the second 'sed'
27528 # does the real work. The second script uses 'N' to pair each
27529 # line-number line with the line containing $LINENO, and appends
27530 # trailing '-' during substitution so that $LINENO is not a special
27531 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027532 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027533 # scripts with optimization help from Paolo Bonzini. Blame Lee
27534 # E. McMahon (1931-1989) for sed's syntax. :-)
27535 sed -n '
27536 p
27537 /[$]LINENO/=
27538 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027539 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027540 s/[$]LINENO.*/&-/
27541 t lineno
27542 b
27543 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027544 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027545 :loop
27546 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027547 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027548 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027549 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027550 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027551 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027552 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027553
Martin v. Löwis11437992002-04-12 09:54:03 +000027554 # Don't try to exec as it changes $[0], causing all sort of problems
27555 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027556 # original and so on. Autoconf is especially sensitive to this).
27557 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027558 # Exit status is that of the last command.
27559 exit
27560}
27561
27562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027563if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27564 as_dirname=dirname
27565else
27566 as_dirname=false
27567fi
27568
27569ECHO_C= ECHO_N= ECHO_T=
27570case `echo -n x` in
27571-n*)
27572 case `echo 'x\c'` in
27573 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27574 *) ECHO_C='\c';;
27575 esac;;
27576*)
27577 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027580if expr a : '\(a\)' >/dev/null 2>&1 &&
27581 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027582 as_expr=expr
27583else
27584 as_expr=false
27585fi
27586
27587rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588if test -d conf$$.dir; then
27589 rm -f conf$$.dir/conf$$.file
27590else
27591 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027592 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027593fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027594echo >conf$$.file
27595if ln -s conf$$.file conf$$ 2>/dev/null; then
27596 as_ln_s='ln -s'
27597 # ... but there are two gotchas:
27598 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27599 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27600 # In both cases, we have to default to `cp -p'.
27601 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027602 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027603elif ln conf$$.file conf$$ 2>/dev/null; then
27604 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027605else
27606 as_ln_s='cp -p'
27607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027608rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27609rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027610
Skip Montanaro6dead952003-09-25 14:50:04 +000027611if mkdir -p . 2>/dev/null; then
27612 as_mkdir_p=:
27613else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027614 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027615 as_mkdir_p=false
27616fi
27617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618if test -x / >/dev/null 2>&1; then
27619 as_test_x='test -x'
27620else
27621 if ls -dL / >/dev/null 2>&1; then
27622 as_ls_L_option=L
27623 else
27624 as_ls_L_option=
27625 fi
27626 as_test_x='
27627 eval sh -c '\''
27628 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027629 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027630 else
27631 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027632 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027633 esac;
27634 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27635 ???[sx]*):;;*)false;;esac;fi
27636 '\'' sh
27637 '
27638fi
27639as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027640
27641# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027642as_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 +000027643
27644# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027645as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027646
27647
Martin v. Löwis11437992002-04-12 09:54:03 +000027648exec 6>&1
27649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027650# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027651# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027652# values after options handling.
27653ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027654This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027655generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027656
27657 CONFIG_FILES = $CONFIG_FILES
27658 CONFIG_HEADERS = $CONFIG_HEADERS
27659 CONFIG_LINKS = $CONFIG_LINKS
27660 CONFIG_COMMANDS = $CONFIG_COMMANDS
27661 $ $0 $@
27662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663on `(hostname || uname -n) 2>/dev/null | sed 1q`
27664"
27665
Martin v. Löwis11437992002-04-12 09:54:03 +000027666_ACEOF
27667
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027668cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027669# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027670config_files="$ac_config_files"
27671config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027674
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027675cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027676ac_cs_usage="\
27677\`$as_me' instantiates files from templates according to the
27678current configuration.
27679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027680Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027681
27682 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027683 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027684 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027685 -d, --debug don't remove temporary files
27686 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687 --file=FILE[:TEMPLATE]
27688 instantiate the configuration file FILE
27689 --header=FILE[:TEMPLATE]
27690 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027691
27692Configuration files:
27693$config_files
27694
27695Configuration headers:
27696$config_headers
27697
27698Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027701cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027702ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027703python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027704configured by $0, generated by GNU Autoconf 2.61,
27705 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027706
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027707Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027708This config.status script is free software; the Free Software Foundation
27709gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027710
27711ac_pwd='$ac_pwd'
27712srcdir='$srcdir'
27713INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027714_ACEOF
27715
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027716cat >>$CONFIG_STATUS <<\_ACEOF
27717# If no file are specified by the user, then we need to provide default
27718# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027719ac_need_defaults=:
27720while test $# != 0
27721do
27722 case $1 in
27723 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027724 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27725 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027726 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027727 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027728 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027729 ac_option=$1
27730 ac_optarg=$2
27731 ac_shift=shift
27732 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027733 esac
27734
Skip Montanaro6dead952003-09-25 14:50:04 +000027735 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027736 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027737 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27738 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027739 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027740 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027741 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027742 debug=: ;;
27743 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027744 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027745 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027746 ac_need_defaults=false;;
27747 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027748 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027750 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027751 --he | --h)
27752 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027753 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027754Try \`$0 --help' for more information." >&2
27755 { (exit 1); exit 1; }; };;
27756 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027757 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027758 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27759 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27760 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027761
27762 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027763 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027764Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027765 { (exit 1); exit 1; }; } ;;
27766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027767 *) ac_config_targets="$ac_config_targets $1"
27768 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027769
27770 esac
27771 shift
27772done
27773
Skip Montanaro6dead952003-09-25 14:50:04 +000027774ac_configure_extra_args=
27775
27776if $ac_cs_silent; then
27777 exec 6>/dev/null
27778 ac_configure_extra_args="$ac_configure_extra_args --silent"
27779fi
27780
27781_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027782cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027783if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027784 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27785 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027786 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027787 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027788fi
27789
Martin v. Löwis11437992002-04-12 09:54:03 +000027790_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027791cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027792exec 5>>config.log
27793{
27794 echo
27795 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27796## Running $as_me. ##
27797_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027798 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027799} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027801_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027802cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027803_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806
27807# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027808for ac_config_target in $ac_config_targets
27809do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810 case $ac_config_target in
27811 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27812 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27813 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027814 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27815 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027816 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27817 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027818 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027820 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27821echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027822 { (exit 1); exit 1; }; };;
27823 esac
27824done
27825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027826
Martin v. Löwis11437992002-04-12 09:54:03 +000027827# If the user did not use the arguments to specify the items to instantiate,
27828# then the envvar interface is used. Set only those that are not.
27829# We use the long form for the default assignment because of an extremely
27830# bizarre bug on SunOS 4.1.3.
27831if $ac_need_defaults; then
27832 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27833 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27834fi
27835
Skip Montanaro6dead952003-09-25 14:50:04 +000027836# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027837# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027838# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027839# Hook for its removal unless debugging.
27840# Note that there is a small window in which the directory will not be cleaned:
27841# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027842$debug ||
27843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027844 tmp=
27845 trap 'exit_status=$?
27846 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27847' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027848 trap '{ (exit 1); exit 1; }' 1 2 13 15
27849}
Martin v. Löwis11437992002-04-12 09:54:03 +000027850# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027851
Martin v. Löwis11437992002-04-12 09:54:03 +000027852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027853 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 test -n "$tmp" && test -d "$tmp"
27855} ||
27856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027857 tmp=./conf$$-$RANDOM
27858 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027859} ||
27860{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027861 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027862 { (exit 1); exit 1; }
27863}
27864
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027865#
27866# Set up the sed scripts for CONFIG_FILES section.
27867#
27868
27869# No need to generate the scripts if there are no CONFIG_FILES.
27870# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027872
27873_ACEOF
27874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027877ac_delim='%!_!# '
27878for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027879 cat >conf$$subs.sed <<_ACEOF
27880SHELL!$SHELL$ac_delim
27881PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27882PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27883PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27884PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27885PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27886PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27887exec_prefix!$exec_prefix$ac_delim
27888prefix!$prefix$ac_delim
27889program_transform_name!$program_transform_name$ac_delim
27890bindir!$bindir$ac_delim
27891sbindir!$sbindir$ac_delim
27892libexecdir!$libexecdir$ac_delim
27893datarootdir!$datarootdir$ac_delim
27894datadir!$datadir$ac_delim
27895sysconfdir!$sysconfdir$ac_delim
27896sharedstatedir!$sharedstatedir$ac_delim
27897localstatedir!$localstatedir$ac_delim
27898includedir!$includedir$ac_delim
27899oldincludedir!$oldincludedir$ac_delim
27900docdir!$docdir$ac_delim
27901infodir!$infodir$ac_delim
27902htmldir!$htmldir$ac_delim
27903dvidir!$dvidir$ac_delim
27904pdfdir!$pdfdir$ac_delim
27905psdir!$psdir$ac_delim
27906libdir!$libdir$ac_delim
27907localedir!$localedir$ac_delim
27908mandir!$mandir$ac_delim
27909DEFS!$DEFS$ac_delim
27910ECHO_C!$ECHO_C$ac_delim
27911ECHO_N!$ECHO_N$ac_delim
27912ECHO_T!$ECHO_T$ac_delim
27913LIBS!$LIBS$ac_delim
27914build_alias!$build_alias$ac_delim
27915host_alias!$host_alias$ac_delim
27916target_alias!$target_alias$ac_delim
27917VERSION!$VERSION$ac_delim
27918SOVERSION!$SOVERSION$ac_delim
27919CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27920UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27921ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027922LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027923PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27924PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27925PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27926PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27927PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27928FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27929FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27930FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27931FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27932FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27933MACHDEP!$MACHDEP$ac_delim
27934SGI_ABI!$SGI_ABI$ac_delim
27935CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27936EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27937CC!$CC$ac_delim
27938CFLAGS!$CFLAGS$ac_delim
27939LDFLAGS!$LDFLAGS$ac_delim
27940CPPFLAGS!$CPPFLAGS$ac_delim
27941ac_ct_CC!$ac_ct_CC$ac_delim
27942EXEEXT!$EXEEXT$ac_delim
27943OBJEXT!$OBJEXT$ac_delim
27944CXX!$CXX$ac_delim
27945MAINCC!$MAINCC$ac_delim
27946CPP!$CPP$ac_delim
27947GREP!$GREP$ac_delim
27948EGREP!$EGREP$ac_delim
27949BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27950LIBRARY!$LIBRARY$ac_delim
27951LDLIBRARY!$LDLIBRARY$ac_delim
27952DLLLIBRARY!$DLLLIBRARY$ac_delim
27953BLDLIBRARY!$BLDLIBRARY$ac_delim
27954LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27955INSTSONAME!$INSTSONAME$ac_delim
27956RUNSHARED!$RUNSHARED$ac_delim
27957LINKCC!$LINKCC$ac_delim
27958GNULD!$GNULD$ac_delim
27959RANLIB!$RANLIB$ac_delim
27960AR!$AR$ac_delim
27961ARFLAGS!$ARFLAGS$ac_delim
27962SVNVERSION!$SVNVERSION$ac_delim
27963INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27964INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27965INSTALL_DATA!$INSTALL_DATA$ac_delim
27966LN!$LN$ac_delim
27967OPT!$OPT$ac_delim
27968BASECFLAGS!$BASECFLAGS$ac_delim
27969UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27970OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27971LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27972SO!$SO$ac_delim
27973LDSHARED!$LDSHARED$ac_delim
27974BLDSHARED!$BLDSHARED$ac_delim
27975CCSHARED!$CCSHARED$ac_delim
27976LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027977_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027978
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027979 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027980 break
27981 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027982 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27983echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027984 { (exit 1); exit 1; }; }
27985 else
27986 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027987 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027988done
27989
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027990ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27991if test -n "$ac_eof"; then
27992 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27993 ac_eof=`expr $ac_eof + 1`
27994fi
27995
27996cat >>$CONFIG_STATUS <<_ACEOF
27997cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27998/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027999_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028000sed '
28001s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28002s/^/s,@/; s/!/@,|#_!!_#|/
28003:n
28004t n
28005s/'"$ac_delim"'$/,g/; t
28006s/$/\\/; p
28007N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28008' >>$CONFIG_STATUS <conf$$subs.sed
28009rm -f conf$$subs.sed
28010cat >>$CONFIG_STATUS <<_ACEOF
28011CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028012_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028013
28014
28015ac_delim='%!_!# '
28016for ac_last_try in false false false false false :; do
28017 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028018CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028019SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028020PKG_CONFIG!$PKG_CONFIG$ac_delim
28021LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028022USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28023SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28024USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28025LDLAST!$LDLAST$ac_delim
28026THREADOBJ!$THREADOBJ$ac_delim
28027DLINCLDIR!$DLINCLDIR$ac_delim
28028DYNLOADFILE!$DYNLOADFILE$ac_delim
28029MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28030TRUE!$TRUE$ac_delim
28031LIBOBJS!$LIBOBJS$ac_delim
28032HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28033HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28034HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28035HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28036HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28037LIBM!$LIBM$ac_delim
28038LIBC!$LIBC$ac_delim
28039THREADHEADERS!$THREADHEADERS$ac_delim
28040SRCDIRS!$SRCDIRS$ac_delim
28041LTLIBOBJS!$LTLIBOBJS$ac_delim
28042_ACEOF
28043
Benjamin Petersond78735d2010-01-01 16:04:23 +000028044 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028045 break
28046 elif $ac_last_try; then
28047 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28048echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028049 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028050 else
28051 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28052 fi
28053done
28054
28055ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28056if test -n "$ac_eof"; then
28057 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28058 ac_eof=`expr $ac_eof + 1`
28059fi
28060
28061cat >>$CONFIG_STATUS <<_ACEOF
28062cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28063/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028064_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028065sed '
28066s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28067s/^/s,@/; s/!/@,|#_!!_#|/
28068:n
28069t n
28070s/'"$ac_delim"'$/,g/; t
28071s/$/\\/; p
28072N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28073' >>$CONFIG_STATUS <conf$$subs.sed
28074rm -f conf$$subs.sed
28075cat >>$CONFIG_STATUS <<_ACEOF
28076:end
28077s/|#_!!_#|//g
28078CEOF$ac_eof
28079_ACEOF
28080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028081
28082# VPATH may cause trouble with some makes, so we remove $(srcdir),
28083# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28084# trailing colons and then remove the whole line if VPATH becomes empty
28085# (actually we leave an empty line to preserve line numbers).
28086if test "x$srcdir" = x.; then
28087 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28088s/:*\$(srcdir):*/:/
28089s/:*\${srcdir}:*/:/
28090s/:*@srcdir@:*/:/
28091s/^\([^=]*=[ ]*\):*/\1/
28092s/:*$//
28093s/^[^=]*=[ ]*$//
28094}'
28095fi
28096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028097cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028098fi # test -n "$CONFIG_FILES"
28099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028101for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028102do
28103 case $ac_tag in
28104 :[FHLC]) ac_mode=$ac_tag; continue;;
28105 esac
28106 case $ac_mode$ac_tag in
28107 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028108 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28109echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028110 { (exit 1); exit 1; }; };;
28111 :[FH]-) ac_tag=-:-;;
28112 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28113 esac
28114 ac_save_IFS=$IFS
28115 IFS=:
28116 set x $ac_tag
28117 IFS=$ac_save_IFS
28118 shift
28119 ac_file=$1
28120 shift
28121
28122 case $ac_mode in
28123 :L) ac_source=$1;;
28124 :[FH])
28125 ac_file_inputs=
28126 for ac_f
28127 do
28128 case $ac_f in
28129 -) ac_f="$tmp/stdin";;
28130 *) # Look for the file first in the build tree, then in the source tree
28131 # (if the path is not absolute). The absolute path cannot be DOS-style,
28132 # because $ac_f cannot contain `:'.
28133 test -f "$ac_f" ||
28134 case $ac_f in
28135 [\\/$]*) false;;
28136 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28137 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028138 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28139echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028140 { (exit 1); exit 1; }; };;
28141 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028142 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028143 done
28144
28145 # Let's still pretend it is `configure' which instantiates (i.e., don't
28146 # use $as_me), people would be surprised to read:
28147 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028148 configure_input="Generated from "`IFS=:
28149 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028150 if test x"$ac_file" != x-; then
28151 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028152 { echo "$as_me:$LINENO: creating $ac_file" >&5
28153echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028154 fi
28155
28156 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028157 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028158 esac
28159 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028160 esac
28161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028162 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028163$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028164 X"$ac_file" : 'X\(//\)[^/]' \| \
28165 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028166 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028167echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028168 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28169 s//\1/
28170 q
28171 }
28172 /^X\(\/\/\)[^/].*/{
28173 s//\1/
28174 q
28175 }
28176 /^X\(\/\/\)$/{
28177 s//\1/
28178 q
28179 }
28180 /^X\(\/\).*/{
28181 s//\1/
28182 q
28183 }
28184 s/.*/./; q'`
28185 { as_dir="$ac_dir"
28186 case $as_dir in #(
28187 -*) as_dir=./$as_dir;;
28188 esac
28189 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028190 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028191 while :; do
28192 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028193 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028194 *) as_qdir=$as_dir;;
28195 esac
28196 as_dirs="'$as_qdir' $as_dirs"
28197 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028198$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028199 X"$as_dir" : 'X\(//\)[^/]' \| \
28200 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028201 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028202echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028203 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28204 s//\1/
28205 q
28206 }
28207 /^X\(\/\/\)[^/].*/{
28208 s//\1/
28209 q
28210 }
28211 /^X\(\/\/\)$/{
28212 s//\1/
28213 q
28214 }
28215 /^X\(\/\).*/{
28216 s//\1/
28217 q
28218 }
28219 s/.*/./; q'`
28220 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028221 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028222 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028223 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28224echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028225 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028226 ac_builddir=.
28227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028228case "$ac_dir" in
28229.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28230*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028231 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028232 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028233 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028234 case $ac_top_builddir_sub in
28235 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28236 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28237 esac ;;
28238esac
28239ac_abs_top_builddir=$ac_pwd
28240ac_abs_builddir=$ac_pwd$ac_dir_suffix
28241# for backward compatibility:
28242ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028243
28244case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028245 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028246 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028247 ac_top_srcdir=$ac_top_builddir_sub
28248 ac_abs_top_srcdir=$ac_pwd ;;
28249 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028250 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028251 ac_top_srcdir=$srcdir
28252 ac_abs_top_srcdir=$srcdir ;;
28253 *) # Relative name.
28254 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28255 ac_top_srcdir=$ac_top_build_prefix$srcdir
28256 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028257esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028258ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028259
Martin v. Löwis11437992002-04-12 09:54:03 +000028260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028261 case $ac_mode in
28262 :F)
28263 #
28264 # CONFIG_FILE
28265 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028266
28267 case $INSTALL in
28268 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028269 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028270 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028271_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028272
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028273cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028274# If the template does not know about datarootdir, expand it.
28275# FIXME: This hack should be removed a few years after 2.60.
28276ac_datarootdir_hack=; ac_datarootdir_seen=
28277
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028278case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028279 p
28280 q
28281}
28282/@datadir@/p
28283/@docdir@/p
28284/@infodir@/p
28285/@localedir@/p
28286/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028287' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028288*datarootdir*) ac_datarootdir_seen=yes;;
28289*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028290 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28291echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028292_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028293cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028294 ac_datarootdir_hack='
28295 s&@datadir@&$datadir&g
28296 s&@docdir@&$docdir&g
28297 s&@infodir@&$infodir&g
28298 s&@localedir@&$localedir&g
28299 s&@mandir@&$mandir&g
28300 s&\\\${datarootdir}&$datarootdir&g' ;;
28301esac
28302_ACEOF
28303
28304# Neutralize VPATH when `$srcdir' = `.'.
28305# Shell code in configure.ac might set extrasub.
28306# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028307cat >>$CONFIG_STATUS <<_ACEOF
28308 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028309$extrasub
28310_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028311cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028312:t
28313/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028314s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028315s&@top_builddir@&$ac_top_builddir_sub&;t t
28316s&@srcdir@&$ac_srcdir&;t t
28317s&@abs_srcdir@&$ac_abs_srcdir&;t t
28318s&@top_srcdir@&$ac_top_srcdir&;t t
28319s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28320s&@builddir@&$ac_builddir&;t t
28321s&@abs_builddir@&$ac_abs_builddir&;t t
28322s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28323s&@INSTALL@&$ac_INSTALL&;t t
28324$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028325" $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 +000028326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028327test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28328 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28329 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028330 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028331which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028332echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028333which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028335 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028336 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028337 -) cat "$tmp/out"; rm -f "$tmp/out";;
28338 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28339 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028340 ;;
28341 :H)
28342 #
28343 # CONFIG_HEADER
28344 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028345_ACEOF
28346
28347# Transform confdefs.h into a sed script `conftest.defines', that
28348# substitutes the proper values into config.h.in to produce config.h.
28349rm -f conftest.defines conftest.tail
28350# First, append a space to every undef/define line, to ease matching.
28351echo 's/$/ /' >conftest.defines
28352# Then, protect against being on the right side of a sed subst, or in
28353# an unquoted here document, in config.status. If some macros were
28354# called several times there might be several #defines for the same
28355# symbol, which is useless. But do not sort them, since the last
28356# AC_DEFINE must be honored.
28357ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28358# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28359# NAME is the cpp macro being defined, VALUE is the value it is being given.
28360# PARAMS is the parameter list in the macro definition--in most cases, it's
28361# just an empty string.
28362ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28363ac_dB='\\)[ (].*,\\1define\\2'
28364ac_dC=' '
28365ac_dD=' ,'
28366
28367uniq confdefs.h |
28368 sed -n '
28369 t rset
28370 :rset
28371 s/^[ ]*#[ ]*define[ ][ ]*//
28372 t ok
28373 d
28374 :ok
28375 s/[\\&,]/\\&/g
28376 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28377 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28378 ' >>conftest.defines
28379
28380# Remove the space that was appended to ease matching.
28381# Then replace #undef with comments. This is necessary, for
28382# example, in the case of _POSIX_SOURCE, which is predefined and required
28383# on some systems where configure will not decide to define it.
28384# (The regexp can be short, since the line contains either #define or #undef.)
28385echo 's/ $//
28386s,^[ #]*u.*,/* & */,' >>conftest.defines
28387
28388# Break up conftest.defines:
28389ac_max_sed_lines=50
28390
28391# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28392# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28393# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28394# et cetera.
28395ac_in='$ac_file_inputs'
28396ac_out='"$tmp/out1"'
28397ac_nxt='"$tmp/out2"'
28398
28399while :
28400do
28401 # Write a here document:
28402 cat >>$CONFIG_STATUS <<_ACEOF
28403 # First, check the format of the line:
28404 cat >"\$tmp/defines.sed" <<\\CEOF
28405/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28406/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28407b
28408:def
28409_ACEOF
28410 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28411 echo 'CEOF
28412 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28413 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28414 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28415 grep . conftest.tail >/dev/null || break
28416 rm -f conftest.defines
28417 mv conftest.tail conftest.defines
28418done
28419rm -f conftest.defines conftest.tail
28420
28421echo "ac_result=$ac_in" >>$CONFIG_STATUS
28422cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028423 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028424 echo "/* $configure_input */" >"$tmp/config.h"
28425 cat "$ac_result" >>"$tmp/config.h"
28426 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28427 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28428echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028429 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028430 rm -f $ac_file
28431 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028432 fi
28433 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028434 echo "/* $configure_input */"
28435 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028436 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028437 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028438 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028440
28441 esac
28442
28443done # for ac_tag
28444
Guido van Rossum627b2d71993-12-24 10:39:16 +000028445
Martin v. Löwis11437992002-04-12 09:54:03 +000028446{ (exit 0); exit 0; }
28447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028448chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028449ac_clean_files=$ac_clean_files_save
28450
28451
28452# configure is writing to config.log, and then calls config.status.
28453# config.status does its own redirection, appending to config.log.
28454# Unfortunately, on DOS this fails, as config.log is still kept open
28455# by configure, so config.status won't be able to write to it; its
28456# output is simply discarded. So we exec the FD to /dev/null,
28457# effectively closing config.log, so it can be properly (re)opened and
28458# appended to by config.status. When coming back to configure, we
28459# need to make the FD available again.
28460if test "$no_create" != yes; then
28461 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028462 ac_config_status_args=
28463 test "$silent" = yes &&
28464 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028465 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028466 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028467 exec 5>>config.log
28468 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28469 # would make configure fail if this is the last instruction.
28470 $ac_cs_success || { (exit 1); exit 1; }
28471fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028472
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028473
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028474echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028475if test ! -f Modules/Setup
28476then
28477 cp $srcdir/Modules/Setup.dist Modules/Setup
28478fi
28479
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028480echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028481if test ! -f Modules/Setup.local
28482then
28483 echo "# Edit this file for local setup changes" >Modules/Setup.local
28484fi
28485
28486echo "creating Makefile"
28487$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28488 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028489 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028490mv config.c Modules