blob: bd89ffac4627f847665f2cf7bf46cd6a88f74305 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson89d7d412009-12-31 20:50:59 +00002# From configure.in Revision: 77170 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
718USE_SIGNAL_MODULE
719SIGNAL_OBJS
720USE_THREAD_MODULE
721LDLAST
722THREADOBJ
723DLINCLDIR
724DYNLOADFILE
725MACHDEP_OBJS
726TRUE
727LIBOBJS
728HAVE_GETHOSTBYNAME_R_6_ARG
729HAVE_GETHOSTBYNAME_R_5_ARG
730HAVE_GETHOSTBYNAME_R_3_ARG
731HAVE_GETHOSTBYNAME_R
732HAVE_GETHOSTBYNAME
733LIBM
734LIBC
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1079 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001129 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001133# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001175 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001178 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001185 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001186 ac_confdir=`$as_dirname -- "$0" ||
1187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
1190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1191echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001224 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001250\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
1287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001311 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001318 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-ipv6 Enable ipv6 (with ipv4) support
1325 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001326 --enable-big-digits[=BITS]
1327 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Optional Packages:
1330 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1331 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001332 --with-universal-archs=ARCH
1333 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001334 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001335 --with-framework-name=FRAMEWORK
1336 specify an alternate name of the framework built
1337 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001339 --with-cxx-main=<compiler>
1340 compile main() and link python executable with C++
1341 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-suffix=.exe set executable suffix
1343 --with-pydebug build with Py_DEBUG defined
1344 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001345 --with-system-expat build pyexpat module using an installed expat
1346 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001347 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001348 --with-dbmliborder=db1:db2:...
1349 order to check db backends for dbm. Valid value is a
1350 colon separated string with the backend names
1351 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001352 --with-signal-module disable/enable signal module
1353 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1354 --with(out)-threads[=DIRECTORY]
1355 disable/enable thread support
1356 --with(out)-thread[=DIRECTORY]
1357 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001359 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001361 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with-fpectl enable SIGFPE catching
1364 --with-libm=STRING math library
1365 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001366 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001367 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1368 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandle2e15612009-05-20 18:25:10 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001398 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001444python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001458It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$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 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# 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 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001598 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703shift
1704for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$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 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Benjamin Petersond23f8222009-04-05 19:13:16 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001832VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001887# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001888if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001889 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001904
Thomas Wouters477c8d52006-05-27 19:21:47 +00001905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911
1912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001913
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001914
1915
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001917
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001918{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1919echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001920
1921# Check whether --with-universal-archs was given.
1922if test "${with_universal_archs+set}" = set; then
1923 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001924 { echo "$as_me:$LINENO: result: $withval" >&5
1925echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001926 UNIVERSAL_ARCHS="$withval"
1927
1928else
1929
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001930 { echo "$as_me:$LINENO: result: 32-bit" >&5
1931echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001932
1933fi
1934
1935
1936
1937
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001938
1939# Check whether --with-framework-name was given.
1940if test "${with_framework_name+set}" = set; then
1941 withval=$with_framework_name;
1942 PYTHONFRAMEWORK=${withval}
1943 PYTHONFRAMEWORKDIR=${withval}.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1945
1946else
1947
1948 PYTHONFRAMEWORK=Python
1949 PYTHONFRAMEWORKDIR=Python.framework
1950 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1951
1952fi
1953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001954# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001955if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001956 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001957 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001959 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001960 esac
1961 case $enableval in
1962 no)
1963 PYTHONFRAMEWORK=
1964 PYTHONFRAMEWORKDIR=no-framework
1965 PYTHONFRAMEWORKPREFIX=
1966 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001967 FRAMEWORKINSTALLFIRST=
1968 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001969 FRAMEWORKALTINSTALLFIRST=
1970 FRAMEWORKALTINSTALLLAST=
1971 if test "x${prefix}" = "xNONE"; then
1972 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1973 else
1974 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1975 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001977 ;;
1978 *)
1979 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001981 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001982 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
1984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001986 if test "x${prefix}" = "xNONE" ; then
1987 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1988 else
1989 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1990 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001991 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001993 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001995 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001999 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2000
2001 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2002
Jack Jansene578a632001-08-15 01:27:14 +00002003 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002004
Guido van Rossum563e7081996-09-10 18:20:48 +00002005else
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Jack Jansene578a632001-08-15 01:27:14 +00002007 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002008 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORKPREFIX=
2010 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002011 FRAMEWORKINSTALLFIRST=
2012 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002013 FRAMEWORKALTINSTALLFIRST=
2014 FRAMEWORKALTINSTALLLAST=
2015 if test "x${prefix}" = "xNONE" ; then
2016 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2017 else
2018 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2019 fi
Jack Jansene578a632001-08-15 01:27:14 +00002020 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002021
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002023fi
2024
Thomas Wouters477c8d52006-05-27 19:21:47 +00002025
2026
Michael W. Hudson54241132001-12-07 15:38:26 +00002027
2028
2029
2030
Jack Jansene578a632001-08-15 01:27:14 +00002031
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002032
2033
2034
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002037## AC_HELP_STRING(--with-dyld,
2038## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002039##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002040# Set name for machine-dependent library files
2041
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002042{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2043echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044if test -z "$MACHDEP"
2045then
Guido van Rossum563e7081996-09-10 18:20:48 +00002046 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002047 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002048 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_md_system=`echo $ac_sys_system |
2054 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2055 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002056 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002057 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002058
Guido van Rossum07397971997-04-29 21:49:50 +00002059 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002060 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002061 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002062 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 esac
2065fi
Guido van Rossum91922671997-10-09 20:24:13 +00002066
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002067# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2068# disable features if it is defined, without any means to access these
2069# features as extensions. For these systems, we skip the definition of
2070# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2071# some feature, make sure there is no alternative way to access this
2072# feature. Also, when using wildcards, make sure you have verified the
2073# need for not defining _XOPEN_SOURCE on all systems matching the
2074# wildcard, and that the wildcard does not include future systems
2075# (which may remove their limitations).
2076case $ac_sys_system/$ac_sys_release in
2077 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2078 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002079 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002080 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002081 define_xopen_source=no
2082 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2083 # also defined. This can be overridden by defining _BSD_SOURCE
2084 # As this has a different meaning on Linux, only define it on OpenBSD
2085
2086cat >>confdefs.h <<\_ACEOF
2087#define _BSD_SOURCE 1
2088_ACEOF
2089
2090 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002091 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2092 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2093 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002094 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 +00002095 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002096 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2097 # of union __?sigval. Reported by Stuart Bishop.
2098 SunOS/5.6)
2099 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002100 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2101 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002102 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002103 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002104 define_xopen_source=no;;
2105 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002106 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002108 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002109 # On FreeBSD 4, the math functions C89 does not cover are never defined
2110 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2111 FreeBSD/4.*)
2112 define_xopen_source=no;;
2113 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2114 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2115 # identifies itself as Darwin/7.*
2116 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2117 # disables platform specific features beyond repair.
2118 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2119 # has no effect, don't bother defining them
2120 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002122 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2123 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2124 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002125 AIX/4)
2126 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002127 AIX/5)
2128 if test `uname -r` -eq 1; then
2129 define_xopen_source=no
2130 fi
2131 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002132 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2133 # defining NI_NUMERICHOST.
2134 QNX/6.3.2)
2135 define_xopen_source=no
2136 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002137
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002138esac
2139
2140if test $define_xopen_source = yes
2141then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002142 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2143 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002144 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2145 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002146 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002147 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148
2149cat >>confdefs.h <<\_ACEOF
2150#define _XOPEN_SOURCE 500
2151_ACEOF
2152
2153 ;;
2154 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002155
2156cat >>confdefs.h <<\_ACEOF
2157#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002158_ACEOF
2159
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 ;;
2161 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002162
2163 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2164 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2165 # several APIs are not declared. Since this is also needed in some
2166 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # except for Solaris 10, where it must not be defined,
2168 # as it implies XPG4.2
2169 case $ac_sys_system/$ac_sys_release in
2170 SunOS/5.10)
2171 ;;
2172 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002173
2174cat >>confdefs.h <<\_ACEOF
2175#define _XOPEN_SOURCE_EXTENDED 1
2176_ACEOF
2177
Martin v. Löwis7dece662005-11-26 11:38:24 +00002178 ;;
2179 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002181
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182cat >>confdefs.h <<\_ACEOF
2183#define _POSIX_C_SOURCE 200112L
2184_ACEOF
2185
2186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187fi
2188
Guido van Rossum91922671997-10-09 20:24:13 +00002189#
2190# SGI compilers allow the specification of the both the ABI and the
2191# ISA on the command line. Depending on the values of these switches,
2192# different and often incompatable code will be generated.
2193#
2194# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2195# thus supply support for various ABI/ISA combinations. The MACHDEP
2196# variable is also adjusted.
2197#
2198
2199if test ! -z "$SGI_ABI"
2200then
2201 CC="cc $SGI_ABI"
2202 LDFLAGS="$SGI_ABI $LDFLAGS"
2203 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2204fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002205{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2206echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207
Jack Jansen6b08a402004-06-03 12:41:45 +00002208# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2209# it may influence the way we can build extensions, so distutils
2210# needs to check it
2211
Thomas Wouters477c8d52006-05-27 19:21:47 +00002212
Jack Jansen6b08a402004-06-03 12:41:45 +00002213CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002214EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002215
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002216{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2217echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002218ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002219{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2220echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002221
Guido van Rossum627b2d71993-12-24 10:39:16 +00002222# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002223
2224# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2225# for debug/optimization stuff. BASECFLAGS is for flags that are required
2226# just to get things to compile and link. Users are free to override OPT
2227# when running configure or make. The build should not break if they do.
2228# BASECFLAGS should generally not be messed with, however.
2229
2230# XXX shouldn't some/most/all of this code be merged with the stuff later
2231# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002232{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2233echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002235# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002236if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002237 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002238 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002239 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002240 without_gcc=yes;;
2241 yes) CC=gcc
2242 without_gcc=no;;
2243 *) CC=$withval
2244 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246else
Martin v. Löwis11437992002-04-12 09:54:03 +00002247
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002248 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002249 AIX*) CC=cc_r
2250 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002251 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002252 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002253fi
2254
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002255{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2256echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002257
Guido van Rossum8b131c51995-03-09 14:10:13 +00002258# If the user switches compilers, we can't believe the cache
2259if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2260then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002262(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002263echo "$as_me: 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)" >&2;}
2265 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266fi
2267
Martin v. Löwis11437992002-04-12 09:54:03 +00002268ac_ext=c
2269ac_cpp='$CPP $CPPFLAGS'
2270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2272ac_compiler_gnu=$ac_cv_c_compiler_gnu
2273if test -n "$ac_tool_prefix"; then
2274 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2275set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002276{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2277echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002278if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002279 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002280else
2281 if test -n "$CC"; then
2282 ac_cv_prog_CC="$CC" # Let the user override the test.
2283else
Martin v. Löwis11437992002-04-12 09:54:03 +00002284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2285for as_dir in $PATH
2286do
2287 IFS=$as_save_IFS
2288 test -z "$as_dir" && as_dir=.
2289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002290 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 +00002291 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 break 2
2294 fi
2295done
2296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002298
Jack Jansendd19cf82001-12-06 22:36:17 +00002299fi
2300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002301CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002302if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002303 { echo "$as_me:$LINENO: result: $CC" >&5
2304echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002306 { echo "$as_me:$LINENO: result: no" >&5
2307echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002308fi
2309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002310
Martin v. Löwis11437992002-04-12 09:54:03 +00002311fi
2312if test -z "$ac_cv_prog_CC"; then
2313 ac_ct_CC=$CC
2314 # Extract the first word of "gcc", so it can be a program name with args.
2315set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002316{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2317echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002318if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002319 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002320else
2321 if test -n "$ac_ct_CC"; then
2322 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2323else
2324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2325for as_dir in $PATH
2326do
2327 IFS=$as_save_IFS
2328 test -z "$as_dir" && as_dir=.
2329 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002330 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 +00002331 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002332 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002333 break 2
2334 fi
2335done
2336done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339fi
2340fi
2341ac_ct_CC=$ac_cv_prog_ac_ct_CC
2342if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002343 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2344echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002346 { echo "$as_me:$LINENO: result: no" >&5
2347echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002348fi
2349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350 if test "x$ac_ct_CC" = x; then
2351 CC=""
2352 else
2353 case $cross_compiling:$ac_tool_warned in
2354yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2356whose name does not start with the host triplet. If you think this
2357configuration is useful to you, please write to autoconf@gnu.org." >&5
2358echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2359whose name does not start with the host triplet. If you think this
2360configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361ac_tool_warned=yes ;;
2362esac
2363 CC=$ac_ct_CC
2364 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002365else
2366 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002367fi
2368
Jack Jansendd19cf82001-12-06 22:36:17 +00002369if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370 if test -n "$ac_tool_prefix"; then
2371 # 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 +00002372set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002373{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002376 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002377else
2378 if test -n "$CC"; then
2379 ac_cv_prog_CC="$CC" # Let the user override the test.
2380else
Martin v. Löwis11437992002-04-12 09:54:03 +00002381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387 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 +00002388 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 break 2
2391 fi
2392done
2393done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396fi
2397fi
2398CC=$ac_cv_prog_CC
2399if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002400 { echo "$as_me:$LINENO: result: $CC" >&5
2401echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002403 { echo "$as_me:$LINENO: result: no" >&5
2404echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002409fi
2410if test -z "$CC"; then
2411 # Extract the first word of "cc", so it can be a program name with args.
2412set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002413{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2414echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002415if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002416 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002417else
2418 if test -n "$CC"; then
2419 ac_cv_prog_CC="$CC" # Let the user override the test.
2420else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423for as_dir in $PATH
2424do
2425 IFS=$as_save_IFS
2426 test -z "$as_dir" && as_dir=.
2427 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428 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 +00002429 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2430 ac_prog_rejected=yes
2431 continue
2432 fi
2433 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 break 2
2436 fi
2437done
2438done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002441if test $ac_prog_rejected = yes; then
2442 # We found a bogon in the path, so make sure we never use it.
2443 set dummy $ac_cv_prog_CC
2444 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002445 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002446 # We chose a different compiler from the bogus one.
2447 # However, it has the same basename, so the bogon will be chosen
2448 # first if we set CC to just the basename; use the full file name.
2449 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002451 fi
2452fi
2453fi
2454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002455CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002456if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002457 { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002460 { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462fi
2463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464
Martin v. Löwis11437992002-04-12 09:54:03 +00002465fi
2466if test -z "$CC"; then
2467 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 do
2470 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2471set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002472{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002474if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002476else
2477 if test -n "$CC"; then
2478 ac_cv_prog_CC="$CC" # Let the user override the test.
2479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2481for as_dir in $PATH
2482do
2483 IFS=$as_save_IFS
2484 test -z "$as_dir" && as_dir=.
2485 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 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 +00002487 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002488 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002491done
2492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002494
2495fi
2496fi
2497CC=$ac_cv_prog_CC
2498if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002499 { echo "$as_me:$LINENO: result: $CC" >&5
2500echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002502 { echo "$as_me:$LINENO: result: no" >&5
2503echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002504fi
2505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 test -n "$CC" && break
2508 done
2509fi
2510if test -z "$CC"; then
2511 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002513do
2514 # Extract the first word of "$ac_prog", so it can be a program name with args.
2515set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002516{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002518if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002519 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002520else
2521 if test -n "$ac_ct_CC"; then
2522 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2523else
2524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2525for as_dir in $PATH
2526do
2527 IFS=$as_save_IFS
2528 test -z "$as_dir" && as_dir=.
2529 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 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 +00002531 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002532 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 break 2
2534 fi
2535done
2536done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539fi
2540fi
2541ac_ct_CC=$ac_cv_prog_ac_ct_CC
2542if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002543 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2544echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002546 { echo "$as_me:$LINENO: result: no" >&5
2547echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002548fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 test -n "$ac_ct_CC" && break
2552done
Michael W. Hudson54241132001-12-07 15:38:26 +00002553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 if test "x$ac_ct_CC" = x; then
2555 CC=""
2556 else
2557 case $cross_compiling:$ac_tool_warned in
2558yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002559{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2560whose name does not start with the host triplet. If you think this
2561configuration is useful to you, please write to autoconf@gnu.org." >&5
2562echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2563whose name does not start with the host triplet. If you think this
2564configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565ac_tool_warned=yes ;;
2566esac
2567 CC=$ac_ct_CC
2568 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002569fi
2570
2571fi
2572
2573
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002574test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002575See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002577See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002578 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581echo "$as_me:$LINENO: checking for C compiler version" >&5
2582ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583{ (ac_try="$ac_compiler --version >&5"
2584case "(($ac_try" in
2585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2586 *) ac_try_echo=$ac_try;;
2587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593{ (ac_try="$ac_compiler -v >&5"
2594case "(($ac_try" in
2595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2596 *) ac_try_echo=$ac_try;;
2597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603{ (ac_try="$ac_compiler -V >&5"
2604case "(($ac_try" in
2605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2606 *) ac_try_echo=$ac_try;;
2607esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 (exit $ac_status); }
2613
2614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621int
2622main ()
2623{
2624
2625 ;
2626 return 0;
2627}
2628_ACEOF
2629ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002630ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002631# Try to create an executable without -o first, disregard a.out.
2632# It will help us diagnose broken compilers, and finding out an intuition
2633# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002634{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2635echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2636ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2637#
2638# List of possible output files, starting from the most likely.
2639# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2640# only as a last resort. b.out is created by i960 compilers.
2641ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2642#
2643# The IRIX 6 linker writes into existing files which may not be
2644# executable, retaining their permissions. Remove them first so a
2645# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646ac_rmfiles=
2647for ac_file in $ac_files
2648do
2649 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002650 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2652 esac
2653done
2654rm -f $ac_rmfiles
2655
2656if { (ac_try="$ac_link_default"
2657case "(($ac_try" in
2658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2659 *) ac_try_echo=$ac_try;;
2660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2667# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2668# in a Makefile. We should not override ac_cv_exeext if it was cached,
2669# so that the user can short-circuit this test for compilers unknown to
2670# Autoconf.
2671for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002672do
2673 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002675 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002676 ;;
2677 [ab].out )
2678 # We found the default executable, but exeext='' is most
2679 # certainly right.
2680 break;;
2681 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2683 then :; else
2684 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2685 fi
2686 # We set ac_cv_exeext here because the later test for it is not
2687 # safe: cross compilers may not add the suffix if given an `-o'
2688 # argument, so we may need to know it at that point already.
2689 # Even if this section looks crufty: it has the advantage of
2690 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002691 break;;
2692 * )
2693 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 esac
2695done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696test "$ac_cv_exeext" = no && ac_cv_exeext=
2697
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002698else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699 ac_file=''
2700fi
2701
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002702{ echo "$as_me:$LINENO: result: $ac_file" >&5
2703echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002706sed 's/^/| /' conftest.$ac_ext >&5
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002709See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002711See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002713fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002714
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002715ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002718# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002719{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2720echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002721# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2722# If not cross compiling, check that we can run a simple program.
2723if test "$cross_compiling" != yes; then
2724 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 { (case "(($ac_try" in
2726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2727 *) ac_try_echo=$ac_try;;
2728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 (exit $ac_status); }; }; then
2734 cross_compiling=no
2735 else
2736 if test "$cross_compiling" = maybe; then
2737 cross_compiling=yes
2738 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002740If you meant to cross compile, use \`--host'.
2741See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002743If you meant to cross compile, use \`--host'.
2744See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 fi
2747 fi
2748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749{ echo "$as_me:$LINENO: result: yes" >&5
2750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2757echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2758{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2759echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002760
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002761{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2762echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763if { (ac_try="$ac_link"
2764case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002773 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2774# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2775# work properly (i.e., refer to `conftest.exe'), while it won't with
2776# `rm'.
2777for ac_file in conftest.exe conftest conftest.*; do
2778 test -f "$ac_file" || continue
2779 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002780 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2782 break;;
2783 * ) break;;
2784 esac
2785done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002788See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002790See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002792fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002793
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2796echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002797
2798rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002799EXEEXT=$ac_cv_exeext
2800ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2802echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002803if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002804 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002805else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002806 cat >conftest.$ac_ext <<_ACEOF
2807/* confdefs.h. */
2808_ACEOF
2809cat confdefs.h >>conftest.$ac_ext
2810cat >>conftest.$ac_ext <<_ACEOF
2811/* end confdefs.h. */
2812
2813int
2814main ()
2815{
2816
2817 ;
2818 return 0;
2819}
2820_ACEOF
2821rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002822if { (ac_try="$ac_compile"
2823case "(($ac_try" in
2824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825 *) ac_try_echo=$ac_try;;
2826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 for ac_file in conftest.o conftest.obj conftest.*; do
2833 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2837 break;;
2838 esac
2839done
2840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002842sed 's/^/| /' conftest.$ac_ext >&5
2843
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002844{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002846echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002849fi
2850
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002851rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2854echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855OBJEXT=$ac_cv_objext
2856ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002857{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2858echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002859if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002861else
2862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002863/* confdefs.h. */
2864_ACEOF
2865cat confdefs.h >>conftest.$ac_ext
2866cat >>conftest.$ac_ext <<_ACEOF
2867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
Martin v. Löwis11437992002-04-12 09:54:03 +00002869int
2870main ()
2871{
2872#ifndef __GNUC__
2873 choke me
2874#endif
2875
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002881if { (ac_try="$ac_compile"
2882case "(($ac_try" in
2883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2884 *) ac_try_echo=$ac_try;;
2885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002889 grep -v '^ *+' conftest.er1 >conftest.err
2890 rm -f conftest.er1
2891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (exit $ac_status); } && {
2894 test -z "$ac_c_werror_flag" ||
2895 test ! -s conftest.err
2896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002897 ac_compiler_gnu=yes
2898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002900sed 's/^/| /' conftest.$ac_ext >&5
2901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002902 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904
2905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002906ac_cv_c_compiler_gnu=$ac_compiler_gnu
2907
2908fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002909{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2910echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2911GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_test_CFLAGS=${CFLAGS+set}
2913ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002914{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2915echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002918else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002919 ac_save_c_werror_flag=$ac_c_werror_flag
2920 ac_c_werror_flag=yes
2921 ac_cv_prog_cc_g=no
2922 CFLAGS="-g"
2923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Martin v. Löwis11437992002-04-12 09:54:03 +00002930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002955 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002958sed 's/^/| /' conftest.$ac_ext >&5
2959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002960 CFLAGS=""
2961 cat >conftest.$ac_ext <<_ACEOF
2962/* confdefs.h. */
2963_ACEOF
2964cat confdefs.h >>conftest.$ac_ext
2965cat >>conftest.$ac_ext <<_ACEOF
2966/* end confdefs.h. */
2967
2968int
2969main ()
2970{
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976rm -f conftest.$ac_objext
2977if { (ac_try="$ac_compile"
2978case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 (eval "$ac_compile") 2>conftest.er1
2984 ac_status=$?
2985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (exit $ac_status); } && {
2990 test -z "$ac_c_werror_flag" ||
2991 test ! -s conftest.err
2992 } && test -s conftest.$ac_objext; then
2993 :
2994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996sed 's/^/| /' conftest.$ac_ext >&5
2997
2998 ac_c_werror_flag=$ac_save_c_werror_flag
2999 CFLAGS="-g"
3000 cat >conftest.$ac_ext <<_ACEOF
3001/* confdefs.h. */
3002_ACEOF
3003cat confdefs.h >>conftest.$ac_ext
3004cat >>conftest.$ac_ext <<_ACEOF
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
3016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (eval "$ac_compile") 2>conftest.er1
3023 ac_status=$?
3024 grep -v '^ *+' conftest.er1 >conftest.err
3025 rm -f conftest.er1
3026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (exit $ac_status); } && {
3029 test -z "$ac_c_werror_flag" ||
3030 test ! -s conftest.err
3031 } && test -s conftest.$ac_objext; then
3032 ac_cv_prog_cc_g=yes
3033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035sed 's/^/| /' conftest.$ac_ext >&5
3036
3037
Guido van Rossum627b2d71993-12-24 10:39:16 +00003038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039
3040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042
3043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3044fi
3045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3047 ac_c_werror_flag=$ac_save_c_werror_flag
3048fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003049{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3050echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003051if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003052 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053elif test $ac_cv_prog_cc_g = yes; then
3054 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055 CFLAGS="-g -O2"
3056 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058 fi
3059else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003060 if test "$GCC" = yes; then
3061 CFLAGS="-O2"
3062 else
3063 CFLAGS=
3064 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003066{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3067echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003069 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003070else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003072ac_save_CC=$CC
3073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003074/* confdefs.h. */
3075_ACEOF
3076cat confdefs.h >>conftest.$ac_ext
3077cat >>conftest.$ac_ext <<_ACEOF
3078/* end confdefs.h. */
3079#include <stdarg.h>
3080#include <stdio.h>
3081#include <sys/types.h>
3082#include <sys/stat.h>
3083/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3084struct buf { int x; };
3085FILE * (*rcsopen) (struct buf *, struct stat *, int);
3086static char *e (p, i)
3087 char **p;
3088 int i;
3089{
3090 return p[i];
3091}
3092static char *f (char * (*g) (char **, int), char **p, ...)
3093{
3094 char *s;
3095 va_list v;
3096 va_start (v,p);
3097 s = g (p, va_arg (v,int));
3098 va_end (v);
3099 return s;
3100}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003101
3102/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3103 function prototypes and stuff, but not '\xHH' hex character constants.
3104 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003106 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3107 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3112 inside strings and character constants. */
3113#define FOO(x) 'x'
3114int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3115
Skip Montanaro6dead952003-09-25 14:50:04 +00003116int test (int i, double x);
3117struct s1 {int (*f) (int a);};
3118struct s2 {int (*f) (double a);};
3119int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3120int argc;
3121char **argv;
3122int
3123main ()
3124{
3125return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3126 ;
3127 return 0;
3128}
3129_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003130for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3131 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003132do
3133 CC="$ac_save_CC $ac_arg"
3134 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135if { (ac_try="$ac_compile"
3136case "(($ac_try" in
3137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3138 *) ac_try_echo=$ac_try;;
3139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143 grep -v '^ *+' conftest.er1 >conftest.err
3144 rm -f conftest.er1
3145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (exit $ac_status); } && {
3148 test -z "$ac_c_werror_flag" ||
3149 test ! -s conftest.err
3150 } && test -s conftest.$ac_objext; then
3151 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003154sed 's/^/| /' conftest.$ac_ext >&5
3155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156
Skip Montanaro6dead952003-09-25 14:50:04 +00003157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158
3159rm -f core conftest.err conftest.$ac_objext
3160 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003161done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003163CC=$ac_save_CC
3164
3165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166# AC_CACHE_VAL
3167case "x$ac_cv_prog_cc_c89" in
3168 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003169 { echo "$as_me:$LINENO: result: none needed" >&5
3170echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003172 { echo "$as_me:$LINENO: result: unsupported" >&5
3173echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003174 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3177echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003178esac
3179
Skip Montanaro6dead952003-09-25 14:50:04 +00003180
Martin v. Löwis11437992002-04-12 09:54:03 +00003181ac_ext=c
3182ac_cpp='$CPP $CPPFLAGS'
3183ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3184ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3185ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003186
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003187
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003188
3189
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003190{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3191echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197 case $withval in
3198 no) with_cxx_main=no
3199 MAINCC='$(CC)';;
3200 yes) with_cxx_main=yes
3201 MAINCC='$(CXX)';;
3202 *) with_cxx_main=yes
3203 MAINCC=$withval
3204 if test -z "$CXX"
3205 then
3206 CXX=$withval
3207 fi;;
3208 esac
3209else
3210
3211 with_cxx_main=no
3212 MAINCC='$(CC)'
3213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003216{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3217echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003218
3219preset_cxx="$CXX"
3220if test -z "$CXX"
3221then
3222 case "$CC" in
3223 gcc) # Extract the first word of "g++", so it can be a program name with args.
3224set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003228 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229else
3230 case $CXX in
3231 [\\/]* | ?:[\\/]*)
3232 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3233 ;;
3234 *)
3235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in notfound
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
3240 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 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 +00003242 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003243 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003244 break 2
3245 fi
3246done
3247done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003249
3250 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3251 ;;
3252esac
3253fi
3254CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003255if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003256 { echo "$as_me:$LINENO: result: $CXX" >&5
3257echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003259 { echo "$as_me:$LINENO: result: no" >&5
3260echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003263 ;;
3264 cc) # Extract the first word of "c++", so it can be a program name with args.
3265set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003269 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270else
3271 case $CXX in
3272 [\\/]* | ?:[\\/]*)
3273 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3274 ;;
3275 *)
3276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3277for as_dir in notfound
3278do
3279 IFS=$as_save_IFS
3280 test -z "$as_dir" && as_dir=.
3281 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282 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 +00003283 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003284 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003285 break 2
3286 fi
3287done
3288done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003290
3291 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3292 ;;
3293esac
3294fi
3295CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003296if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003297 { echo "$as_me:$LINENO: result: $CXX" >&5
3298echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003300 { echo "$as_me:$LINENO: result: no" >&5
3301echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003304 ;;
3305 esac
3306 if test "$CXX" = "notfound"
3307 then
3308 CXX=""
3309 fi
3310fi
3311if test -z "$CXX"
3312then
3313 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3314do
3315 # Extract the first word of "$ac_prog", so it can be a program name with args.
3316set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003320 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003321else
3322 if test -n "$CXX"; then
3323 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3324else
3325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in $PATH
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 break 2
3335 fi
3336done
3337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339
3340fi
3341fi
3342CXX=$ac_cv_prog_CXX
3343if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003344 { echo "$as_me:$LINENO: result: $CXX" >&5
3345echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003347 { echo "$as_me:$LINENO: result: no" >&5
3348echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003349fi
3350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352 test -n "$CXX" && break
3353done
3354test -n "$CXX" || CXX="notfound"
3355
3356 if test "$CXX" = "notfound"
3357 then
3358 CXX=""
3359 fi
3360fi
3361if test "$preset_cxx" != "$CXX"
3362then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003363 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003364
3365 By default, distutils will build C++ extension modules with \"$CXX\".
3366 If this is not intended, then set CXX on the configure command line.
3367 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003368echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003369
3370 By default, distutils will build C++ extension modules with \"$CXX\".
3371 If this is not intended, then set CXX on the configure command line.
3372 " >&2;}
3373fi
3374
3375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003376# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003377
3378ac_ext=c
3379ac_cpp='$CPP $CPPFLAGS'
3380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003383{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3384echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003385# On Suns, sometimes $CPP names a directory.
3386if test -n "$CPP" && test -d "$CPP"; then
3387 CPP=
3388fi
3389if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003390 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392else
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 # Double quotes because CPP needs to be expanded
3394 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3395 do
3396 ac_preproc_ok=false
3397for ac_c_preproc_warn_flag in '' yes
3398do
3399 # Use a header file that comes with gcc, so configuring glibc
3400 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003401 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3402 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003403 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 # not just through cpp. "Syntax error" is here to catch this case.
3405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003406/* confdefs.h. */
3407_ACEOF
3408cat confdefs.h >>conftest.$ac_ext
3409cat >>conftest.$ac_ext <<_ACEOF
3410/* end confdefs.h. */
3411#ifdef __STDC__
3412# include <limits.h>
3413#else
3414# include <assert.h>
3415#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003416 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418if { (ac_try="$ac_cpp conftest.$ac_ext"
3419case "(($ac_try" in
3420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421 *) ac_try_echo=$ac_try;;
3422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003426 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 rm -f conftest.er1
3428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (exit $ac_status); } >/dev/null && {
3431 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3432 test ! -s conftest.err
3433 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434 :
3435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Broken: fails on valid input.
3440continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # can be detected and how.
3447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003448/* confdefs.h. */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003453#include <ac_nonexistent.h>
3454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455if { (ac_try="$ac_cpp conftest.$ac_ext"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003463 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 rm -f conftest.er1
3465 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (exit $ac_status); } >/dev/null && {
3468 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3469 test ! -s conftest.err
3470 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 # Broken: success on invalid input.
3472continue
3473else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003475sed 's/^/| /' conftest.$ac_ext >&5
3476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Passes both tests.
3478ac_preproc_ok=:
3479break
3480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482rm -f conftest.err conftest.$ac_ext
3483
3484done
3485# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3486rm -f conftest.err conftest.$ac_ext
3487if $ac_preproc_ok; then
3488 break
3489fi
3490
3491 done
3492 ac_cv_prog_CPP=$CPP
3493
3494fi
3495 CPP=$ac_cv_prog_CPP
3496else
3497 ac_cv_prog_CPP=$CPP
3498fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003499{ echo "$as_me:$LINENO: result: $CPP" >&5
3500echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501ac_preproc_ok=false
3502for ac_c_preproc_warn_flag in '' yes
3503do
3504 # Use a header file that comes with gcc, so configuring glibc
3505 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3507 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # On the NeXT, cc -E runs the code through the compiler's parser,
3509 # not just through cpp. "Syntax error" is here to catch this case.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#ifdef __STDC__
3517# include <limits.h>
3518#else
3519# include <assert.h>
3520#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003521 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523if { (ac_try="$ac_cpp conftest.$ac_ext"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003531 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 rm -f conftest.er1
3533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (exit $ac_status); } >/dev/null && {
3536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 :
3540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: fails on valid input.
3545continue
3546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
3549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # can be detected and how.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003558#include <ac_nonexistent.h>
3559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 # Broken: success on invalid input.
3577continue
3578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Passes both tests.
3583ac_preproc_ok=:
3584break
3585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
3589done
3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3591rm -f conftest.err conftest.$ac_ext
3592if $ac_preproc_ok; then
3593 :
3594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003595 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003596See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003597echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003598See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003599 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601
3602ac_ext=c
3603ac_cpp='$CPP $CPPFLAGS'
3604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3606ac_compiler_gnu=$ac_cv_c_compiler_gnu
3607
3608
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003609{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3610echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003612 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003614 # Extract the first word of "grep ggrep" to use in msg output
3615if test -z "$GREP"; then
3616set dummy grep ggrep; ac_prog_name=$2
3617if test "${ac_cv_path_GREP+set}" = set; then
3618 echo $ECHO_N "(cached) $ECHO_C" >&6
3619else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003621# Loop through the user's path and test for each of PROGNAME-LIST
3622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3630 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3631 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 # Check for GNU $ac_path_GREP
3633case `"$ac_path_GREP" --version 2>&1` in
3634*GNU*)
3635 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3636*)
3637 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003638 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 while :
3640 do
3641 cat "conftest.in" "conftest.in" >"conftest.tmp"
3642 mv "conftest.tmp" "conftest.in"
3643 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3646 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3647 ac_count=`expr $ac_count + 1`
3648 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3649 # Best one so far, save it but keep looking for a better one
3650 ac_cv_path_GREP="$ac_path_GREP"
3651 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003652 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 # 10*(2^10) chars as input seems more than enough
3654 test $ac_count -gt 10 && break
3655 done
3656 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3657esac
3658
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003659
3660 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 done
3662done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003663
3664done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003666
3667
3668fi
3669
3670GREP="$ac_cv_path_GREP"
3671if test -z "$GREP"; then
3672 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3673echo "$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 +00003674 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677else
3678 ac_cv_path_GREP=$GREP
3679fi
3680
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3684echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 GREP="$ac_cv_path_GREP"
3686
3687
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003688{ echo "$as_me:$LINENO: checking for egrep" >&5
3689echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003691 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692else
3693 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3694 then ac_cv_path_EGREP="$GREP -E"
3695 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696 # Extract the first word of "egrep" to use in msg output
3697if test -z "$EGREP"; then
3698set dummy egrep; ac_prog_name=$2
3699if test "${ac_cv_path_EGREP+set}" = set; then
3700 echo $ECHO_N "(cached) $ECHO_C" >&6
3701else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703# Loop through the user's path and test for each of PROGNAME-LIST
3704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
3709 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003710 for ac_exec_ext in '' $ac_executable_extensions; do
3711 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3712 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3713 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714 # Check for GNU $ac_path_EGREP
3715case `"$ac_path_EGREP" --version 2>&1` in
3716*GNU*)
3717 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3718*)
3719 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 while :
3722 do
3723 cat "conftest.in" "conftest.in" >"conftest.tmp"
3724 mv "conftest.tmp" "conftest.in"
3725 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3728 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3729 ac_count=`expr $ac_count + 1`
3730 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3731 # Best one so far, save it but keep looking for a better one
3732 ac_cv_path_EGREP="$ac_path_EGREP"
3733 ac_path_EGREP_max=$ac_count
3734 fi
3735 # 10*(2^10) chars as input seems more than enough
3736 test $ac_count -gt 10 && break
3737 done
3738 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3739esac
3740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003741
3742 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 done
3744done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003745
3746done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003748
3749
3750fi
3751
3752EGREP="$ac_cv_path_EGREP"
3753if test -z "$EGREP"; then
3754 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3755echo "$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 +00003756 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003757fi
3758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759else
3760 ac_cv_path_EGREP=$EGREP
3761fi
3762
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 fi
3765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003766{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3767echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003769
3770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003771
3772{ echo "$as_me:$LINENO: checking for AIX" >&5
3773echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3774cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003775/* confdefs.h. */
3776_ACEOF
3777cat confdefs.h >>conftest.$ac_ext
3778cat >>conftest.$ac_ext <<_ACEOF
3779/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780#ifdef _AIX
3781 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003782#endif
3783
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003784_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3786 $EGREP "yes" >/dev/null 2>&1; then
3787 { echo "$as_me:$LINENO: result: yes" >&5
3788echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003789cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003790#define _ALL_SOURCE 1
3791_ACEOF
3792
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003793else
3794 { echo "$as_me:$LINENO: result: no" >&5
3795echo "${ECHO_T}no" >&6; }
3796fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00003797rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003798
3799
3800
3801# Check for unsupported systems
3802case $ac_sys_system/$ac_sys_release in
3803atheos*|Linux*/1*)
3804 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3805 echo See README for details.
3806 exit 1;;
3807esac
3808
3809
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003810{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3811echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003812
3813# Check whether --with-suffix was given.
3814if test "${with_suffix+set}" = set; then
3815 withval=$with_suffix;
3816 case $withval in
3817 no) EXEEXT=;;
3818 yes) EXEEXT=.exe;;
3819 *) EXEEXT=$withval;;
3820 esac
3821fi
3822
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003823{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3824echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003825
3826# Test whether we're running on a non-case-sensitive system, in which
3827# case we give a warning if no ext is given
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3830echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831if test ! -d CaseSensitiveTestDir; then
3832mkdir CaseSensitiveTestDir
3833fi
3834
3835if test -d casesensitivetestdir
3836then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003837 { echo "$as_me:$LINENO: result: yes" >&5
3838echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003839 BUILDEXEEXT=.exe
3840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003841 { echo "$as_me:$LINENO: result: no" >&5
3842echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003843 BUILDEXEEXT=$EXEEXT
3844fi
3845rmdir CaseSensitiveTestDir
3846
3847case $MACHDEP in
3848bsdos*)
3849 case $CC in
3850 gcc) CC="$CC -D_HAVE_BSDI";;
3851 esac;;
3852esac
3853
3854case $ac_sys_system in
3855hp*|HP*)
3856 case $CC in
3857 cc|*/cc) CC="$CC -Ae";;
3858 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003859SunOS*)
3860 # Some functions have a prototype only with that define, e.g. confstr
3861
3862cat >>confdefs.h <<\_ACEOF
3863#define __EXTENSIONS__ 1
3864_ACEOF
3865
3866 ;;
3867esac
3868
3869
3870
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003871{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3872echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003873if test -z "$LIBRARY"
3874then
3875 LIBRARY='libpython$(VERSION).a'
3876fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3878echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879
3880# LDLIBRARY is the name of the library to link against (as opposed to the
3881# name of the library into which to insert object files). BLDLIBRARY is also
3882# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3883# is blank as the main program is not linked directly against LDLIBRARY.
3884# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3885# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3886# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3887# DLLLIBRARY is the shared (i.e., DLL) library.
3888#
3889# RUNSHARED is used to run shared python without installed libraries
3890#
3891# INSTSONAME is the name of the shared library that will be use to install
3892# on the system - some systems like version suffix, others don't
3893
3894
3895
3896
3897
3898
3899LDLIBRARY="$LIBRARY"
3900BLDLIBRARY='$(LDLIBRARY)'
3901INSTSONAME='$(LDLIBRARY)'
3902DLLLIBRARY=''
3903LDLIBRARYDIR=''
3904RUNSHARED=''
3905
3906# LINKCC is the command that links the python executable -- default is $(CC).
3907# If CXX is set, and if it is needed to link a main function that was
3908# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3909# python might then depend on the C++ runtime
3910# This is altered for AIX in order to build the export list before
3911# linking.
3912
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003913{ echo "$as_me:$LINENO: checking LINKCC" >&5
3914echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003915if test -z "$LINKCC"
3916then
3917 LINKCC='$(PURIFY) $(MAINCC)'
3918 case $ac_sys_system in
3919 AIX*)
3920 exp_extra="\"\""
3921 if test $ac_sys_release -ge 5 -o \
3922 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3923 exp_extra="."
3924 fi
3925 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003926 QNX*)
3927 # qcc must be used because the other compilers do not
3928 # support -N.
3929 LINKCC=qcc;;
3930 esac
3931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003932{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3933echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003934
3935# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3936# make sure we default having it set to "no": this is used by
3937# distutils.unixccompiler to know if it should add --enable-new-dtags
3938# to linker command lines, and failing to detect GNU ld simply results
3939# in the same bahaviour as before.
3940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003941{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3942echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003943ac_prog=ld
3944if test "$GCC" = yes; then
3945 ac_prog=`$CC -print-prog-name=ld`
3946fi
3947case `"$ac_prog" -V 2>&1 < /dev/null` in
3948 *GNU*)
3949 GNULD=yes;;
3950 *)
3951 GNULD=no;;
3952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003953{ echo "$as_me:$LINENO: result: $GNULD" >&5
3954echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003955
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003956{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3957echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003958# Check whether --enable-shared was given.
3959if test "${enable_shared+set}" = set; then
3960 enableval=$enable_shared;
3961fi
3962
3963
3964if test -z "$enable_shared"
3965then
3966 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003967 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003968 enable_shared="yes";;
3969 *)
3970 enable_shared="no";;
3971 esac
3972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003973{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3974echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003976{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3977echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003978# Check whether --enable-profiling was given.
3979if test "${enable_profiling+set}" = set; then
3980 enableval=$enable_profiling; ac_save_cc="$CC"
3981 CC="$CC -pg"
3982 if test "$cross_compiling" = yes; then
3983 ac_enable_profiling="no"
3984else
3985 cat >conftest.$ac_ext <<_ACEOF
3986/* confdefs.h. */
3987_ACEOF
3988cat confdefs.h >>conftest.$ac_ext
3989cat >>conftest.$ac_ext <<_ACEOF
3990/* end confdefs.h. */
3991int main() { return 0; }
3992_ACEOF
3993rm -f conftest$ac_exeext
3994if { (ac_try="$ac_link"
3995case "(($ac_try" in
3996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3997 *) ac_try_echo=$ac_try;;
3998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004000 (eval "$ac_link") 2>&5
4001 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4004 { (case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (eval "$ac_try") 2>&5
4010 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004012 (exit $ac_status); }; }; then
4013 ac_enable_profiling="yes"
4014else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015 echo "$as_me: program exited with status $ac_status" >&5
4016echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019( exit $ac_status )
4020ac_enable_profiling="no"
4021fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4023fi
4024
4025
4026 CC="$ac_save_cc"
4027fi
4028
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004029{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4030echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004031
4032case "$ac_enable_profiling" in
4033 "yes")
4034 BASECFLAGS="-pg $BASECFLAGS"
4035 LDFLAGS="-pg $LDFLAGS"
4036 ;;
4037esac
4038
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4040echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004041
4042# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4043# library that we build, but we do not want to link against it (we
4044# will find it with a -framework option). For this reason there is an
4045# extra variable BLDLIBRARY against which Python and the extension
4046# modules are linked, BLDLIBRARY. This is normally the same as
4047# LDLIBRARY, but empty for MacOSX framework builds.
4048if test "$enable_framework"
4049then
4050 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4051 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4052 BLDLIBRARY=''
4053else
4054 BLDLIBRARY='$(LDLIBRARY)'
4055fi
4056
4057# Other platforms follow
4058if test $enable_shared = "yes"; then
4059
4060cat >>confdefs.h <<\_ACEOF
4061#define Py_ENABLE_SHARED 1
4062_ACEOF
4063
4064 case $ac_sys_system in
4065 CYGWIN*)
4066 LDLIBRARY='libpython$(VERSION).dll.a'
4067 DLLLIBRARY='libpython$(VERSION).dll'
4068 ;;
4069 SunOS*)
4070 LDLIBRARY='libpython$(VERSION).so'
4071 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4072 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4073 INSTSONAME="$LDLIBRARY".$SOVERSION
4074 ;;
4075 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 case $ac_sys_system in
4080 FreeBSD*)
4081 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4082 ;;
4083 esac
4084 INSTSONAME="$LDLIBRARY".$SOVERSION
4085 ;;
4086 hp*|HP*)
4087 case `uname -m` in
4088 ia64)
4089 LDLIBRARY='libpython$(VERSION).so'
4090 ;;
4091 *)
4092 LDLIBRARY='libpython$(VERSION).sl'
4093 ;;
4094 esac
4095 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4096 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4097 ;;
4098 OSF*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4101 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4102 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004103 Darwin*)
4104 LDLIBRARY='libpython$(VERSION).dylib'
4105 BLDLIBRARY='-L. -lpython$(VERSION)'
4106 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4107 ;;
4108
4109 esac
4110else # shared is disabled
4111 case $ac_sys_system in
4112 CYGWIN*)
4113 BLDLIBRARY='$(LIBRARY)'
4114 LDLIBRARY='libpython$(VERSION).dll.a'
4115 ;;
4116 esac
4117fi
4118
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004119{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4120echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004121
4122if test -n "$ac_tool_prefix"; then
4123 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4124set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4126echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004128 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004129else
4130 if test -n "$RANLIB"; then
4131 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4132else
4133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134for as_dir in $PATH
4135do
4136 IFS=$as_save_IFS
4137 test -z "$as_dir" && as_dir=.
4138 for ac_exec_ext in '' $ac_executable_extensions; do
4139 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4140 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004141 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004142 break 2
4143 fi
4144done
4145done
4146IFS=$as_save_IFS
4147
4148fi
4149fi
4150RANLIB=$ac_cv_prog_RANLIB
4151if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004152 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4153echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004155 { echo "$as_me:$LINENO: result: no" >&5
4156echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004157fi
4158
4159
4160fi
4161if test -z "$ac_cv_prog_RANLIB"; then
4162 ac_ct_RANLIB=$RANLIB
4163 # Extract the first word of "ranlib", so it can be a program name with args.
4164set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004168 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169else
4170 if test -n "$ac_ct_RANLIB"; then
4171 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4180 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004182 break 2
4183 fi
4184done
4185done
4186IFS=$as_save_IFS
4187
4188fi
4189fi
4190ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4191if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4193echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004195 { echo "$as_me:$LINENO: result: no" >&5
4196echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004197fi
4198
4199 if test "x$ac_ct_RANLIB" = x; then
4200 RANLIB=":"
4201 else
4202 case $cross_compiling:$ac_tool_warned in
4203yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4205whose name does not start with the host triplet. If you think this
4206configuration is useful to you, please write to autoconf@gnu.org." >&5
4207echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4208whose name does not start with the host triplet. If you think this
4209configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004210ac_tool_warned=yes ;;
4211esac
4212 RANLIB=$ac_ct_RANLIB
4213 fi
4214else
4215 RANLIB="$ac_cv_prog_RANLIB"
4216fi
4217
4218
4219for ac_prog in ar aal
4220do
4221 # Extract the first word of "$ac_prog", so it can be a program name with args.
4222set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004223{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4224echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004225if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004226 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004227else
4228 if test -n "$AR"; then
4229 ac_cv_prog_AR="$AR" # Let the user override the test.
4230else
4231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4232for as_dir in $PATH
4233do
4234 IFS=$as_save_IFS
4235 test -z "$as_dir" && as_dir=.
4236 for ac_exec_ext in '' $ac_executable_extensions; do
4237 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4238 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004239 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004240 break 2
4241 fi
4242done
4243done
4244IFS=$as_save_IFS
4245
4246fi
4247fi
4248AR=$ac_cv_prog_AR
4249if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004250 { echo "$as_me:$LINENO: result: $AR" >&5
4251echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004253 { echo "$as_me:$LINENO: result: no" >&5
4254echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004255fi
4256
4257
4258 test -n "$AR" && break
4259done
4260test -n "$AR" || AR="ar"
4261
4262
4263# tweak ARFLAGS only if the user didn't set it on the command line
4264
4265if test -z "$ARFLAGS"
4266then
4267 ARFLAGS="rc"
4268fi
4269
4270
4271# Extract the first word of "svnversion", so it can be a program name with args.
4272set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277else
4278 if test -n "$SVNVERSION"; then
4279 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4280else
4281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282for as_dir in $PATH
4283do
4284 IFS=$as_save_IFS
4285 test -z "$as_dir" && as_dir=.
4286 for ac_exec_ext in '' $ac_executable_extensions; do
4287 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4288 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004290 break 2
4291 fi
4292done
4293done
4294IFS=$as_save_IFS
4295
4296 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4297fi
4298fi
4299SVNVERSION=$ac_cv_prog_SVNVERSION
4300if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004301 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4302echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004304 { echo "$as_me:$LINENO: result: no" >&5
4305echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004306fi
4307
4308
4309if test $SVNVERSION = found
4310then
4311 SVNVERSION="svnversion \$(srcdir)"
4312else
4313 SVNVERSION="echo Unversioned directory"
4314fi
4315
4316case $MACHDEP in
4317bsdos*|hp*|HP*)
4318 # install -d does not work on BSDI or HP-UX
4319 if test -z "$INSTALL"
4320 then
4321 INSTALL="${srcdir}/install-sh -c"
4322 fi
4323esac
4324ac_aux_dir=
4325for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4326 if test -f "$ac_dir/install-sh"; then
4327 ac_aux_dir=$ac_dir
4328 ac_install_sh="$ac_aux_dir/install-sh -c"
4329 break
4330 elif test -f "$ac_dir/install.sh"; then
4331 ac_aux_dir=$ac_dir
4332 ac_install_sh="$ac_aux_dir/install.sh -c"
4333 break
4334 elif test -f "$ac_dir/shtool"; then
4335 ac_aux_dir=$ac_dir
4336 ac_install_sh="$ac_aux_dir/shtool install -c"
4337 break
4338 fi
4339done
4340if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4342echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343 { (exit 1); exit 1; }; }
4344fi
4345
4346# These three variables are undocumented and unsupported,
4347# and are intended to be withdrawn in a future Autoconf release.
4348# They can cause serious problems if a builder's source tree is in a directory
4349# whose full name contains unusual characters.
4350ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4351ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4352ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4353
4354
4355# Find a good install program. We prefer a C program (faster),
4356# so one script is as good as another. But avoid the broken or
4357# incompatible versions:
4358# SysV /etc/install, /usr/sbin/install
4359# SunOS /usr/etc/install
4360# IRIX /sbin/install
4361# AIX /bin/install
4362# AmigaOS /C/install, which installs bootblocks on floppy discs
4363# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4364# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4365# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4366# OS/2's system install, which has a completely different semantic
4367# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004368{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4369echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004370if test -z "$INSTALL"; then
4371if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004372 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004373else
4374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377 IFS=$as_save_IFS
4378 test -z "$as_dir" && as_dir=.
4379 # Account for people who put trailing slashes in PATH elements.
4380case $as_dir/ in
4381 ./ | .// | /cC/* | \
4382 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4383 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4384 /usr/ucb/* ) ;;
4385 *)
4386 # OSF1 and SCO ODT 3.0 have their own names for install.
4387 # Don't use installbsd from OSF since it installs stuff as root
4388 # by default.
4389 for ac_prog in ginstall scoinst install; do
4390 for ac_exec_ext in '' $ac_executable_extensions; do
4391 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4392 if test $ac_prog = install &&
4393 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4394 # AIX install. It has an incompatible calling convention.
4395 :
4396 elif test $ac_prog = install &&
4397 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4398 # program-specific install script used by HP pwplus--don't use.
4399 :
4400 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004401 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4402 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004403 fi
4404 fi
4405 done
4406 done
4407 ;;
4408esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409done
4410IFS=$as_save_IFS
4411
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004412
4413fi
4414 if test "${ac_cv_path_install+set}" = set; then
4415 INSTALL=$ac_cv_path_install
4416 else
4417 # As a last resort, use the slow shell script. Don't cache a
4418 # value for INSTALL within a source directory, because that will
4419 # break other packages using the cache if that directory is
4420 # removed, or if the value is a relative name.
4421 INSTALL=$ac_install_sh
4422 fi
4423fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004424{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4425echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004426
4427# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4428# It thinks the first close brace ends the variable substitution.
4429test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4430
4431test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4432
4433test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4434
4435
4436# Not every filesystem supports hard links
4437
4438if test -z "$LN" ; then
4439 case $ac_sys_system in
4440 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004441 *) LN=ln;;
4442 esac
4443fi
4444
4445# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004446{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4447echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448
4449# Check whether --with-pydebug was given.
4450if test "${with_pydebug+set}" = set; then
4451 withval=$with_pydebug;
4452if test "$withval" != no
4453then
4454
4455cat >>confdefs.h <<\_ACEOF
4456#define Py_DEBUG 1
4457_ACEOF
4458
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459 { echo "$as_me:$LINENO: result: yes" >&5
4460echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else { echo "$as_me:$LINENO: result: no" >&5
4463echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464fi
4465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004466 { echo "$as_me:$LINENO: result: no" >&5
4467echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004468fi
4469
4470
4471# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4472# merged with this chunk of code?
4473
4474# Optimizer/debugger flags
4475# ------------------------
4476# (The following bit of code is complicated enough - please keep things
4477# indented properly. Just pretend you're editing Python code. ;-)
4478
4479# There are two parallel sets of case statements below, one that checks to
4480# see if OPT was set and one that does BASECFLAGS setting based upon
4481# compiler and platform. BASECFLAGS tweaks need to be made even if the
4482# user set OPT.
4483
4484# tweak OPT based on compiler and platform, only if the user didn't set
4485# it on the command line
4486
4487if test -z "$OPT"
4488then
4489 case $GCC in
4490 yes)
4491 if test "$CC" != 'g++' ; then
4492 STRICT_PROTO="-Wstrict-prototypes"
4493 fi
4494 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4495 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4496 WRAP="-fwrapv"
4497 fi
4498 case $ac_cv_prog_cc_g in
4499 yes)
4500 if test "$Py_DEBUG" = 'true' ; then
4501 # Optimization messes up debuggers, so turn it off for
4502 # debug builds.
4503 OPT="-g -Wall $STRICT_PROTO"
4504 else
4505 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4506 fi
4507 ;;
4508 *)
4509 OPT="-O3 -Wall $STRICT_PROTO"
4510 ;;
4511 esac
4512 case $ac_sys_system in
4513 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4514 ;;
4515 esac
4516 ;;
4517
4518 *)
4519 OPT="-O"
4520 ;;
4521 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004522fi
4523
4524
4525
4526# The -arch flags for universal builds on OSX
4527UNIVERSAL_ARCH_FLAGS=
4528
4529
4530# tweak BASECFLAGS based on compiler and platform
4531case $GCC in
4532yes)
4533 # Python violates C99 rules, by casting between incompatible
4534 # pointer types. GCC may generate bad code as a result of that,
4535 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004536 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4537echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004538 ac_save_cc="$CC"
4539 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004540 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004541 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004542else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004543 cat >conftest.$ac_ext <<_ACEOF
4544/* confdefs.h. */
4545_ACEOF
4546cat confdefs.h >>conftest.$ac_ext
4547cat >>conftest.$ac_ext <<_ACEOF
4548/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004549
4550int
4551main ()
4552{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004553int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004554 ;
4555 return 0;
4556}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004557_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004558rm -f conftest.$ac_objext
4559if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004560case "(($ac_try" in
4561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4562 *) ac_try_echo=$ac_try;;
4563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004565 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004567 grep -v '^ *+' conftest.er1 >conftest.err
4568 rm -f conftest.er1
4569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004571 (exit $ac_status); } && {
4572 test -z "$ac_c_werror_flag" ||
4573 test ! -s conftest.err
4574 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004575 ac_cv_no_strict_aliasing_ok=yes
4576else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004578sed 's/^/| /' conftest.$ac_ext >&5
4579
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004580 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004581fi
4582
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004584fi
4585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004586 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004587 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4588echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589 if test $ac_cv_no_strict_aliasing_ok = yes
4590 then
4591 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4592 fi
4593
4594 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4595 # support. Without this, treatment of subnormals doesn't follow
4596 # the standard.
4597 case $ac_sys_machine in
4598 alpha*)
4599 BASECFLAGS="$BASECFLAGS -mieee"
4600 ;;
4601 esac
4602
4603 case $ac_sys_system in
4604 SCO_SV*)
4605 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4606 ;;
4607 # is there any other compiler on Darwin besides gcc?
4608 Darwin*)
4609 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4610 # used to be here, but non-Apple gcc doesn't accept them.
4611
4612
4613 if test "${enable_universalsdk}"; then
4614 UNIVERSAL_ARCH_FLAGS=""
4615 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4616 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4617 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004618 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004619
4620 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4621 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004622 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004623 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624
4625 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004627 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628 ARCH_RUN_32BIT="arch -i386 -ppc"
4629
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004630 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4631 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004632 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004633 ARCH_RUN_32BIT="arch -i386"
4634
4635 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4636 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004637 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4638 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004641 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4642echo "$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 +00004643 { (exit 1); exit 1; }; }
4644
4645 fi
4646
4647
4648 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4649 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4650 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4651 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4652 fi
4653 fi
4654
4655 # Calculate the right deployment target for this build.
4656 #
4657 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4658 if test ${cur_target} '>' 10.2; then
4659 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004660 if test ${enable_universalsdk}; then
4661 if test "${UNIVERSAL_ARCHS}" = "all"; then
4662 # Ensure that the default platform for a
4663 # 4-way universal build is OSX 10.5,
4664 # that's the first OS release where
4665 # 4-way builds make sense.
4666 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004667
4668 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4669 cur_target='10.5'
4670
4671 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4672 cur_target='10.5'
4673
4674 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4675 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004676 fi
4677 else
4678 if test `arch` = "i386"; then
4679 # On Intel macs default to a deployment
4680 # target of 10.4, that's the first OSX
4681 # release with Intel support.
4682 cur_target="10.4"
4683 fi
4684 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004685 fi
4686 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4687
4688 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4689 # environment with a value that is the same as what we'll use
4690 # in the Makefile to ensure that we'll get the same compiler
4691 # environment during configure and build time.
4692 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4693 export MACOSX_DEPLOYMENT_TARGET
4694 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4695
4696 ;;
4697 OSF*)
4698 BASECFLAGS="$BASECFLAGS -mieee"
4699 ;;
4700 esac
4701 ;;
4702
4703*)
4704 case $ac_sys_system in
4705 OpenUNIX*|UnixWare*)
4706 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4707 ;;
4708 OSF*)
4709 BASECFLAGS="$BASECFLAGS -ieee -std"
4710 ;;
4711 SCO_SV*)
4712 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4713 ;;
4714 esac
4715 ;;
4716esac
4717
4718if test "$Py_DEBUG" = 'true'; then
4719 :
4720else
4721 OPT="-DNDEBUG $OPT"
4722fi
4723
4724if test "$ac_arch_flags"
4725then
4726 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4727fi
4728
4729# disable check for icc since it seems to pass, but generates a warning
4730if test "$CC" = icc
4731then
4732 ac_cv_opt_olimit_ok=no
4733fi
4734
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004735{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4736echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004738 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739else
4740 ac_save_cc="$CC"
4741CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004742cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743/* confdefs.h. */
4744_ACEOF
4745cat confdefs.h >>conftest.$ac_ext
4746cat >>conftest.$ac_ext <<_ACEOF
4747/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004748
4749int
4750main ()
4751{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004753 ;
4754 return 0;
4755}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004757rm -f conftest.$ac_objext
4758if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759case "(($ac_try" in
4760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4761 *) ac_try_echo=$ac_try;;
4762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004764 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004766 grep -v '^ *+' conftest.er1 >conftest.err
4767 rm -f conftest.er1
4768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004770 (exit $ac_status); } && {
4771 test -z "$ac_c_werror_flag" ||
4772 test ! -s conftest.err
4773 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 ac_cv_opt_olimit_ok=yes
4775else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004776 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777sed 's/^/| /' conftest.$ac_ext >&5
4778
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004779 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780fi
4781
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783CC="$ac_save_cc"
4784fi
4785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004786{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4787echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788if test $ac_cv_opt_olimit_ok = yes; then
4789 case $ac_sys_system in
4790 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4791 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4792 # environment?
4793 Darwin*)
4794 ;;
4795 *)
4796 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4797 ;;
4798 esac
4799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004800 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4801echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004803 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804else
4805 ac_save_cc="$CC"
4806 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807 cat >conftest.$ac_ext <<_ACEOF
4808/* confdefs.h. */
4809_ACEOF
4810cat confdefs.h >>conftest.$ac_ext
4811cat >>conftest.$ac_ext <<_ACEOF
4812/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004813
4814int
4815main ()
4816{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004818 ;
4819 return 0;
4820}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004822rm -f conftest.$ac_objext
4823if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824case "(($ac_try" in
4825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4826 *) ac_try_echo=$ac_try;;
4827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004829 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 grep -v '^ *+' conftest.er1 >conftest.err
4832 rm -f conftest.er1
4833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 (exit $ac_status); } && {
4836 test -z "$ac_c_werror_flag" ||
4837 test ! -s conftest.err
4838 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 ac_cv_olimit_ok=yes
4840else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842sed 's/^/| /' conftest.$ac_ext >&5
4843
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004844 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
4846
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 CC="$ac_save_cc"
4849fi
4850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4852echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853 if test $ac_cv_olimit_ok = yes; then
4854 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4855 fi
4856fi
4857
4858# Check whether GCC supports PyArg_ParseTuple format
4859if test "$GCC" = "yes"
4860then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004861 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4862echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863 save_CFLAGS=$CFLAGS
4864 CFLAGS="$CFLAGS -Werror"
4865 cat >conftest.$ac_ext <<_ACEOF
4866/* confdefs.h. */
4867_ACEOF
4868cat confdefs.h >>conftest.$ac_ext
4869cat >>conftest.$ac_ext <<_ACEOF
4870/* end confdefs.h. */
4871
4872 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4873
4874int
4875main ()
4876{
4877
4878 ;
4879 return 0;
4880}
4881_ACEOF
4882rm -f conftest.$ac_objext
4883if { (ac_try="$ac_compile"
4884case "(($ac_try" in
4885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4886 *) ac_try_echo=$ac_try;;
4887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 (eval "$ac_compile") 2>conftest.er1
4890 ac_status=$?
4891 grep -v '^ *+' conftest.er1 >conftest.err
4892 rm -f conftest.er1
4893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 (exit $ac_status); } && {
4896 test -z "$ac_c_werror_flag" ||
4897 test ! -s conftest.err
4898 } && test -s conftest.$ac_objext; then
4899
4900cat >>confdefs.h <<\_ACEOF
4901#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4902_ACEOF
4903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004904 { echo "$as_me:$LINENO: result: yes" >&5
4905echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004907 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908sed 's/^/| /' conftest.$ac_ext >&5
4909
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004910 { echo "$as_me:$LINENO: result: no" >&5
4911echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913fi
4914
4915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4916 CFLAGS=$save_CFLAGS
4917fi
4918
4919# On some compilers, pthreads are available without further options
4920# (e.g. MacOS X). On some of these systems, the compiler will not
4921# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4922# So we have to see first whether pthreads are available without
4923# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004924{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4925echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004927 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928else
4929 if test "$cross_compiling" = yes; then
4930 ac_cv_pthread_is_default=no
4931else
4932 cat >conftest.$ac_ext <<_ACEOF
4933/* confdefs.h. */
4934_ACEOF
4935cat confdefs.h >>conftest.$ac_ext
4936cat >>conftest.$ac_ext <<_ACEOF
4937/* end confdefs.h. */
4938
4939#include <pthread.h>
4940
4941void* routine(void* p){return NULL;}
4942
4943int main(){
4944 pthread_t p;
4945 if(pthread_create(&p,NULL,routine,NULL)!=0)
4946 return 1;
4947 (void)pthread_detach(p);
4948 return 0;
4949}
4950
4951_ACEOF
4952rm -f conftest$ac_exeext
4953if { (ac_try="$ac_link"
4954case "(($ac_try" in
4955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4956 *) ac_try_echo=$ac_try;;
4957esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 (eval "$ac_link") 2>&5
4960 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4963 { (case "(($ac_try" in
4964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4965 *) ac_try_echo=$ac_try;;
4966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 (eval "$ac_try") 2>&5
4969 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971 (exit $ac_status); }; }; then
4972
4973 ac_cv_pthread_is_default=yes
4974 ac_cv_kthread=no
4975 ac_cv_pthread=no
4976
4977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004978 echo "$as_me: program exited with status $ac_status" >&5
4979echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980sed 's/^/| /' conftest.$ac_ext >&5
4981
4982( exit $ac_status )
4983ac_cv_pthread_is_default=no
4984fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4986fi
4987
4988
4989
4990fi
4991
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004992{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4993echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
4995
4996if test $ac_cv_pthread_is_default = yes
4997then
4998 ac_cv_kpthread=no
4999else
5000# -Kpthread, if available, provides the right #defines
5001# and linker options to make pthread_create available
5002# Some compilers won't report that they do not support -Kpthread,
5003# so we need to run a program to see whether it really made the
5004# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005005{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5006echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005008 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009else
5010 ac_save_cc="$CC"
5011CC="$CC -Kpthread"
5012if test "$cross_compiling" = yes; then
5013 ac_cv_kpthread=no
5014else
5015 cat >conftest.$ac_ext <<_ACEOF
5016/* confdefs.h. */
5017_ACEOF
5018cat confdefs.h >>conftest.$ac_ext
5019cat >>conftest.$ac_ext <<_ACEOF
5020/* end confdefs.h. */
5021
5022#include <pthread.h>
5023
5024void* routine(void* p){return NULL;}
5025
5026int main(){
5027 pthread_t p;
5028 if(pthread_create(&p,NULL,routine,NULL)!=0)
5029 return 1;
5030 (void)pthread_detach(p);
5031 return 0;
5032}
5033
5034_ACEOF
5035rm -f conftest$ac_exeext
5036if { (ac_try="$ac_link"
5037case "(($ac_try" in
5038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5039 *) ac_try_echo=$ac_try;;
5040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 (eval "$ac_link") 2>&5
5043 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5046 { (case "(($ac_try" in
5047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5048 *) ac_try_echo=$ac_try;;
5049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051 (eval "$ac_try") 2>&5
5052 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 (exit $ac_status); }; }; then
5055 ac_cv_kpthread=yes
5056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005057 echo "$as_me: program exited with status $ac_status" >&5
5058echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059sed 's/^/| /' conftest.$ac_ext >&5
5060
5061( exit $ac_status )
5062ac_cv_kpthread=no
5063fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5065fi
5066
5067
5068CC="$ac_save_cc"
5069fi
5070
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005071{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5072echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5076then
5077# -Kthread, if available, provides the right #defines
5078# and linker options to make pthread_create available
5079# Some compilers won't report that they do not support -Kthread,
5080# so we need to run a program to see whether it really made the
5081# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005082{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5083echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005085 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086else
5087 ac_save_cc="$CC"
5088CC="$CC -Kthread"
5089if test "$cross_compiling" = yes; then
5090 ac_cv_kthread=no
5091else
5092 cat >conftest.$ac_ext <<_ACEOF
5093/* confdefs.h. */
5094_ACEOF
5095cat confdefs.h >>conftest.$ac_ext
5096cat >>conftest.$ac_ext <<_ACEOF
5097/* end confdefs.h. */
5098
5099#include <pthread.h>
5100
5101void* routine(void* p){return NULL;}
5102
5103int main(){
5104 pthread_t p;
5105 if(pthread_create(&p,NULL,routine,NULL)!=0)
5106 return 1;
5107 (void)pthread_detach(p);
5108 return 0;
5109}
5110
5111_ACEOF
5112rm -f conftest$ac_exeext
5113if { (ac_try="$ac_link"
5114case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 (eval "$ac_link") 2>&5
5120 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5123 { (case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 (eval "$ac_try") 2>&5
5129 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 (exit $ac_status); }; }; then
5132 ac_cv_kthread=yes
5133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005134 echo "$as_me: program exited with status $ac_status" >&5
5135echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136sed 's/^/| /' conftest.$ac_ext >&5
5137
5138( exit $ac_status )
5139ac_cv_kthread=no
5140fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5142fi
5143
5144
5145CC="$ac_save_cc"
5146fi
5147
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5149echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150fi
5151
5152if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5153then
5154# -pthread, if available, provides the right #defines
5155# and linker options to make pthread_create available
5156# Some compilers won't report that they do not support -pthread,
5157# so we need to run a program to see whether it really made the
5158# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005159{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5160echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005162 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163else
5164 ac_save_cc="$CC"
5165CC="$CC -pthread"
5166if test "$cross_compiling" = yes; then
5167 ac_cv_pthread=no
5168else
5169 cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
5175
5176#include <pthread.h>
5177
5178void* routine(void* p){return NULL;}
5179
5180int main(){
5181 pthread_t p;
5182 if(pthread_create(&p,NULL,routine,NULL)!=0)
5183 return 1;
5184 (void)pthread_detach(p);
5185 return 0;
5186}
5187
5188_ACEOF
5189rm -f conftest$ac_exeext
5190if { (ac_try="$ac_link"
5191case "(($ac_try" in
5192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5193 *) ac_try_echo=$ac_try;;
5194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196 (eval "$ac_link") 2>&5
5197 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5200 { (case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 (eval "$ac_try") 2>&5
5206 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 (exit $ac_status); }; }; then
5209 ac_cv_pthread=yes
5210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005211 echo "$as_me: program exited with status $ac_status" >&5
5212echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213sed 's/^/| /' conftest.$ac_ext >&5
5214
5215( exit $ac_status )
5216ac_cv_pthread=no
5217fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5219fi
5220
5221
5222CC="$ac_save_cc"
5223fi
5224
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005225{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5226echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227fi
5228
5229# If we have set a CC compiler flag for thread support then
5230# check if it works for CXX, too.
5231ac_cv_cxx_thread=no
5232if test ! -z "$CXX"
5233then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005234{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5235echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236ac_save_cxx="$CXX"
5237
5238if test "$ac_cv_kpthread" = "yes"
5239then
5240 CXX="$CXX -Kpthread"
5241 ac_cv_cxx_thread=yes
5242elif test "$ac_cv_kthread" = "yes"
5243then
5244 CXX="$CXX -Kthread"
5245 ac_cv_cxx_thread=yes
5246elif test "$ac_cv_pthread" = "yes"
5247then
5248 CXX="$CXX -pthread"
5249 ac_cv_cxx_thread=yes
5250fi
5251
5252if test $ac_cv_cxx_thread = yes
5253then
5254 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5255 $CXX -c conftest.$ac_ext 2>&5
5256 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5257 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5258 then
5259 ac_cv_cxx_thread=yes
5260 else
5261 ac_cv_cxx_thread=no
5262 fi
5263 rm -fr conftest*
5264fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005265{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5266echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
5268CXX="$ac_save_cxx"
5269
5270
5271# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005272{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5273echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005275 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276else
5277 cat >conftest.$ac_ext <<_ACEOF
5278/* confdefs.h. */
5279_ACEOF
5280cat confdefs.h >>conftest.$ac_ext
5281cat >>conftest.$ac_ext <<_ACEOF
5282/* end confdefs.h. */
5283#include <stdlib.h>
5284#include <stdarg.h>
5285#include <string.h>
5286#include <float.h>
5287
5288int
5289main ()
5290{
5291
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
5297if { (ac_try="$ac_compile"
5298case "(($ac_try" in
5299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5300 *) ac_try_echo=$ac_try;;
5301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303 (eval "$ac_compile") 2>conftest.er1
5304 ac_status=$?
5305 grep -v '^ *+' conftest.er1 >conftest.err
5306 rm -f conftest.er1
5307 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 (exit $ac_status); } && {
5310 test -z "$ac_c_werror_flag" ||
5311 test ! -s conftest.err
5312 } && test -s conftest.$ac_objext; then
5313 ac_cv_header_stdc=yes
5314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005315 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316sed 's/^/| /' conftest.$ac_ext >&5
5317
5318 ac_cv_header_stdc=no
5319fi
5320
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322
5323if test $ac_cv_header_stdc = yes; then
5324 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5325 cat >conftest.$ac_ext <<_ACEOF
5326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
5331#include <string.h>
5332
5333_ACEOF
5334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5335 $EGREP "memchr" >/dev/null 2>&1; then
5336 :
5337else
5338 ac_cv_header_stdc=no
5339fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005340rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341
5342fi
5343
5344if test $ac_cv_header_stdc = yes; then
5345 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5346 cat >conftest.$ac_ext <<_ACEOF
5347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
5352#include <stdlib.h>
5353
5354_ACEOF
5355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5356 $EGREP "free" >/dev/null 2>&1; then
5357 :
5358else
5359 ac_cv_header_stdc=no
5360fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005361rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363fi
5364
5365if test $ac_cv_header_stdc = yes; then
5366 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5367 if test "$cross_compiling" = yes; then
5368 :
5369else
5370 cat >conftest.$ac_ext <<_ACEOF
5371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
5376#include <ctype.h>
5377#include <stdlib.h>
5378#if ((' ' & 0x0FF) == 0x020)
5379# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5380# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5381#else
5382# define ISLOWER(c) \
5383 (('a' <= (c) && (c) <= 'i') \
5384 || ('j' <= (c) && (c) <= 'r') \
5385 || ('s' <= (c) && (c) <= 'z'))
5386# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5387#endif
5388
5389#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5390int
5391main ()
5392{
5393 int i;
5394 for (i = 0; i < 256; i++)
5395 if (XOR (islower (i), ISLOWER (i))
5396 || toupper (i) != TOUPPER (i))
5397 return 2;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest$ac_exeext
5402if { (ac_try="$ac_link"
5403case "(($ac_try" in
5404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5405 *) ac_try_echo=$ac_try;;
5406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 (eval "$ac_link") 2>&5
5409 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5412 { (case "(($ac_try" in
5413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5414 *) ac_try_echo=$ac_try;;
5415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 (eval "$ac_try") 2>&5
5418 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420 (exit $ac_status); }; }; then
5421 :
5422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005423 echo "$as_me: program exited with status $ac_status" >&5
5424echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425sed 's/^/| /' conftest.$ac_ext >&5
5426
5427( exit $ac_status )
5428ac_cv_header_stdc=no
5429fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5431fi
5432
5433
5434fi
5435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005436{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5437echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438if test $ac_cv_header_stdc = yes; then
5439
5440cat >>confdefs.h <<\_ACEOF
5441#define STDC_HEADERS 1
5442_ACEOF
5443
5444fi
5445
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5457 inttypes.h stdint.h unistd.h
5458do
5459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5460{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5462if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464else
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
5471$ac_includes_default
5472
5473#include <$ac_header>
5474_ACEOF
5475rm -f conftest.$ac_objext
5476if { (ac_try="$ac_compile"
5477case "(($ac_try" in
5478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5479 *) ac_try_echo=$ac_try;;
5480esac
5481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5482 (eval "$ac_compile") 2>conftest.er1
5483 ac_status=$?
5484 grep -v '^ *+' conftest.er1 >conftest.err
5485 rm -f conftest.er1
5486 cat conftest.err >&5
5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488 (exit $ac_status); } && {
5489 test -z "$ac_c_werror_flag" ||
5490 test ! -s conftest.err
5491 } && test -s conftest.$ac_objext; then
5492 eval "$as_ac_Header=yes"
5493else
5494 echo "$as_me: failed program was:" >&5
5495sed 's/^/| /' conftest.$ac_ext >&5
5496
5497 eval "$as_ac_Header=no"
5498fi
5499
5500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5501fi
5502ac_res=`eval echo '${'$as_ac_Header'}'`
5503 { echo "$as_me:$LINENO: result: $ac_res" >&5
5504echo "${ECHO_T}$ac_res" >&6; }
5505if test `eval echo '${'$as_ac_Header'}'` = yes; then
5506 cat >>confdefs.h <<_ACEOF
5507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5508_ACEOF
5509
5510fi
5511
5512done
5513
5514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
Martin v. Löwis11437992002-04-12 09:54:03 +00005516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
Anthony Baxter8a560de2004-10-13 15:30:56 +00005551
Martin v. Löwisc3001752005-01-23 09:27:24 +00005552
Martin v. Löwis11017b12006-01-14 18:12:57 +00005553
Thomas Wouters477c8d52006-05-27 19:21:47 +00005554
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005555
5556
5557
5558
5559
5560
5561
5562
Thomas Wouters89f507f2006-12-13 04:49:30 +00005563
Christian Heimes043d6f62008-01-07 17:19:16 +00005564
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005565
5566
Christian Heimesbbe741d2008-03-28 10:53:29 +00005567
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005568
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005569for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5570fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005571ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005572shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005573unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005574sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5575sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005576sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005577sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578sys/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 +00005579sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005580bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005581do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005582as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005583if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005584 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5585echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005586if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005588fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005589ac_res=`eval echo '${'$as_ac_Header'}'`
5590 { echo "$as_me:$LINENO: result: $ac_res" >&5
5591echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592else
Martin v. Löwis11437992002-04-12 09:54:03 +00005593 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005594{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5595echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005597/* confdefs.h. */
5598_ACEOF
5599cat confdefs.h >>conftest.$ac_ext
5600cat >>conftest.$ac_ext <<_ACEOF
5601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005602$ac_includes_default
5603#include <$ac_header>
5604_ACEOF
5605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005606if { (ac_try="$ac_compile"
5607case "(($ac_try" in
5608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5609 *) ac_try_echo=$ac_try;;
5610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005614 grep -v '^ *+' conftest.er1 >conftest.err
5615 rm -f conftest.er1
5616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005618 (exit $ac_status); } && {
5619 test -z "$ac_c_werror_flag" ||
5620 test ! -s conftest.err
5621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005625sed 's/^/| /' conftest.$ac_ext >&5
5626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005627 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005631{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5632echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005633
5634# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005635{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5636echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005638/* confdefs.h. */
5639_ACEOF
5640cat confdefs.h >>conftest.$ac_ext
5641cat >>conftest.$ac_ext <<_ACEOF
5642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005643#include <$ac_header>
5644_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005645if { (ac_try="$ac_cpp conftest.$ac_ext"
5646case "(($ac_try" in
5647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5648 *) ac_try_echo=$ac_try;;
5649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005651 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005653 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 rm -f conftest.er1
5655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005657 (exit $ac_status); } >/dev/null && {
5658 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5659 test ! -s conftest.err
5660 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 ac_header_preproc=yes
5662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005664sed 's/^/| /' conftest.$ac_ext >&5
5665
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005668
Martin v. Löwis11437992002-04-12 09:54:03 +00005669rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005670{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5671echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672
5673# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5675 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005676 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5677echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5678 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5679echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005681 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005683 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5684echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5685 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5686echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5688echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5690echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5692echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5694echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005695 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005696## -------------------------------------- ##
5697## Report this to http://bugs.python.org/ ##
5698## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005699_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005700 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005701 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005703{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5704echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005706 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005707else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005708 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005710ac_res=`eval echo '${'$as_ac_Header'}'`
5711 { echo "$as_me:$LINENO: result: $ac_res" >&5
5712echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005713
5714fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005715if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005718_ACEOF
5719
5720fi
5721
Guido van Rossum627b2d71993-12-24 10:39:16 +00005722done
5723
Martin v. Löwis11437992002-04-12 09:54:03 +00005724
5725
5726
5727
5728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005730for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005731 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5732{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5733echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005734if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005736else
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005738/* confdefs.h. */
5739_ACEOF
5740cat confdefs.h >>conftest.$ac_ext
5741cat >>conftest.$ac_ext <<_ACEOF
5742/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743#include <sys/types.h>
5744#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005745
Martin v. Löwis11437992002-04-12 09:54:03 +00005746int
5747main ()
5748{
5749if ((DIR *) 0)
5750return 0;
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005756if { (ac_try="$ac_compile"
5757case "(($ac_try" in
5758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5759 *) ac_try_echo=$ac_try;;
5760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005764 grep -v '^ *+' conftest.er1 >conftest.err
5765 rm -f conftest.er1
5766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005768 (exit $ac_status); } && {
5769 test -z "$ac_c_werror_flag" ||
5770 test ! -s conftest.err
5771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005772 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005775sed 's/^/| /' conftest.$ac_ext >&5
5776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005777 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779
5780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005782ac_res=`eval echo '${'$as_ac_Header'}'`
5783 { echo "$as_me:$LINENO: result: $ac_res" >&5
5784echo "${ECHO_T}$ac_res" >&6; }
5785if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005787#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005788_ACEOF
5789
5790ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793done
5794# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5795if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005796 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5797echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005798if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005809/* Override any GCC internal prototype to avoid an error.
5810 Use char because int might match the return type of a GCC
5811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005812#ifdef __cplusplus
5813extern "C"
5814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005815char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005816int
5817main ()
5818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005819return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ;
5821 return 0;
5822}
5823_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005824for ac_lib in '' dir; do
5825 if test -z "$ac_lib"; then
5826 ac_res="none required"
5827 else
5828 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005830 fi
5831 rm -f conftest.$ac_objext conftest$ac_exeext
5832if { (ac_try="$ac_link"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005838 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005839 ac_status=$?
5840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005847 } && test -s conftest$ac_exeext &&
5848 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005849 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005851 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852sed 's/^/| /' conftest.$ac_ext >&5
5853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005854
Thomas Wouters477c8d52006-05-27 19:21:47 +00005855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5858 conftest$ac_exeext
5859 if test "${ac_cv_search_opendir+set}" = set; then
5860 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862done
5863if test "${ac_cv_search_opendir+set}" = set; then
5864 :
5865else
5866 ac_cv_search_opendir=no
5867fi
5868rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005869LIBS=$ac_func_search_save_LIBS
5870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005871{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5872echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005873ac_res=$ac_cv_search_opendir
5874if test "$ac_res" != no; then
5875 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005876
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005880 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5881echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005882if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005884else
5885 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005893/* Override any GCC internal prototype to avoid an error.
5894 Use char because int might match the return type of a GCC
5895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005896#ifdef __cplusplus
5897extern "C"
5898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005899char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005900int
5901main ()
5902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005903return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005904 ;
5905 return 0;
5906}
5907_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005908for ac_lib in '' x; do
5909 if test -z "$ac_lib"; then
5910 ac_res="none required"
5911 else
5912 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005914 fi
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916if { (ac_try="$ac_link"
5917case "(($ac_try" in
5918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5919 *) ac_try_echo=$ac_try;;
5920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005923 ac_status=$?
5924 grep -v '^ *+' conftest.er1 >conftest.err
5925 rm -f conftest.er1
5926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005928 (exit $ac_status); } && {
5929 test -z "$ac_c_werror_flag" ||
5930 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005931 } && test -s conftest$ac_exeext &&
5932 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005935 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936sed 's/^/| /' conftest.$ac_ext >&5
5937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005938
Thomas Wouters477c8d52006-05-27 19:21:47 +00005939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
5941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5942 conftest$ac_exeext
5943 if test "${ac_cv_search_opendir+set}" = set; then
5944 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946done
5947if test "${ac_cv_search_opendir+set}" = set; then
5948 :
5949else
5950 ac_cv_search_opendir=no
5951fi
5952rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005953LIBS=$ac_func_search_save_LIBS
5954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005955{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5956echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005957ac_res=$ac_cv_search_opendir
5958if test "$ac_res" != no; then
5959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005960
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961fi
5962
5963fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005964
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005965{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5966echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969else
5970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005971/* confdefs.h. */
5972_ACEOF
5973cat confdefs.h >>conftest.$ac_ext
5974cat >>conftest.$ac_ext <<_ACEOF
5975/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005976#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977int
5978main ()
5979{
5980return makedev(0, 0);
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986if { (ac_try="$ac_link"
5987case "(($ac_try" in
5988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5989 *) ac_try_echo=$ac_try;;
5990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005994 grep -v '^ *+' conftest.er1 >conftest.err
5995 rm -f conftest.er1
5996 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005998 (exit $ac_status); } && {
5999 test -z "$ac_c_werror_flag" ||
6000 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006001 } && test -s conftest$ac_exeext &&
6002 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003 ac_cv_header_sys_types_h_makedev=yes
6004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006006sed 's/^/| /' conftest.$ac_ext >&5
6007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006008 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010
6011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013
6014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006015{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6016echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017
6018if test $ac_cv_header_sys_types_h_makedev = no; then
6019if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006020 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6021echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006023 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6026echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027else
6028 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006029{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6030echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006032/* confdefs.h. */
6033_ACEOF
6034cat confdefs.h >>conftest.$ac_ext
6035cat >>conftest.$ac_ext <<_ACEOF
6036/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037$ac_includes_default
6038#include <sys/mkdev.h>
6039_ACEOF
6040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006041if { (ac_try="$ac_compile"
6042case "(($ac_try" in
6043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6044 *) ac_try_echo=$ac_try;;
6045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006049 grep -v '^ *+' conftest.er1 >conftest.err
6050 rm -f conftest.er1
6051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006053 (exit $ac_status); } && {
6054 test -z "$ac_c_werror_flag" ||
6055 test ! -s conftest.err
6056 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 ac_header_compiler=yes
6058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006060sed 's/^/| /' conftest.$ac_ext >&5
6061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064
6065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006066{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6067echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068
6069# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6071echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* confdefs.h. */
6074_ACEOF
6075cat confdefs.h >>conftest.$ac_ext
6076cat >>conftest.$ac_ext <<_ACEOF
6077/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078#include <sys/mkdev.h>
6079_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080if { (ac_try="$ac_cpp conftest.$ac_ext"
6081case "(($ac_try" in
6082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6083 *) ac_try_echo=$ac_try;;
6084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006086 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006088 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 rm -f conftest.er1
6090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092 (exit $ac_status); } >/dev/null && {
6093 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6094 test ! -s conftest.err
6095 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096 ac_header_preproc=yes
6097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006099sed 's/^/| /' conftest.$ac_ext >&5
6100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101 ac_header_preproc=no
6102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006105{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6106echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107
6108# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6110 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006111 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6112echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006115 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006116 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006118 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6119echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006131## -------------------------------------- ##
6132## Report this to http://bugs.python.org/ ##
6133## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006134_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006136 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006138{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6139echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142else
6143 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6144fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006145{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6146echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147
6148fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006149if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150
6151cat >>confdefs.h <<\_ACEOF
6152#define MAJOR_IN_MKDEV 1
6153_ACEOF
6154
6155fi
6156
6157
6158
6159 if test $ac_cv_header_sys_mkdev_h = no; then
6160 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006161 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6162echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006166{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6167echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168else
6169 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006170{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6171echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006173/* confdefs.h. */
6174_ACEOF
6175cat confdefs.h >>conftest.$ac_ext
6176cat >>conftest.$ac_ext <<_ACEOF
6177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178$ac_includes_default
6179#include <sys/sysmacros.h>
6180_ACEOF
6181rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182if { (ac_try="$ac_compile"
6183case "(($ac_try" in
6184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6185 *) ac_try_echo=$ac_try;;
6186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 grep -v '^ *+' conftest.er1 >conftest.err
6191 rm -f conftest.er1
6192 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194 (exit $ac_status); } && {
6195 test -z "$ac_c_werror_flag" ||
6196 test ! -s conftest.err
6197 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198 ac_header_compiler=yes
6199else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006201sed 's/^/| /' conftest.$ac_ext >&5
6202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205
6206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006207{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6208echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209
6210# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006211{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6212echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006214/* confdefs.h. */
6215_ACEOF
6216cat confdefs.h >>conftest.$ac_ext
6217cat >>conftest.$ac_ext <<_ACEOF
6218/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219#include <sys/sysmacros.h>
6220_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221if { (ac_try="$ac_cpp conftest.$ac_ext"
6222case "(($ac_try" in
6223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6224 *) ac_try_echo=$ac_try;;
6225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006229 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230 rm -f conftest.er1
6231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233 (exit $ac_status); } >/dev/null && {
6234 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6235 test ! -s conftest.err
6236 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_header_preproc=yes
6238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006240sed 's/^/| /' conftest.$ac_ext >&5
6241
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 ac_header_preproc=no
6243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006244
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006246{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6247echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248
6249# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6251 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006252 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6253echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6254 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6255echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006256 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006257 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006259 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6260echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006272## -------------------------------------- ##
6273## Report this to http://bugs.python.org/ ##
6274## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006275_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006277 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006279{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6280echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283else
6284 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6285fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006286{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6287echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006290if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291
6292cat >>confdefs.h <<\_ACEOF
6293#define MAJOR_IN_SYSMACROS 1
6294_ACEOF
6295
6296fi
6297
6298
6299 fi
6300fi
6301
Michael W. Hudson54241132001-12-07 15:38:26 +00006302
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006303# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006304
6305for ac_header in term.h
6306do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006307as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6308{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6309echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006310if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006311 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006312else
6313 cat >conftest.$ac_ext <<_ACEOF
6314/* confdefs.h. */
6315_ACEOF
6316cat confdefs.h >>conftest.$ac_ext
6317cat >>conftest.$ac_ext <<_ACEOF
6318/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006320#ifdef HAVE_CURSES_H
6321#include <curses.h>
6322#endif
6323
6324
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006325#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326_ACEOF
6327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328if { (ac_try="$ac_compile"
6329case "(($ac_try" in
6330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6331 *) ac_try_echo=$ac_try;;
6332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335 ac_status=$?
6336 grep -v '^ *+' conftest.er1 >conftest.err
6337 rm -f conftest.er1
6338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006340 (exit $ac_status); } && {
6341 test -z "$ac_c_werror_flag" ||
6342 test ! -s conftest.err
6343 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006344 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006346 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347sed 's/^/| /' conftest.$ac_ext >&5
6348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351
6352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006354ac_res=`eval echo '${'$as_ac_Header'}'`
6355 { echo "$as_me:$LINENO: result: $ac_res" >&5
6356echo "${ECHO_T}$ac_res" >&6; }
6357if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006358 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006359#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362fi
6363
6364done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
6366
Martin v. Löwis11017b12006-01-14 18:12:57 +00006367# On Linux, netlink.h requires asm/types.h
6368
6369for ac_header in linux/netlink.h
6370do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006371as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6372{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6373echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376else
6377 cat >conftest.$ac_ext <<_ACEOF
6378/* confdefs.h. */
6379_ACEOF
6380cat confdefs.h >>conftest.$ac_ext
6381cat >>conftest.$ac_ext <<_ACEOF
6382/* end confdefs.h. */
6383
6384#ifdef HAVE_ASM_TYPES_H
6385#include <asm/types.h>
6386#endif
6387#ifdef HAVE_SYS_SOCKET_H
6388#include <sys/socket.h>
6389#endif
6390
6391
6392#include <$ac_header>
6393_ACEOF
6394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395if { (ac_try="$ac_compile"
6396case "(($ac_try" in
6397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6398 *) ac_try_echo=$ac_try;;
6399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006402 ac_status=$?
6403 grep -v '^ *+' conftest.er1 >conftest.err
6404 rm -f conftest.er1
6405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407 (exit $ac_status); } && {
6408 test -z "$ac_c_werror_flag" ||
6409 test ! -s conftest.err
6410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411 eval "$as_ac_Header=yes"
6412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006413 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006414sed 's/^/| /' conftest.$ac_ext >&5
6415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418
6419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006421ac_res=`eval echo '${'$as_ac_Header'}'`
6422 { echo "$as_me:$LINENO: result: $ac_res" >&5
6423echo "${ECHO_T}$ac_res" >&6; }
6424if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427_ACEOF
6428
6429fi
6430
6431done
6432
6433
Guido van Rossum627b2d71993-12-24 10:39:16 +00006434# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006435was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006436{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6437echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006445
6446_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006448 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006449 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450else
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452
6453cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006455_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006457
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006459rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006461{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6462echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006463
Neal Norwitz11690112002-07-30 01:08:28 +00006464# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006465{ echo "$as_me:$LINENO: checking for makedev" >&5
6466echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006467cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006468/* confdefs.h. */
6469_ACEOF
6470cat confdefs.h >>conftest.$ac_ext
6471cat >>conftest.$ac_ext <<_ACEOF
6472/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006473#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006474int
6475main ()
6476{
6477 makedev(0, 0)
6478 ;
6479 return 0;
6480}
6481_ACEOF
6482rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006483if { (ac_try="$ac_link"
6484case "(($ac_try" in
6485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6486 *) ac_try_echo=$ac_try;;
6487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006491 grep -v '^ *+' conftest.er1 >conftest.err
6492 rm -f conftest.er1
6493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006495 (exit $ac_status); } && {
6496 test -z "$ac_c_werror_flag" ||
6497 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006498 } && test -s conftest$ac_exeext &&
6499 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006500 ac_cv_has_makedev=yes
6501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006503sed 's/^/| /' conftest.$ac_ext >&5
6504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507
6508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006510if test "$ac_cv_has_makedev" = "no"; then
6511 # we didn't link, try if _OSF_SOURCE will allow us to link
6512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006518
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006519#define _OSF_SOURCE 1
6520#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006521
Neal Norwitz11690112002-07-30 01:08:28 +00006522int
6523main ()
6524{
6525 makedev(0, 0)
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531if { (ac_try="$ac_link"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006546 } && test -s conftest$ac_exeext &&
6547 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_cv_has_makedev=yes
6549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006551sed 's/^/| /' conftest.$ac_ext >&5
6552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555
6556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006558 if test "$ac_cv_has_makedev" = "yes"; then
6559
6560cat >>confdefs.h <<\_ACEOF
6561#define _OSF_SOURCE 1
6562_ACEOF
6563
6564 fi
6565fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006566{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6567echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006568if test "$ac_cv_has_makedev" = "yes"; then
6569
6570cat >>confdefs.h <<\_ACEOF
6571#define HAVE_MAKEDEV 1
6572_ACEOF
6573
6574fi
6575
Martin v. Löwis399a6892002-10-04 10:22:02 +00006576# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6577# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6578# defined, but the compiler does not support pragma redefine_extname,
6579# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6580# structures (such as rlimit64) without declaring them. As a
6581# work-around, disable LFS on such configurations
6582
6583use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006584{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6585echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006587/* confdefs.h. */
6588_ACEOF
6589cat confdefs.h >>conftest.$ac_ext
6590cat >>conftest.$ac_ext <<_ACEOF
6591/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592
6593#define _LARGEFILE_SOURCE 1
6594#define _FILE_OFFSET_BITS 64
6595#include <sys/resource.h>
6596
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597int
6598main ()
6599{
6600struct rlimit foo;
6601 ;
6602 return 0;
6603}
6604_ACEOF
6605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606if { (ac_try="$ac_compile"
6607case "(($ac_try" in
6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609 *) ac_try_echo=$ac_try;;
6610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 grep -v '^ *+' conftest.er1 >conftest.err
6615 rm -f conftest.er1
6616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618 (exit $ac_status); } && {
6619 test -z "$ac_c_werror_flag" ||
6620 test ! -s conftest.err
6621 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622 sol_lfs_bug=no
6623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006625sed 's/^/| /' conftest.$ac_ext >&5
6626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629
6630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006631{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6632echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633if test "$sol_lfs_bug" = "yes"; then
6634 use_lfs=no
6635fi
6636
6637if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006638# Two defines needed to enable largefile support on various platforms
6639# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006640
Martin v. Löwis11437992002-04-12 09:54:03 +00006641cat >>confdefs.h <<\_ACEOF
6642#define _LARGEFILE_SOURCE 1
6643_ACEOF
6644
6645
6646cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006647#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006648_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006649
Martin v. Löwis399a6892002-10-04 10:22:02 +00006650fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006651
Guido van Rossum84e7b241996-08-19 21:59:00 +00006652# Add some code to confdefs.h so that the test for off_t works on SCO
6653cat >> confdefs.h <<\EOF
6654#if defined(SCO_DS)
6655#undef _OFF_T
6656#endif
6657EOF
6658
Guido van Rossumef2255b2000-03-10 22:30:29 +00006659# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006660{ echo "$as_me:$LINENO: checking for mode_t" >&5
6661echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006662if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006664else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006665 cat >conftest.$ac_ext <<_ACEOF
6666/* confdefs.h. */
6667_ACEOF
6668cat confdefs.h >>conftest.$ac_ext
6669cat >>conftest.$ac_ext <<_ACEOF
6670/* end confdefs.h. */
6671$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006672typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006673int
6674main ()
6675{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006676if ((ac__type_new_ *) 0)
6677 return 0;
6678if (sizeof (ac__type_new_))
6679 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006680 ;
6681 return 0;
6682}
6683_ACEOF
6684rm -f conftest.$ac_objext
6685if { (ac_try="$ac_compile"
6686case "(($ac_try" in
6687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6688 *) ac_try_echo=$ac_try;;
6689esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006691 (eval "$ac_compile") 2>conftest.er1
6692 ac_status=$?
6693 grep -v '^ *+' conftest.er1 >conftest.err
6694 rm -f conftest.er1
6695 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006697 (exit $ac_status); } && {
6698 test -z "$ac_c_werror_flag" ||
6699 test ! -s conftest.err
6700 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006701 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006704sed 's/^/| /' conftest.$ac_ext >&5
6705
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006706 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708
6709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006711{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6712echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6713if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006715else
Martin v. Löwis11437992002-04-12 09:54:03 +00006716
6717cat >>confdefs.h <<_ACEOF
6718#define mode_t int
6719_ACEOF
6720
6721fi
6722
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006723{ echo "$as_me:$LINENO: checking for off_t" >&5
6724echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006725if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006726 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006728 cat >conftest.$ac_ext <<_ACEOF
6729/* confdefs.h. */
6730_ACEOF
6731cat confdefs.h >>conftest.$ac_ext
6732cat >>conftest.$ac_ext <<_ACEOF
6733/* end confdefs.h. */
6734$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006735typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006736int
6737main ()
6738{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006739if ((ac__type_new_ *) 0)
6740 return 0;
6741if (sizeof (ac__type_new_))
6742 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006743 ;
6744 return 0;
6745}
6746_ACEOF
6747rm -f conftest.$ac_objext
6748if { (ac_try="$ac_compile"
6749case "(($ac_try" in
6750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6751 *) ac_try_echo=$ac_try;;
6752esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006754 (eval "$ac_compile") 2>conftest.er1
6755 ac_status=$?
6756 grep -v '^ *+' conftest.er1 >conftest.err
6757 rm -f conftest.er1
6758 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006760 (exit $ac_status); } && {
6761 test -z "$ac_c_werror_flag" ||
6762 test ! -s conftest.err
6763 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006764 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006767sed 's/^/| /' conftest.$ac_ext >&5
6768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006769 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771
6772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006773fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6775echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6776if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006778else
Martin v. Löwis11437992002-04-12 09:54:03 +00006779
6780cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
6783
6784fi
6785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006786{ echo "$as_me:$LINENO: checking for pid_t" >&5
6787echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006788if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006791 cat >conftest.$ac_ext <<_ACEOF
6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
6797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006798typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006799int
6800main ()
6801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006802if ((ac__type_new_ *) 0)
6803 return 0;
6804if (sizeof (ac__type_new_))
6805 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (ac_try="$ac_compile"
6812case "(($ac_try" in
6813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6814 *) ac_try_echo=$ac_try;;
6815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006817 (eval "$ac_compile") 2>conftest.er1
6818 ac_status=$?
6819 grep -v '^ *+' conftest.er1 >conftest.err
6820 rm -f conftest.er1
6821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006823 (exit $ac_status); } && {
6824 test -z "$ac_c_werror_flag" ||
6825 test ! -s conftest.err
6826 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006827 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006830sed 's/^/| /' conftest.$ac_ext >&5
6831
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006832 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834
6835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6838echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6839if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841else
Martin v. Löwis11437992002-04-12 09:54:03 +00006842
6843cat >>confdefs.h <<_ACEOF
6844#define pid_t int
6845_ACEOF
6846
6847fi
6848
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006849{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6850echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006851if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006852 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006853else
6854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006855/* confdefs.h. */
6856_ACEOF
6857cat confdefs.h >>conftest.$ac_ext
6858cat >>conftest.$ac_ext <<_ACEOF
6859/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006860#include <sys/types.h>
6861#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863int
6864main ()
6865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006872if { (ac_try="$ac_compile"
6873case "(($ac_try" in
6874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6875 *) ac_try_echo=$ac_try;;
6876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006880 grep -v '^ *+' conftest.er1 >conftest.err
6881 rm -f conftest.er1
6882 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884 (exit $ac_status); } && {
6885 test -z "$ac_c_werror_flag" ||
6886 test ! -s conftest.err
6887 } && test -s conftest.$ac_objext; then
6888 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006891sed 's/^/| /' conftest.$ac_ext >&5
6892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006898{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6899echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006902#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904
Michael W. Hudson54241132001-12-07 15:38:26 +00006905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906{ echo "$as_me:$LINENO: checking for size_t" >&5
6907echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006908if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006911 cat >conftest.$ac_ext <<_ACEOF
6912/* confdefs.h. */
6913_ACEOF
6914cat confdefs.h >>conftest.$ac_ext
6915cat >>conftest.$ac_ext <<_ACEOF
6916/* end confdefs.h. */
6917$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006918typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006919int
6920main ()
6921{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006922if ((ac__type_new_ *) 0)
6923 return 0;
6924if (sizeof (ac__type_new_))
6925 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006926 ;
6927 return 0;
6928}
6929_ACEOF
6930rm -f conftest.$ac_objext
6931if { (ac_try="$ac_compile"
6932case "(($ac_try" in
6933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6934 *) ac_try_echo=$ac_try;;
6935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006937 (eval "$ac_compile") 2>conftest.er1
6938 ac_status=$?
6939 grep -v '^ *+' conftest.er1 >conftest.err
6940 rm -f conftest.er1
6941 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006943 (exit $ac_status); } && {
6944 test -z "$ac_c_werror_flag" ||
6945 test ! -s conftest.err
6946 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006950sed 's/^/| /' conftest.$ac_ext >&5
6951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006952 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006954
6955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006957{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6958echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6959if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006961else
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
6963cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006965_ACEOF
6966
6967fi
6968
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006969{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6970echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006971if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006973else
6974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* confdefs.h. */
6976_ACEOF
6977cat confdefs.h >>conftest.$ac_ext
6978cat >>conftest.$ac_ext <<_ACEOF
6979/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
6982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006984 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985 ac_cv_type_uid_t=yes
6986else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987 ac_cv_type_uid_t=no
6988fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006989rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006990
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006992{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6993echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006994if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996cat >>confdefs.h <<\_ACEOF
6997#define uid_t int
6998_ACEOF
6999
7000
7001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007003_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004
7005fi
7006
Mark Dickinsonbd792642009-03-18 20:06:12 +00007007
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007008 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7009echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007010if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007011 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007012else
7013 ac_cv_c_uint32_t=no
7014 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7015 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7016 cat >conftest.$ac_ext <<_ACEOF
7017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
7022$ac_includes_default
7023int
7024main ()
7025{
7026static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7027test_array [0] = 0
7028
7029 ;
7030 return 0;
7031}
7032_ACEOF
7033rm -f conftest.$ac_objext
7034if { (ac_try="$ac_compile"
7035case "(($ac_try" in
7036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7037 *) ac_try_echo=$ac_try;;
7038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007040 (eval "$ac_compile") 2>conftest.er1
7041 ac_status=$?
7042 grep -v '^ *+' conftest.er1 >conftest.err
7043 rm -f conftest.er1
7044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007046 (exit $ac_status); } && {
7047 test -z "$ac_c_werror_flag" ||
7048 test ! -s conftest.err
7049 } && test -s conftest.$ac_objext; then
7050 case $ac_type in
7051 uint32_t) ac_cv_c_uint32_t=yes ;;
7052 *) ac_cv_c_uint32_t=$ac_type ;;
7053esac
7054
7055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007056 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007057sed 's/^/| /' conftest.$ac_ext >&5
7058
7059
7060fi
7061
7062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7063 test "$ac_cv_c_uint32_t" != no && break
7064 done
7065fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007066{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7067echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007068 case $ac_cv_c_uint32_t in #(
7069 no|yes) ;; #(
7070 *)
7071
7072cat >>confdefs.h <<\_ACEOF
7073#define _UINT32_T 1
7074_ACEOF
7075
7076
7077cat >>confdefs.h <<_ACEOF
7078#define uint32_t $ac_cv_c_uint32_t
7079_ACEOF
7080;;
7081 esac
7082
7083
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007084 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7085echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007086if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007087 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088else
7089 ac_cv_c_uint64_t=no
7090 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7091 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7092 cat >conftest.$ac_ext <<_ACEOF
7093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
7098$ac_includes_default
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (ac_try="$ac_compile"
7111case "(($ac_try" in
7112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7113 *) ac_try_echo=$ac_try;;
7114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007116 (eval "$ac_compile") 2>conftest.er1
7117 ac_status=$?
7118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007122 (exit $ac_status); } && {
7123 test -z "$ac_c_werror_flag" ||
7124 test ! -s conftest.err
7125 } && test -s conftest.$ac_objext; then
7126 case $ac_type in
7127 uint64_t) ac_cv_c_uint64_t=yes ;;
7128 *) ac_cv_c_uint64_t=$ac_type ;;
7129esac
7130
7131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007132 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136fi
7137
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139 test "$ac_cv_c_uint64_t" != no && break
7140 done
7141fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007142{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7143echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007144 case $ac_cv_c_uint64_t in #(
7145 no|yes) ;; #(
7146 *)
7147
7148cat >>confdefs.h <<\_ACEOF
7149#define _UINT64_T 1
7150_ACEOF
7151
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uint64_t $ac_cv_c_uint64_t
7155_ACEOF
7156;;
7157 esac
7158
7159
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007160 { echo "$as_me:$LINENO: checking for int32_t" >&5
7161echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007162if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007163 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164else
7165 ac_cv_c_int32_t=no
7166 for ac_type in 'int32_t' 'int' 'long int' \
7167 'long long int' 'short int' 'signed char'; do
7168 cat >conftest.$ac_ext <<_ACEOF
7169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
7174$ac_includes_default
7175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (ac_try="$ac_compile"
7187case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007192 (eval "$ac_compile") 2>conftest.er1
7193 ac_status=$?
7194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007198 (exit $ac_status); } && {
7199 test -z "$ac_c_werror_flag" ||
7200 test ! -s conftest.err
7201 } && test -s conftest.$ac_objext; then
7202 cat >conftest.$ac_ext <<_ACEOF
7203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
7208$ac_includes_default
7209int
7210main ()
7211{
7212static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007213 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
7221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227 (eval "$ac_compile") 2>conftest.er1
7228 ac_status=$?
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
7237 :
7238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007239 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240sed 's/^/| /' conftest.$ac_ext >&5
7241
7242 case $ac_type in
7243 int32_t) ac_cv_c_int32_t=yes ;;
7244 *) ac_cv_c_int32_t=$ac_type ;;
7245esac
7246
7247fi
7248
7249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007251 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007252sed 's/^/| /' conftest.$ac_ext >&5
7253
7254
7255fi
7256
7257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7258 test "$ac_cv_c_int32_t" != no && break
7259 done
7260fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007261{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7262echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263 case $ac_cv_c_int32_t in #(
7264 no|yes) ;; #(
7265 *)
7266
7267cat >>confdefs.h <<_ACEOF
7268#define int32_t $ac_cv_c_int32_t
7269_ACEOF
7270;;
7271 esac
7272
7273
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007274 { echo "$as_me:$LINENO: checking for int64_t" >&5
7275echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007277 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278else
7279 ac_cv_c_int64_t=no
7280 for ac_type in 'int64_t' 'int' 'long int' \
7281 'long long int' 'short int' 'signed char'; do
7282 cat >conftest.$ac_ext <<_ACEOF
7283/* confdefs.h. */
7284_ACEOF
7285cat confdefs.h >>conftest.$ac_ext
7286cat >>conftest.$ac_ext <<_ACEOF
7287/* end confdefs.h. */
7288$ac_includes_default
7289int
7290main ()
7291{
7292static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7293test_array [0] = 0
7294
7295 ;
7296 return 0;
7297}
7298_ACEOF
7299rm -f conftest.$ac_objext
7300if { (ac_try="$ac_compile"
7301case "(($ac_try" in
7302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7303 *) ac_try_echo=$ac_try;;
7304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007306 (eval "$ac_compile") 2>conftest.er1
7307 ac_status=$?
7308 grep -v '^ *+' conftest.er1 >conftest.err
7309 rm -f conftest.er1
7310 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312 (exit $ac_status); } && {
7313 test -z "$ac_c_werror_flag" ||
7314 test ! -s conftest.err
7315 } && test -s conftest.$ac_objext; then
7316 cat >conftest.$ac_ext <<_ACEOF
7317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
7322$ac_includes_default
7323int
7324main ()
7325{
7326static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007327 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007328test_array [0] = 0
7329
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (ac_try="$ac_compile"
7336case "(($ac_try" in
7337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7338 *) ac_try_echo=$ac_try;;
7339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341 (eval "$ac_compile") 2>conftest.er1
7342 ac_status=$?
7343 grep -v '^ *+' conftest.er1 >conftest.err
7344 rm -f conftest.er1
7345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347 (exit $ac_status); } && {
7348 test -z "$ac_c_werror_flag" ||
7349 test ! -s conftest.err
7350 } && test -s conftest.$ac_objext; then
7351 :
7352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007353 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354sed 's/^/| /' conftest.$ac_ext >&5
7355
7356 case $ac_type in
7357 int64_t) ac_cv_c_int64_t=yes ;;
7358 *) ac_cv_c_int64_t=$ac_type ;;
7359esac
7360
7361fi
7362
7363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007365 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007366sed 's/^/| /' conftest.$ac_ext >&5
7367
7368
7369fi
7370
7371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372 test "$ac_cv_c_int64_t" != no && break
7373 done
7374fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007375{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7376echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377 case $ac_cv_c_int64_t in #(
7378 no|yes) ;; #(
7379 *)
7380
7381cat >>confdefs.h <<_ACEOF
7382#define int64_t $ac_cv_c_int64_t
7383_ACEOF
7384;;
7385 esac
7386
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007387{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7388echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007389if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007391else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007392 cat >conftest.$ac_ext <<_ACEOF
7393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
7398$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007399typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007400int
7401main ()
7402{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007403if ((ac__type_new_ *) 0)
7404 return 0;
7405if (sizeof (ac__type_new_))
7406 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007418 (eval "$ac_compile") 2>conftest.er1
7419 ac_status=$?
7420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007428 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007430 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007433 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007435
7436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007438{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7439echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7440if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007441
7442cat >>confdefs.h <<\_ACEOF
7443#define HAVE_SSIZE_T 1
7444_ACEOF
7445
7446fi
7447
Jack Jansendd19cf82001-12-06 22:36:17 +00007448
Michael W. Hudson54241132001-12-07 15:38:26 +00007449# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007450# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007451{ echo "$as_me:$LINENO: checking for int" >&5
7452echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7453if test "${ac_cv_type_int+set}" = set; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
7455else
7456 cat >conftest.$ac_ext <<_ACEOF
7457/* confdefs.h. */
7458_ACEOF
7459cat confdefs.h >>conftest.$ac_ext
7460cat >>conftest.$ac_ext <<_ACEOF
7461/* end confdefs.h. */
7462$ac_includes_default
7463typedef int ac__type_new_;
7464int
7465main ()
7466{
7467if ((ac__type_new_ *) 0)
7468 return 0;
7469if (sizeof (ac__type_new_))
7470 return 0;
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
7476if { (ac_try="$ac_compile"
7477case "(($ac_try" in
7478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7479 *) ac_try_echo=$ac_try;;
7480esac
7481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7482 (eval "$ac_compile") 2>conftest.er1
7483 ac_status=$?
7484 grep -v '^ *+' conftest.er1 >conftest.err
7485 rm -f conftest.er1
7486 cat conftest.err >&5
7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488 (exit $ac_status); } && {
7489 test -z "$ac_c_werror_flag" ||
7490 test ! -s conftest.err
7491 } && test -s conftest.$ac_objext; then
7492 ac_cv_type_int=yes
7493else
7494 echo "$as_me: failed program was:" >&5
7495sed 's/^/| /' conftest.$ac_ext >&5
7496
7497 ac_cv_type_int=no
7498fi
7499
7500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7501fi
7502{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7503echo "${ECHO_T}$ac_cv_type_int" >&6; }
7504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007505# The cast to long int works around a bug in the HP C Compiler
7506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007509{ echo "$as_me:$LINENO: checking size of int" >&5
7510echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007511if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007523 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_lo=0 ac_mid=0
7552 while :; do
7553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* confdefs.h. */
7555_ACEOF
7556cat confdefs.h >>conftest.$ac_ext
7557cat >>conftest.$ac_ext <<_ACEOF
7558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007559$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007560 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561int
7562main ()
7563{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007565test_array [0] = 0
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572if { (ac_try="$ac_compile"
7573case "(($ac_try" in
7574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575 *) ac_try_echo=$ac_try;;
7576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584 (exit $ac_status); } && {
7585 test -z "$ac_c_werror_flag" ||
7586 test ! -s conftest.err
7587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_hi=$ac_mid; break
7589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007591sed 's/^/| /' conftest.$ac_ext >&5
7592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 ac_lo=`expr $ac_mid + 1`
7594 if test $ac_lo -le $ac_mid; then
7595 ac_lo= ac_hi=
7596 break
7597 fi
7598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 done
7603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007605sed 's/^/| /' conftest.$ac_ext >&5
7606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007613$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007614 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007615int
7616main ()
7617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007619test_array [0] = 0
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_hi=-1 ac_mid=-1
7643 while :; do
7644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007651 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007656test_array [0] = 0
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_lo=$ac_mid; break
7680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 ac_hi=`expr '(' $ac_mid ')' - 1`
7685 if test $ac_mid -le $ac_hi; then
7686 ac_lo= ac_hi=
7687 break
7688 fi
7689 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 done
7694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007696sed 's/^/| /' conftest.$ac_ext >&5
7697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700
7701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703
7704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007705# Binary search between lo and hi bounds.
7706while test "x$ac_lo" != "x$ac_hi"; do
7707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007709/* confdefs.h. */
7710_ACEOF
7711cat confdefs.h >>conftest.$ac_ext
7712cat >>conftest.$ac_ext <<_ACEOF
7713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007715 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
7718{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007720test_array [0] = 0
7721
7722 ;
7723 return 0;
7724}
7725_ACEOF
7726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727if { (ac_try="$ac_compile"
7728case "(($ac_try" in
7729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7730 *) ac_try_echo=$ac_try;;
7731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007735 grep -v '^ *+' conftest.er1 >conftest.err
7736 rm -f conftest.er1
7737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739 (exit $ac_status); } && {
7740 test -z "$ac_c_werror_flag" ||
7741 test ! -s conftest.err
7742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_hi=$ac_mid
7744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007746sed 's/^/| /' conftest.$ac_ext >&5
7747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750
7751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752done
7753case $ac_lo in
7754?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007756 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007757See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 else
7762 ac_cv_sizeof_int=0
7763 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007764esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765else
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* confdefs.h. */
7768_ACEOF
7769cat confdefs.h >>conftest.$ac_ext
7770cat >>conftest.$ac_ext <<_ACEOF
7771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007773 typedef int ac__type_sizeof_;
7774static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7775static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007776#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780{
Martin v. Löwis11437992002-04-12 09:54:03 +00007781
7782 FILE *f = fopen ("conftest.val", "w");
7783 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007785 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 }
7792 else
7793 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007795 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007797 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
7801 ;
7802 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803}
Martin v. Löwis11437992002-04-12 09:54:03 +00007804_ACEOF
7805rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806if { (ac_try="$ac_link"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 { (case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 (exit $ac_status); }; }; then
7825 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827 echo "$as_me: program exited with status $ac_status" >&5
7828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007829sed 's/^/| /' conftest.$ac_ext >&5
7830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 else
7839 ac_cv_sizeof_int=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842rm -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 +00007843fi
7844rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7847echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848
7849
7850
Martin v. Löwis11437992002-04-12 09:54:03 +00007851cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854
7855
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856{ echo "$as_me:$LINENO: checking for long" >&5
7857echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7858if test "${ac_cv_type_long+set}" = set; then
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
7860else
7861 cat >conftest.$ac_ext <<_ACEOF
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
7867$ac_includes_default
7868typedef long ac__type_new_;
7869int
7870main ()
7871{
7872if ((ac__type_new_ *) 0)
7873 return 0;
7874if (sizeof (ac__type_new_))
7875 return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
7881if { (ac_try="$ac_compile"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
7886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7887 (eval "$ac_compile") 2>conftest.er1
7888 ac_status=$?
7889 grep -v '^ *+' conftest.er1 >conftest.err
7890 rm -f conftest.er1
7891 cat conftest.err >&5
7892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893 (exit $ac_status); } && {
7894 test -z "$ac_c_werror_flag" ||
7895 test ! -s conftest.err
7896 } && test -s conftest.$ac_objext; then
7897 ac_cv_type_long=yes
7898else
7899 echo "$as_me: failed program was:" >&5
7900sed 's/^/| /' conftest.$ac_ext >&5
7901
7902 ac_cv_type_long=no
7903fi
7904
7905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7906fi
7907{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7908echo "${ECHO_T}$ac_cv_type_long" >&6; }
7909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007914{ echo "$as_me:$LINENO: checking size of long" >&5
7915echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007916if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 if test "$cross_compiling" = yes; then
7920 # Depending upon the size, compute the lo and hi bounds.
7921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007928 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007929int
7930main ()
7931{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007933test_array [0] = 0
7934
7935 ;
7936 return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940if { (ac_try="$ac_compile"
7941case "(($ac_try" in
7942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7943 *) ac_try_echo=$ac_try;;
7944esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 (exit $ac_status); } && {
7953 test -z "$ac_c_werror_flag" ||
7954 test ! -s conftest.err
7955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_lo=0 ac_mid=0
7957 while :; do
7958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007965 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007970test_array [0] = 0
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977if { (ac_try="$ac_compile"
7978case "(($ac_try" in
7979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7980 *) ac_try_echo=$ac_try;;
7981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985 grep -v '^ *+' conftest.er1 >conftest.err
7986 rm -f conftest.er1
7987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989 (exit $ac_status); } && {
7990 test -z "$ac_c_werror_flag" ||
7991 test ! -s conftest.err
7992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_hi=$ac_mid; break
7994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 ac_lo=`expr $ac_mid + 1`
7999 if test $ac_lo -le $ac_mid; then
8000 ac_lo= ac_hi=
8001 break
8002 fi
8003 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005
8006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 done
8008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008010sed 's/^/| /' conftest.$ac_ext >&5
8011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008019 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031if { (ac_try="$ac_compile"
8032case "(($ac_try" in
8033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8034 *) ac_try_echo=$ac_try;;
8035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008039 grep -v '^ *+' conftest.er1 >conftest.err
8040 rm -f conftest.er1
8041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043 (exit $ac_status); } && {
8044 test -z "$ac_c_werror_flag" ||
8045 test ! -s conftest.err
8046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_hi=-1 ac_mid=-1
8048 while :; do
8049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008056 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008057int
8058main ()
8059{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008061test_array [0] = 0
8062
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068if { (ac_try="$ac_compile"
8069case "(($ac_try" in
8070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071 *) ac_try_echo=$ac_try;;
8072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080 (exit $ac_status); } && {
8081 test -z "$ac_c_werror_flag" ||
8082 test ! -s conftest.err
8083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_lo=$ac_mid; break
8085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 ac_hi=`expr '(' $ac_mid ')' - 1`
8090 if test $ac_mid -le $ac_hi; then
8091 ac_lo= ac_hi=
8092 break
8093 fi
8094 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096
8097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 done
8099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008101sed 's/^/| /' conftest.$ac_ext >&5
8102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105
8106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110# Binary search between lo and hi bounds.
8111while test "x$ac_lo" != "x$ac_hi"; do
8112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* confdefs.h. */
8115_ACEOF
8116cat confdefs.h >>conftest.$ac_ext
8117cat >>conftest.$ac_ext <<_ACEOF
8118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008120 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132if { (ac_try="$ac_compile"
8133case "(($ac_try" in
8134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8135 *) ac_try_echo=$ac_try;;
8136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008140 grep -v '^ *+' conftest.er1 >conftest.err
8141 rm -f conftest.er1
8142 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 (exit $ac_status); } && {
8145 test -z "$ac_c_werror_flag" ||
8146 test ! -s conftest.err
8147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_hi=$ac_mid
8149else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008151sed 's/^/| /' conftest.$ac_ext >&5
8152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155
8156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008157done
8158case $ac_lo in
8159?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008162See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 else
8167 ac_cv_sizeof_long=0
8168 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008169esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008178 typedef long ac__type_sizeof_;
8179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008181#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008182#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008185{
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187 FILE *f = fopen ("conftest.val", "w");
8188 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 }
8197 else
8198 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008202 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206 ;
8207 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208}
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211if { (ac_try="$ac_link"
8212case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 { (case "(($ac_try" in
8222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8223 *) ac_try_echo=$ac_try;;
8224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 (exit $ac_status); }; }; then
8230 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232 echo "$as_me: program exited with status $ac_status" >&5
8233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008234sed 's/^/| /' conftest.$ac_ext >&5
8235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 else
8244 ac_cv_sizeof_long=0
8245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247rm -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 +00008248fi
8249rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008250fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8252echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253
8254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008257#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259
8260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261{ echo "$as_me:$LINENO: checking for void *" >&5
8262echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8263if test "${ac_cv_type_void_p+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8265else
8266 cat >conftest.$ac_ext <<_ACEOF
8267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
8272$ac_includes_default
8273typedef void * ac__type_new_;
8274int
8275main ()
8276{
8277if ((ac__type_new_ *) 0)
8278 return 0;
8279if (sizeof (ac__type_new_))
8280 return 0;
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285rm -f conftest.$ac_objext
8286if { (ac_try="$ac_compile"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
8291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8292 (eval "$ac_compile") 2>conftest.er1
8293 ac_status=$?
8294 grep -v '^ *+' conftest.er1 >conftest.err
8295 rm -f conftest.er1
8296 cat conftest.err >&5
8297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8298 (exit $ac_status); } && {
8299 test -z "$ac_c_werror_flag" ||
8300 test ! -s conftest.err
8301 } && test -s conftest.$ac_objext; then
8302 ac_cv_type_void_p=yes
8303else
8304 echo "$as_me: failed program was:" >&5
8305sed 's/^/| /' conftest.$ac_ext >&5
8306
8307 ac_cv_type_void_p=no
8308fi
8309
8310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8311fi
8312{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8313echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315# The cast to long int works around a bug in the HP C Compiler
8316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008319{ echo "$as_me:$LINENO: checking size of void *" >&5
8320echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008322 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 if test "$cross_compiling" = yes; then
8325 # Depending upon the size, compute the lo and hi bounds.
8326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008332$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008333 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334int
8335main ()
8336{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008338test_array [0] = 0
8339
8340 ;
8341 return 0;
8342}
8343_ACEOF
8344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345if { (ac_try="$ac_compile"
8346case "(($ac_try" in
8347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8348 *) ac_try_echo=$ac_try;;
8349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008353 grep -v '^ *+' conftest.er1 >conftest.err
8354 rm -f conftest.er1
8355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357 (exit $ac_status); } && {
8358 test -z "$ac_c_werror_flag" ||
8359 test ! -s conftest.err
8360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_lo=0 ac_mid=0
8362 while :; do
8363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008369$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008370 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008371int
8372main ()
8373{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382if { (ac_try="$ac_compile"
8383case "(($ac_try" in
8384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8385 *) ac_try_echo=$ac_try;;
8386esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 (exit $ac_status); } && {
8395 test -z "$ac_c_werror_flag" ||
8396 test ! -s conftest.err
8397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_hi=$ac_mid; break
8399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008401sed 's/^/| /' conftest.$ac_ext >&5
8402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 ac_lo=`expr $ac_mid + 1`
8404 if test $ac_lo -le $ac_mid; then
8405 ac_lo= ac_hi=
8406 break
8407 fi
8408 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410
8411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 done
8413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008415sed 's/^/| /' conftest.$ac_ext >&5
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008424 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008425int
8426main ()
8427{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008429test_array [0] = 0
8430
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436if { (ac_try="$ac_compile"
8437case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 grep -v '^ *+' conftest.er1 >conftest.err
8445 rm -f conftest.er1
8446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 (exit $ac_status); } && {
8449 test -z "$ac_c_werror_flag" ||
8450 test ! -s conftest.err
8451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_hi=-1 ac_mid=-1
8453 while :; do
8454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008461 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473if { (ac_try="$ac_compile"
8474case "(($ac_try" in
8475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8476 *) ac_try_echo=$ac_try;;
8477esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008481 grep -v '^ *+' conftest.er1 >conftest.err
8482 rm -f conftest.er1
8483 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 (exit $ac_status); } && {
8486 test -z "$ac_c_werror_flag" ||
8487 test ! -s conftest.err
8488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_lo=$ac_mid; break
8490else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 ac_hi=`expr '(' $ac_mid ')' - 1`
8495 if test $ac_mid -le $ac_hi; then
8496 ac_lo= ac_hi=
8497 break
8498 fi
8499 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501
8502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 done
8504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008515# Binary search between lo and hi bounds.
8516while test "x$ac_lo" != "x$ac_hi"; do
8517 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008525 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008530test_array [0] = 0
8531
8532 ;
8533 return 0;
8534}
8535_ACEOF
8536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537if { (ac_try="$ac_compile"
8538case "(($ac_try" in
8539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8540 *) ac_try_echo=$ac_try;;
8541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008545 grep -v '^ *+' conftest.er1 >conftest.err
8546 rm -f conftest.er1
8547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 (exit $ac_status); } && {
8550 test -z "$ac_c_werror_flag" ||
8551 test ! -s conftest.err
8552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_hi=$ac_mid
8554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560
8561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008566 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008567See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 else
8572 ac_cv_sizeof_void_p=0
8573 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008574esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008577/* confdefs.h. */
8578_ACEOF
8579cat confdefs.h >>conftest.$ac_ext
8580cat >>conftest.$ac_ext <<_ACEOF
8581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008583 typedef void * ac__type_sizeof_;
8584static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8585static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008590{
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
8592 FILE *f = fopen ("conftest.val", "w");
8593 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008595 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008598 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 }
8602 else
8603 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008605 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008607 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611 ;
8612 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008613}
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
8615rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616if { (ac_try="$ac_link"
8617case "(($ac_try" in
8618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8619 *) ac_try_echo=$ac_try;;
8620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 { (case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 (exit $ac_status); }; }; then
8635 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637 echo "$as_me: program exited with status $ac_status" >&5
8638echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008639sed 's/^/| /' conftest.$ac_ext >&5
8640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 else
8649 ac_cv_sizeof_void_p=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652rm -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 +00008653fi
8654rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008655fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8657echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008662#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008664
8665
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666{ echo "$as_me:$LINENO: checking for short" >&5
8667echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8668if test "${ac_cv_type_short+set}" = set; then
8669 echo $ECHO_N "(cached) $ECHO_C" >&6
8670else
8671 cat >conftest.$ac_ext <<_ACEOF
8672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
8677$ac_includes_default
8678typedef short ac__type_new_;
8679int
8680main ()
8681{
8682if ((ac__type_new_ *) 0)
8683 return 0;
8684if (sizeof (ac__type_new_))
8685 return 0;
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
8691if { (ac_try="$ac_compile"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
8696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8697 (eval "$ac_compile") 2>conftest.er1
8698 ac_status=$?
8699 grep -v '^ *+' conftest.er1 >conftest.err
8700 rm -f conftest.er1
8701 cat conftest.err >&5
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); } && {
8704 test -z "$ac_c_werror_flag" ||
8705 test ! -s conftest.err
8706 } && test -s conftest.$ac_objext; then
8707 ac_cv_type_short=yes
8708else
8709 echo "$as_me: failed program was:" >&5
8710sed 's/^/| /' conftest.$ac_ext >&5
8711
8712 ac_cv_type_short=no
8713fi
8714
8715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8716fi
8717{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8718echo "${ECHO_T}$ac_cv_type_short" >&6; }
8719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008724{ echo "$as_me:$LINENO: checking size of short" >&5
8725echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008726if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 if test "$cross_compiling" = yes; then
8730 # Depending upon the size, compute the lo and hi bounds.
8731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008738 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739int
8740main ()
8741{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008743test_array [0] = 0
8744
8745 ;
8746 return 0;
8747}
8748_ACEOF
8749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750if { (ac_try="$ac_compile"
8751case "(($ac_try" in
8752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8753 *) ac_try_echo=$ac_try;;
8754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008758 grep -v '^ *+' conftest.er1 >conftest.err
8759 rm -f conftest.er1
8760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762 (exit $ac_status); } && {
8763 test -z "$ac_c_werror_flag" ||
8764 test ! -s conftest.err
8765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_lo=0 ac_mid=0
8767 while :; do
8768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* confdefs.h. */
8770_ACEOF
8771cat confdefs.h >>conftest.$ac_ext
8772cat >>conftest.$ac_ext <<_ACEOF
8773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008775 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008776int
8777main ()
8778{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008780test_array [0] = 0
8781
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787if { (ac_try="$ac_compile"
8788case "(($ac_try" in
8789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8790 *) ac_try_echo=$ac_try;;
8791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 grep -v '^ *+' conftest.er1 >conftest.err
8796 rm -f conftest.er1
8797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799 (exit $ac_status); } && {
8800 test -z "$ac_c_werror_flag" ||
8801 test ! -s conftest.err
8802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_hi=$ac_mid; break
8804else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808 ac_lo=`expr $ac_mid + 1`
8809 if test $ac_lo -le $ac_mid; then
8810 ac_lo= ac_hi=
8811 break
8812 fi
8813 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 done
8818else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008820sed 's/^/| /' conftest.$ac_ext >&5
8821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008829 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841if { (ac_try="$ac_compile"
8842case "(($ac_try" in
8843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8844 *) ac_try_echo=$ac_try;;
8845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 grep -v '^ *+' conftest.er1 >conftest.err
8850 rm -f conftest.er1
8851 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 (exit $ac_status); } && {
8854 test -z "$ac_c_werror_flag" ||
8855 test ! -s conftest.err
8856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_hi=-1 ac_mid=-1
8858 while :; do
8859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008866 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008871test_array [0] = 0
8872
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_lo=$ac_mid; break
8895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 ac_hi=`expr '(' $ac_mid ')' - 1`
8900 if test $ac_mid -le $ac_hi; then
8901 ac_lo= ac_hi=
8902 break
8903 fi
8904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008906
8907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 done
8909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008911sed 's/^/| /' conftest.$ac_ext >&5
8912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918
8919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008920# Binary search between lo and hi bounds.
8921while test "x$ac_lo" != "x$ac_hi"; do
8922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* confdefs.h. */
8925_ACEOF
8926cat confdefs.h >>conftest.$ac_ext
8927cat >>conftest.$ac_ext <<_ACEOF
8928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008930 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942if { (ac_try="$ac_compile"
8943case "(($ac_try" in
8944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8945 *) ac_try_echo=$ac_try;;
8946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008950 grep -v '^ *+' conftest.er1 >conftest.err
8951 rm -f conftest.er1
8952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954 (exit $ac_status); } && {
8955 test -z "$ac_c_werror_flag" ||
8956 test ! -s conftest.err
8957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_hi=$ac_mid
8959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008961sed 's/^/| /' conftest.$ac_ext >&5
8962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965
8966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008967done
8968case $ac_lo in
8969?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008972See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 else
8977 ac_cv_sizeof_short=0
8978 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* confdefs.h. */
8983_ACEOF
8984cat confdefs.h >>conftest.$ac_ext
8985cat >>conftest.$ac_ext <<_ACEOF
8986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008987$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008988 typedef short ac__type_sizeof_;
8989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008992#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008995{
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
8997 FILE *f = fopen ("conftest.val", "w");
8998 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 }
9007 else
9008 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009012 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
9016 ;
9017 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018}
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
9020rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021if { (ac_try="$ac_link"
9022case "(($ac_try" in
9023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9024 *) ac_try_echo=$ac_try;;
9025esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 { (case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009044sed 's/^/| /' conftest.$ac_ext >&5
9045
Martin v. Löwis11437992002-04-12 09:54:03 +00009046( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053 else
9054 ac_cv_sizeof_short=0
9055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057rm -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 +00009058fi
9059rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9062echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009063
9064
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009067#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069
9070
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071{ echo "$as_me:$LINENO: checking for float" >&5
9072echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9073if test "${ac_cv_type_float+set}" = set; then
9074 echo $ECHO_N "(cached) $ECHO_C" >&6
9075else
9076 cat >conftest.$ac_ext <<_ACEOF
9077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
9082$ac_includes_default
9083typedef float ac__type_new_;
9084int
9085main ()
9086{
9087if ((ac__type_new_ *) 0)
9088 return 0;
9089if (sizeof (ac__type_new_))
9090 return 0;
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
9096if { (ac_try="$ac_compile"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
9101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9102 (eval "$ac_compile") 2>conftest.er1
9103 ac_status=$?
9104 grep -v '^ *+' conftest.er1 >conftest.err
9105 rm -f conftest.er1
9106 cat conftest.err >&5
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); } && {
9109 test -z "$ac_c_werror_flag" ||
9110 test ! -s conftest.err
9111 } && test -s conftest.$ac_objext; then
9112 ac_cv_type_float=yes
9113else
9114 echo "$as_me: failed program was:" >&5
9115sed 's/^/| /' conftest.$ac_ext >&5
9116
9117 ac_cv_type_float=no
9118fi
9119
9120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9121fi
9122{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9123echo "${ECHO_T}$ac_cv_type_float" >&6; }
9124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009129{ echo "$as_me:$LINENO: checking size of float" >&5
9130echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009131if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 if test "$cross_compiling" = yes; then
9135 # Depending upon the size, compute the lo and hi bounds.
9136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009143 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144int
9145main ()
9146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009148test_array [0] = 0
9149
9150 ;
9151 return 0;
9152}
9153_ACEOF
9154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155if { (ac_try="$ac_compile"
9156case "(($ac_try" in
9157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9158 *) ac_try_echo=$ac_try;;
9159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009163 grep -v '^ *+' conftest.er1 >conftest.err
9164 rm -f conftest.er1
9165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167 (exit $ac_status); } && {
9168 test -z "$ac_c_werror_flag" ||
9169 test ! -s conftest.err
9170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_lo=0 ac_mid=0
9172 while :; do
9173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009179$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009180 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009181int
9182main ()
9183{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009185test_array [0] = 0
9186
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192if { (ac_try="$ac_compile"
9193case "(($ac_try" in
9194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9195 *) ac_try_echo=$ac_try;;
9196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009200 grep -v '^ *+' conftest.er1 >conftest.err
9201 rm -f conftest.er1
9202 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204 (exit $ac_status); } && {
9205 test -z "$ac_c_werror_flag" ||
9206 test ! -s conftest.err
9207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_hi=$ac_mid; break
9209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009211sed 's/^/| /' conftest.$ac_ext >&5
9212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 ac_lo=`expr $ac_mid + 1`
9214 if test $ac_lo -le $ac_mid; then
9215 ac_lo= ac_hi=
9216 break
9217 fi
9218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 done
9223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* confdefs.h. */
9229_ACEOF
9230cat confdefs.h >>conftest.$ac_ext
9231cat >>conftest.$ac_ext <<_ACEOF
9232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009234 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246if { (ac_try="$ac_compile"
9247case "(($ac_try" in
9248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9249 *) ac_try_echo=$ac_try;;
9250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 (exit $ac_status); } && {
9259 test -z "$ac_c_werror_flag" ||
9260 test ! -s conftest.err
9261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_hi=-1 ac_mid=-1
9263 while :; do
9264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009270$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009271 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009276test_array [0] = 0
9277
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009295 (exit $ac_status); } && {
9296 test -z "$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_lo=$ac_mid; break
9300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304 ac_hi=`expr '(' $ac_mid ')' - 1`
9305 if test $ac_mid -le $ac_hi; then
9306 ac_lo= ac_hi=
9307 break
9308 fi
9309 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009311
9312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 done
9314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009316sed 's/^/| /' conftest.$ac_ext >&5
9317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320
9321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323
9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009325# Binary search between lo and hi bounds.
9326while test "x$ac_lo" != "x$ac_hi"; do
9327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* confdefs.h. */
9330_ACEOF
9331cat confdefs.h >>conftest.$ac_ext
9332cat >>conftest.$ac_ext <<_ACEOF
9333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009334$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009335 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009340test_array [0] = 0
9341
9342 ;
9343 return 0;
9344}
9345_ACEOF
9346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347if { (ac_try="$ac_compile"
9348case "(($ac_try" in
9349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9350 *) ac_try_echo=$ac_try;;
9351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355 grep -v '^ *+' conftest.er1 >conftest.err
9356 rm -f conftest.er1
9357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359 (exit $ac_status); } && {
9360 test -z "$ac_c_werror_flag" ||
9361 test ! -s conftest.err
9362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_hi=$ac_mid
9364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009366sed 's/^/| /' conftest.$ac_ext >&5
9367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370
9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372done
9373case $ac_lo in
9374?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009376 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009377See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 else
9382 ac_cv_sizeof_float=0
9383 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009393 typedef float ac__type_sizeof_;
9394static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9395static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009396#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009400{
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
9402 FILE *f = fopen ("conftest.val", "w");
9403 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009405 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009408 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 }
9412 else
9413 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009415 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009417 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
9421 ;
9422 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423}
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
9425rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426if { (ac_try="$ac_link"
9427case "(($ac_try" in
9428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9429 *) ac_try_echo=$ac_try;;
9430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436 { (case "(($ac_try" in
9437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9438 *) ac_try_echo=$ac_try;;
9439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 (exit $ac_status); }; }; then
9445 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447 echo "$as_me: program exited with status $ac_status" >&5
9448echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009449sed 's/^/| /' conftest.$ac_ext >&5
9450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458 else
9459 ac_cv_sizeof_float=0
9460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462rm -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 +00009463fi
9464rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009465fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9467echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468
9469
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009472#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009473_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474
9475
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476{ echo "$as_me:$LINENO: checking for double" >&5
9477echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9478if test "${ac_cv_type_double+set}" = set; then
9479 echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481 cat >conftest.$ac_ext <<_ACEOF
9482/* confdefs.h. */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h. */
9487$ac_includes_default
9488typedef double ac__type_new_;
9489int
9490main ()
9491{
9492if ((ac__type_new_ *) 0)
9493 return 0;
9494if (sizeof (ac__type_new_))
9495 return 0;
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext
9501if { (ac_try="$ac_compile"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
9506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9507 (eval "$ac_compile") 2>conftest.er1
9508 ac_status=$?
9509 grep -v '^ *+' conftest.er1 >conftest.err
9510 rm -f conftest.er1
9511 cat conftest.err >&5
9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9513 (exit $ac_status); } && {
9514 test -z "$ac_c_werror_flag" ||
9515 test ! -s conftest.err
9516 } && test -s conftest.$ac_objext; then
9517 ac_cv_type_double=yes
9518else
9519 echo "$as_me: failed program was:" >&5
9520sed 's/^/| /' conftest.$ac_ext >&5
9521
9522 ac_cv_type_double=no
9523fi
9524
9525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526fi
9527{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9528echo "${ECHO_T}$ac_cv_type_double" >&6; }
9529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530# The cast to long int works around a bug in the HP C Compiler
9531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9533# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009534{ echo "$as_me:$LINENO: checking size of double" >&5
9535echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009536if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 if test "$cross_compiling" = yes; then
9540 # Depending upon the size, compute the lo and hi bounds.
9541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009548 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009553test_array [0] = 0
9554
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560if { (ac_try="$ac_compile"
9561case "(($ac_try" in
9562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563 *) ac_try_echo=$ac_try;;
9564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572 (exit $ac_status); } && {
9573 test -z "$ac_c_werror_flag" ||
9574 test ! -s conftest.err
9575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_lo=0 ac_mid=0
9577 while :; do
9578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009585 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009586int
9587main ()
9588{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009590test_array [0] = 0
9591
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597if { (ac_try="$ac_compile"
9598case "(($ac_try" in
9599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9600 *) ac_try_echo=$ac_try;;
9601esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609 (exit $ac_status); } && {
9610 test -z "$ac_c_werror_flag" ||
9611 test ! -s conftest.err
9612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_hi=$ac_mid; break
9614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 ac_lo=`expr $ac_mid + 1`
9619 if test $ac_lo -le $ac_mid; then
9620 ac_lo= ac_hi=
9621 break
9622 fi
9623 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 done
9628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009630sed 's/^/| /' conftest.$ac_ext >&5
9631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* confdefs.h. */
9634_ACEOF
9635cat confdefs.h >>conftest.$ac_ext
9636cat >>conftest.$ac_ext <<_ACEOF
9637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009639 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009644test_array [0] = 0
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651if { (ac_try="$ac_compile"
9652case "(($ac_try" in
9653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654 *) ac_try_echo=$ac_try;;
9655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663 (exit $ac_status); } && {
9664 test -z "$ac_c_werror_flag" ||
9665 test ! -s conftest.err
9666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_hi=-1 ac_mid=-1
9668 while :; do
9669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009676 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009681test_array [0] = 0
9682
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688if { (ac_try="$ac_compile"
9689case "(($ac_try" in
9690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9691 *) ac_try_echo=$ac_try;;
9692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 grep -v '^ *+' conftest.er1 >conftest.err
9697 rm -f conftest.er1
9698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700 (exit $ac_status); } && {
9701 test -z "$ac_c_werror_flag" ||
9702 test ! -s conftest.err
9703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_lo=$ac_mid; break
9705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709 ac_hi=`expr '(' $ac_mid ')' - 1`
9710 if test $ac_mid -le $ac_hi; then
9711 ac_lo= ac_hi=
9712 break
9713 fi
9714 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716
9717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 done
9719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009721sed 's/^/| /' conftest.$ac_ext >&5
9722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728
9729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730# Binary search between lo and hi bounds.
9731while test "x$ac_lo" != "x$ac_hi"; do
9732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* confdefs.h. */
9735_ACEOF
9736cat confdefs.h >>conftest.$ac_ext
9737cat >>conftest.$ac_ext <<_ACEOF
9738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009740 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009741int
9742main ()
9743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009745test_array [0] = 0
9746
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752if { (ac_try="$ac_compile"
9753case "(($ac_try" in
9754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9755 *) ac_try_echo=$ac_try;;
9756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 grep -v '^ *+' conftest.er1 >conftest.err
9761 rm -f conftest.er1
9762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764 (exit $ac_status); } && {
9765 test -z "$ac_c_werror_flag" ||
9766 test ! -s conftest.err
9767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_hi=$ac_mid
9769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009771sed 's/^/| /' conftest.$ac_ext >&5
9772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775
9776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009777done
9778case $ac_lo in
9779?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009781 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009782See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 else
9787 ac_cv_sizeof_double=0
9788 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* confdefs.h. */
9793_ACEOF
9794cat confdefs.h >>conftest.$ac_ext
9795cat >>conftest.$ac_ext <<_ACEOF
9796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009798 typedef double ac__type_sizeof_;
9799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009805{
Martin v. Löwis11437992002-04-12 09:54:03 +00009806
9807 FILE *f = fopen ("conftest.val", "w");
9808 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 }
9817 else
9818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009822 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
9826 ;
9827 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009828}
Martin v. Löwis11437992002-04-12 09:54:03 +00009829_ACEOF
9830rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831if { (ac_try="$ac_link"
9832case "(($ac_try" in
9833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834 *) ac_try_echo=$ac_try;;
9835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841 { (case "(($ac_try" in
9842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843 *) ac_try_echo=$ac_try;;
9844esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 (exit $ac_status); }; }; then
9850 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852 echo "$as_me: program exited with status $ac_status" >&5
9853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis11437992002-04-12 09:54:03 +00009856( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863 else
9864 ac_cv_sizeof_double=0
9865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867rm -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 +00009868fi
9869rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9872echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873
9874
9875
Martin v. Löwis11437992002-04-12 09:54:03 +00009876cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009877#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009878_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879
9880
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9882echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9883if test "${ac_cv_type_fpos_t+set}" = set; then
9884 echo $ECHO_N "(cached) $ECHO_C" >&6
9885else
9886 cat >conftest.$ac_ext <<_ACEOF
9887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
9892$ac_includes_default
9893typedef fpos_t ac__type_new_;
9894int
9895main ()
9896{
9897if ((ac__type_new_ *) 0)
9898 return 0;
9899if (sizeof (ac__type_new_))
9900 return 0;
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext
9906if { (ac_try="$ac_compile"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
9911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9912 (eval "$ac_compile") 2>conftest.er1
9913 ac_status=$?
9914 grep -v '^ *+' conftest.er1 >conftest.err
9915 rm -f conftest.er1
9916 cat conftest.err >&5
9917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9918 (exit $ac_status); } && {
9919 test -z "$ac_c_werror_flag" ||
9920 test ! -s conftest.err
9921 } && test -s conftest.$ac_objext; then
9922 ac_cv_type_fpos_t=yes
9923else
9924 echo "$as_me: failed program was:" >&5
9925sed 's/^/| /' conftest.$ac_ext >&5
9926
9927 ac_cv_type_fpos_t=no
9928fi
9929
9930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931fi
9932{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9933echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935# The cast to long int works around a bug in the HP C Compiler
9936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9938# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009939{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9940echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009941if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 if test "$cross_compiling" = yes; then
9945 # Depending upon the size, compute the lo and hi bounds.
9946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009952$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009953 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009954int
9955main ()
9956{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009958test_array [0] = 0
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965if { (ac_try="$ac_compile"
9966case "(($ac_try" in
9967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9968 *) ac_try_echo=$ac_try;;
9969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009973 grep -v '^ *+' conftest.er1 >conftest.err
9974 rm -f conftest.er1
9975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 (exit $ac_status); } && {
9978 test -z "$ac_c_werror_flag" ||
9979 test ! -s conftest.err
9980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_lo=0 ac_mid=0
9982 while :; do
9983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009990 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009991int
9992main ()
9993{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_hi=$ac_mid; break
10019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 ac_lo=`expr $ac_mid + 1`
10024 if test $ac_lo -le $ac_mid; then
10025 ac_lo= ac_hi=
10026 break
10027 fi
10028 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 done
10033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010035sed 's/^/| /' conftest.$ac_ext >&5
10036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010044 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068 (exit $ac_status); } && {
10069 test -z "$ac_c_werror_flag" ||
10070 test ! -s conftest.err
10071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_hi=-1 ac_mid=-1
10073 while :; do
10074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010081 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010082int
10083main ()
10084{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010086test_array [0] = 0
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093if { (ac_try="$ac_compile"
10094case "(($ac_try" in
10095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10096 *) ac_try_echo=$ac_try;;
10097esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_lo=$ac_mid; break
10110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010112sed 's/^/| /' conftest.$ac_ext >&5
10113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114 ac_hi=`expr '(' $ac_mid ')' - 1`
10115 if test $ac_mid -le $ac_hi; then
10116 ac_lo= ac_hi=
10117 break
10118 fi
10119 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121
10122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 done
10124else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010126sed 's/^/| /' conftest.$ac_ext >&5
10127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133
10134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010135# Binary search between lo and hi bounds.
10136while test "x$ac_lo" != "x$ac_hi"; do
10137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* confdefs.h. */
10140_ACEOF
10141cat confdefs.h >>conftest.$ac_ext
10142cat >>conftest.$ac_ext <<_ACEOF
10143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010145 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010146int
10147main ()
10148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010150test_array [0] = 0
10151
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157if { (ac_try="$ac_compile"
10158case "(($ac_try" in
10159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160 *) ac_try_echo=$ac_try;;
10161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010165 grep -v '^ *+' conftest.er1 >conftest.err
10166 rm -f conftest.er1
10167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169 (exit $ac_status); } && {
10170 test -z "$ac_c_werror_flag" ||
10171 test ! -s conftest.err
10172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_hi=$ac_mid
10174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010176sed 's/^/| /' conftest.$ac_ext >&5
10177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180
10181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010182done
10183case $ac_lo in
10184?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010186 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010187See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010189See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 else
10192 ac_cv_sizeof_fpos_t=0
10193 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010194esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* confdefs.h. */
10198_ACEOF
10199cat confdefs.h >>conftest.$ac_ext
10200cat >>conftest.$ac_ext <<_ACEOF
10201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010202$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010203 typedef fpos_t ac__type_sizeof_;
10204static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10205static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010206#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010207#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010210{
Martin v. Löwis11437992002-04-12 09:54:03 +000010211
10212 FILE *f = fopen ("conftest.val", "w");
10213 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010215 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 }
10222 else
10223 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010225 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010227 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
10231 ;
10232 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233}
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
10235rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236if { (ac_try="$ac_link"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246 { (case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 (exit $ac_status); }; }; then
10255 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257 echo "$as_me: program exited with status $ac_status" >&5
10258echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010259sed 's/^/| /' conftest.$ac_ext >&5
10260
Martin v. Löwis11437992002-04-12 09:54:03 +000010261( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 else
10269 ac_cv_sizeof_fpos_t=0
10270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272rm -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 +000010273fi
10274rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010275fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10277echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278
10279
10280
Martin v. Löwis11437992002-04-12 09:54:03 +000010281cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010282#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284
Michael W. Hudson54241132001-12-07 15:38:26 +000010285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286{ echo "$as_me:$LINENO: checking for size_t" >&5
10287echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10288if test "${ac_cv_type_size_t+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10290else
10291 cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
10297$ac_includes_default
10298typedef size_t ac__type_new_;
10299int
10300main ()
10301{
10302if ((ac__type_new_ *) 0)
10303 return 0;
10304if (sizeof (ac__type_new_))
10305 return 0;
10306 ;
10307 return 0;
10308}
10309_ACEOF
10310rm -f conftest.$ac_objext
10311if { (ac_try="$ac_compile"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
10316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10317 (eval "$ac_compile") 2>conftest.er1
10318 ac_status=$?
10319 grep -v '^ *+' conftest.er1 >conftest.err
10320 rm -f conftest.er1
10321 cat conftest.err >&5
10322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323 (exit $ac_status); } && {
10324 test -z "$ac_c_werror_flag" ||
10325 test ! -s conftest.err
10326 } && test -s conftest.$ac_objext; then
10327 ac_cv_type_size_t=yes
10328else
10329 echo "$as_me: failed program was:" >&5
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
10332 ac_cv_type_size_t=no
10333fi
10334
10335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10336fi
10337{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10338echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340# The cast to long int works around a bug in the HP C Compiler
10341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10343# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010344{ echo "$as_me:$LINENO: checking size of size_t" >&5
10345echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010346if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349 if test "$cross_compiling" = yes; then
10350 # Depending upon the size, compute the lo and hi bounds.
10351cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
10357$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010358 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359int
10360main ()
10361{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010363test_array [0] = 0
10364
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370if { (ac_try="$ac_compile"
10371case "(($ac_try" in
10372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373 *) ac_try_echo=$ac_try;;
10374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010377 ac_status=$?
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382 (exit $ac_status); } && {
10383 test -z "$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386 ac_lo=0 ac_mid=0
10387 while :; do
10388 cat >conftest.$ac_ext <<_ACEOF
10389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
10394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010395 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010396int
10397main ()
10398{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400test_array [0] = 0
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
10406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407if { (ac_try="$ac_compile"
10408case "(($ac_try" in
10409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10410 *) ac_try_echo=$ac_try;;
10411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010414 ac_status=$?
10415 grep -v '^ *+' conftest.er1 >conftest.err
10416 rm -f conftest.er1
10417 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419 (exit $ac_status); } && {
10420 test -z "$ac_c_werror_flag" ||
10421 test ! -s conftest.err
10422 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423 ac_hi=$ac_mid; break
10424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010425 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426sed 's/^/| /' conftest.$ac_ext >&5
10427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428 ac_lo=`expr $ac_mid + 1`
10429 if test $ac_lo -le $ac_mid; then
10430 ac_lo= ac_hi=
10431 break
10432 fi
10433 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 done
10438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010439 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440sed 's/^/| /' conftest.$ac_ext >&5
10441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
10448$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010449 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450int
10451main ()
10452{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454test_array [0] = 0
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461if { (ac_try="$ac_compile"
10462case "(($ac_try" in
10463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10464 *) ac_try_echo=$ac_try;;
10465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468 ac_status=$?
10469 grep -v '^ *+' conftest.er1 >conftest.err
10470 rm -f conftest.er1
10471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473 (exit $ac_status); } && {
10474 test -z "$ac_c_werror_flag" ||
10475 test ! -s conftest.err
10476 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477 ac_hi=-1 ac_mid=-1
10478 while :; do
10479 cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h. */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h. */
10485$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010486 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487int
10488main ()
10489{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491test_array [0] = 0
10492
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498if { (ac_try="$ac_compile"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 ac_lo=$ac_mid; break
10515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010516 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010517sed 's/^/| /' conftest.$ac_ext >&5
10518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 ac_hi=`expr '(' $ac_mid ')' - 1`
10520 if test $ac_mid -le $ac_hi; then
10521 ac_lo= ac_hi=
10522 break
10523 fi
10524 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 done
10529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010530 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531sed 's/^/| /' conftest.$ac_ext >&5
10532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535
10536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538
10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540# Binary search between lo and hi bounds.
10541while test "x$ac_lo" != "x$ac_hi"; do
10542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10543 cat >conftest.$ac_ext <<_ACEOF
10544/* confdefs.h. */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h. */
10549$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010550 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551int
10552main ()
10553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555test_array [0] = 0
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562if { (ac_try="$ac_compile"
10563case "(($ac_try" in
10564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10565 *) ac_try_echo=$ac_try;;
10566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569 ac_status=$?
10570 grep -v '^ *+' conftest.er1 >conftest.err
10571 rm -f conftest.er1
10572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574 (exit $ac_status); } && {
10575 test -z "$ac_c_werror_flag" ||
10576 test ! -s conftest.err
10577 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578 ac_hi=$ac_mid
10579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010580 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581sed 's/^/| /' conftest.$ac_ext >&5
10582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585
10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587done
10588case $ac_lo in
10589?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 else
10597 ac_cv_sizeof_size_t=0
10598 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599esac
10600else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 cat >conftest.$ac_ext <<_ACEOF
10602/* confdefs.h. */
10603_ACEOF
10604cat confdefs.h >>conftest.$ac_ext
10605cat >>conftest.$ac_ext <<_ACEOF
10606/* end confdefs.h. */
10607$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010608 typedef size_t ac__type_sizeof_;
10609static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10610static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611#include <stdio.h>
10612#include <stdlib.h>
10613int
10614main ()
10615{
10616
10617 FILE *f = fopen ("conftest.val", "w");
10618 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010620 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626 }
10627 else
10628 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010630 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010632 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641if { (ac_try="$ac_link"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 { (case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 (exit $ac_status); }; }; then
10660 ac_cv_sizeof_size_t=`cat conftest.val`
10661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662 echo "$as_me: program exited with status $ac_status" >&5
10663echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664sed 's/^/| /' conftest.$ac_ext >&5
10665
10666( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673 else
10674 ac_cv_sizeof_size_t=0
10675 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677rm -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 +000010678fi
10679rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10682echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683
10684
10685
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686cat >>confdefs.h <<_ACEOF
10687#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10688_ACEOF
10689
10690
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691{ echo "$as_me:$LINENO: checking for pid_t" >&5
10692echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10693if test "${ac_cv_type_pid_t+set}" = set; then
10694 echo $ECHO_N "(cached) $ECHO_C" >&6
10695else
10696 cat >conftest.$ac_ext <<_ACEOF
10697/* confdefs.h. */
10698_ACEOF
10699cat confdefs.h >>conftest.$ac_ext
10700cat >>conftest.$ac_ext <<_ACEOF
10701/* end confdefs.h. */
10702$ac_includes_default
10703typedef pid_t ac__type_new_;
10704int
10705main ()
10706{
10707if ((ac__type_new_ *) 0)
10708 return 0;
10709if (sizeof (ac__type_new_))
10710 return 0;
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext
10716if { (ac_try="$ac_compile"
10717case "(($ac_try" in
10718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10719 *) ac_try_echo=$ac_try;;
10720esac
10721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10722 (eval "$ac_compile") 2>conftest.er1
10723 ac_status=$?
10724 grep -v '^ *+' conftest.er1 >conftest.err
10725 rm -f conftest.er1
10726 cat conftest.err >&5
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); } && {
10729 test -z "$ac_c_werror_flag" ||
10730 test ! -s conftest.err
10731 } && test -s conftest.$ac_objext; then
10732 ac_cv_type_pid_t=yes
10733else
10734 echo "$as_me: failed program was:" >&5
10735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737 ac_cv_type_pid_t=no
10738fi
10739
10740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10741fi
10742{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10743echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10744
Christian Heimes400adb02008-02-01 08:12:03 +000010745# The cast to long int works around a bug in the HP C Compiler
10746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10748# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010749{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10750echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010751if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010752 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010753else
10754 if test "$cross_compiling" = yes; then
10755 # Depending upon the size, compute the lo and hi bounds.
10756cat >conftest.$ac_ext <<_ACEOF
10757/* confdefs.h. */
10758_ACEOF
10759cat confdefs.h >>conftest.$ac_ext
10760cat >>conftest.$ac_ext <<_ACEOF
10761/* end confdefs.h. */
10762$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010763 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010764int
10765main ()
10766{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010768test_array [0] = 0
10769
10770 ;
10771 return 0;
10772}
10773_ACEOF
10774rm -f conftest.$ac_objext
10775if { (ac_try="$ac_compile"
10776case "(($ac_try" in
10777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10778 *) ac_try_echo=$ac_try;;
10779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010781 (eval "$ac_compile") 2>conftest.er1
10782 ac_status=$?
10783 grep -v '^ *+' conftest.er1 >conftest.err
10784 rm -f conftest.er1
10785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010787 (exit $ac_status); } && {
10788 test -z "$ac_c_werror_flag" ||
10789 test ! -s conftest.err
10790 } && test -s conftest.$ac_objext; then
10791 ac_lo=0 ac_mid=0
10792 while :; do
10793 cat >conftest.$ac_ext <<_ACEOF
10794/* confdefs.h. */
10795_ACEOF
10796cat confdefs.h >>conftest.$ac_ext
10797cat >>conftest.$ac_ext <<_ACEOF
10798/* end confdefs.h. */
10799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010800 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010801int
10802main ()
10803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010805test_array [0] = 0
10806
10807 ;
10808 return 0;
10809}
10810_ACEOF
10811rm -f conftest.$ac_objext
10812if { (ac_try="$ac_compile"
10813case "(($ac_try" in
10814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10815 *) ac_try_echo=$ac_try;;
10816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010818 (eval "$ac_compile") 2>conftest.er1
10819 ac_status=$?
10820 grep -v '^ *+' conftest.er1 >conftest.err
10821 rm -f conftest.er1
10822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010824 (exit $ac_status); } && {
10825 test -z "$ac_c_werror_flag" ||
10826 test ! -s conftest.err
10827 } && test -s conftest.$ac_objext; then
10828 ac_hi=$ac_mid; break
10829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010830 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
10833 ac_lo=`expr $ac_mid + 1`
10834 if test $ac_lo -le $ac_mid; then
10835 ac_lo= ac_hi=
10836 break
10837 fi
10838 ac_mid=`expr 2 '*' $ac_mid + 1`
10839fi
10840
10841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842 done
10843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010844 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010845sed 's/^/| /' conftest.$ac_ext >&5
10846
10847 cat >conftest.$ac_ext <<_ACEOF
10848/* confdefs.h. */
10849_ACEOF
10850cat confdefs.h >>conftest.$ac_ext
10851cat >>conftest.$ac_ext <<_ACEOF
10852/* end confdefs.h. */
10853$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010854 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010855int
10856main ()
10857{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010858static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010859test_array [0] = 0
10860
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext
10866if { (ac_try="$ac_compile"
10867case "(($ac_try" in
10868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10869 *) ac_try_echo=$ac_try;;
10870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010872 (eval "$ac_compile") 2>conftest.er1
10873 ac_status=$?
10874 grep -v '^ *+' conftest.er1 >conftest.err
10875 rm -f conftest.er1
10876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010878 (exit $ac_status); } && {
10879 test -z "$ac_c_werror_flag" ||
10880 test ! -s conftest.err
10881 } && test -s conftest.$ac_objext; then
10882 ac_hi=-1 ac_mid=-1
10883 while :; do
10884 cat >conftest.$ac_ext <<_ACEOF
10885/* confdefs.h. */
10886_ACEOF
10887cat confdefs.h >>conftest.$ac_ext
10888cat >>conftest.$ac_ext <<_ACEOF
10889/* end confdefs.h. */
10890$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010891 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010892int
10893main ()
10894{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010896test_array [0] = 0
10897
10898 ;
10899 return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext
10903if { (ac_try="$ac_compile"
10904case "(($ac_try" in
10905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10906 *) ac_try_echo=$ac_try;;
10907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010909 (eval "$ac_compile") 2>conftest.er1
10910 ac_status=$?
10911 grep -v '^ *+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010915 (exit $ac_status); } && {
10916 test -z "$ac_c_werror_flag" ||
10917 test ! -s conftest.err
10918 } && test -s conftest.$ac_objext; then
10919 ac_lo=$ac_mid; break
10920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010921 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 ac_hi=`expr '(' $ac_mid ')' - 1`
10925 if test $ac_mid -le $ac_hi; then
10926 ac_lo= ac_hi=
10927 break
10928 fi
10929 ac_mid=`expr 2 '*' $ac_mid`
10930fi
10931
10932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10933 done
10934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010935 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010936sed 's/^/| /' conftest.$ac_ext >&5
10937
10938 ac_lo= ac_hi=
10939fi
10940
10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942fi
10943
10944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10945# Binary search between lo and hi bounds.
10946while test "x$ac_lo" != "x$ac_hi"; do
10947 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10948 cat >conftest.$ac_ext <<_ACEOF
10949/* confdefs.h. */
10950_ACEOF
10951cat confdefs.h >>conftest.$ac_ext
10952cat >>conftest.$ac_ext <<_ACEOF
10953/* end confdefs.h. */
10954$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010955 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010956int
10957main ()
10958{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010960test_array [0] = 0
10961
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966rm -f conftest.$ac_objext
10967if { (ac_try="$ac_compile"
10968case "(($ac_try" in
10969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10970 *) ac_try_echo=$ac_try;;
10971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010973 (eval "$ac_compile") 2>conftest.er1
10974 ac_status=$?
10975 grep -v '^ *+' conftest.er1 >conftest.err
10976 rm -f conftest.er1
10977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010979 (exit $ac_status); } && {
10980 test -z "$ac_c_werror_flag" ||
10981 test ! -s conftest.err
10982 } && test -s conftest.$ac_objext; then
10983 ac_hi=$ac_mid
10984else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010985 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986sed 's/^/| /' conftest.$ac_ext >&5
10987
10988 ac_lo=`expr '(' $ac_mid ')' + 1`
10989fi
10990
10991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10992done
10993case $ac_lo in
10994?*) ac_cv_sizeof_pid_t=$ac_lo;;
10995'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011001 else
11002 ac_cv_sizeof_pid_t=0
11003 fi ;;
11004esac
11005else
11006 cat >conftest.$ac_ext <<_ACEOF
11007/* confdefs.h. */
11008_ACEOF
11009cat confdefs.h >>conftest.$ac_ext
11010cat >>conftest.$ac_ext <<_ACEOF
11011/* end confdefs.h. */
11012$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011013 typedef pid_t ac__type_sizeof_;
11014static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11015static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011016#include <stdio.h>
11017#include <stdlib.h>
11018int
11019main ()
11020{
11021
11022 FILE *f = fopen ("conftest.val", "w");
11023 if (! f)
11024 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011025 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011026 {
11027 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011028 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011029 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011031 }
11032 else
11033 {
11034 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011035 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011036 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011037 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011038 }
11039 return ferror (f) || fclose (f) != 0;
11040
11041 ;
11042 return 0;
11043}
11044_ACEOF
11045rm -f conftest$ac_exeext
11046if { (ac_try="$ac_link"
11047case "(($ac_try" in
11048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11049 *) ac_try_echo=$ac_try;;
11050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011052 (eval "$ac_link") 2>&5
11053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11056 { (case "(($ac_try" in
11057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11058 *) ac_try_echo=$ac_try;;
11059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011061 (eval "$ac_try") 2>&5
11062 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011064 (exit $ac_status); }; }; then
11065 ac_cv_sizeof_pid_t=`cat conftest.val`
11066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067 echo "$as_me: program exited with status $ac_status" >&5
11068echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011069sed 's/^/| /' conftest.$ac_ext >&5
11070
11071( exit $ac_status )
11072if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011073 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011074See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011076See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011078 else
11079 ac_cv_sizeof_pid_t=0
11080 fi
11081fi
11082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11083fi
11084rm -f conftest.val
11085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11087echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011088
11089
11090
11091cat >>confdefs.h <<_ACEOF
11092#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11093_ACEOF
11094
11095
Michael W. Hudson54241132001-12-07 15:38:26 +000011096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011097{ echo "$as_me:$LINENO: checking for long long support" >&5
11098echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011099have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* confdefs.h. */
11102_ACEOF
11103cat confdefs.h >>conftest.$ac_ext
11104cat >>conftest.$ac_ext <<_ACEOF
11105/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011110long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ;
11112 return 0;
11113}
11114_ACEOF
11115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116if { (ac_try="$ac_compile"
11117case "(($ac_try" in
11118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11119 *) ac_try_echo=$ac_try;;
11120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011124 grep -v '^ *+' conftest.er1 >conftest.err
11125 rm -f conftest.er1
11126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128 (exit $ac_status); } && {
11129 test -z "$ac_c_werror_flag" ||
11130 test ! -s conftest.err
11131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
11133
11134cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011135#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136_ACEOF
11137
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011138 have_long_long=yes
11139
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146
11147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11149echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011150if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011151{ echo "$as_me:$LINENO: checking for long long" >&5
11152echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11153if test "${ac_cv_type_long_long+set}" = set; then
11154 echo $ECHO_N "(cached) $ECHO_C" >&6
11155else
11156 cat >conftest.$ac_ext <<_ACEOF
11157/* confdefs.h. */
11158_ACEOF
11159cat confdefs.h >>conftest.$ac_ext
11160cat >>conftest.$ac_ext <<_ACEOF
11161/* end confdefs.h. */
11162$ac_includes_default
11163typedef long long ac__type_new_;
11164int
11165main ()
11166{
11167if ((ac__type_new_ *) 0)
11168 return 0;
11169if (sizeof (ac__type_new_))
11170 return 0;
11171 ;
11172 return 0;
11173}
11174_ACEOF
11175rm -f conftest.$ac_objext
11176if { (ac_try="$ac_compile"
11177case "(($ac_try" in
11178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11179 *) ac_try_echo=$ac_try;;
11180esac
11181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11182 (eval "$ac_compile") 2>conftest.er1
11183 ac_status=$?
11184 grep -v '^ *+' conftest.er1 >conftest.err
11185 rm -f conftest.er1
11186 cat conftest.err >&5
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } && {
11189 test -z "$ac_c_werror_flag" ||
11190 test ! -s conftest.err
11191 } && test -s conftest.$ac_objext; then
11192 ac_cv_type_long_long=yes
11193else
11194 echo "$as_me: failed program was:" >&5
11195sed 's/^/| /' conftest.$ac_ext >&5
11196
11197 ac_cv_type_long_long=no
11198fi
11199
11200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11201fi
11202{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11203echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205# The cast to long int works around a bug in the HP C Compiler
11206# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11207# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11208# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011209{ echo "$as_me:$LINENO: checking size of long long" >&5
11210echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011211if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 if test "$cross_compiling" = yes; then
11215 # Depending upon the size, compute the lo and hi bounds.
11216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* confdefs.h. */
11218_ACEOF
11219cat confdefs.h >>conftest.$ac_ext
11220cat >>conftest.$ac_ext <<_ACEOF
11221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011222$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011223 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011228test_array [0] = 0
11229
11230 ;
11231 return 0;
11232}
11233_ACEOF
11234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235if { (ac_try="$ac_compile"
11236case "(($ac_try" in
11237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11238 *) ac_try_echo=$ac_try;;
11239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011243 grep -v '^ *+' conftest.er1 >conftest.err
11244 rm -f conftest.er1
11245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247 (exit $ac_status); } && {
11248 test -z "$ac_c_werror_flag" ||
11249 test ! -s conftest.err
11250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ac_lo=0 ac_mid=0
11252 while :; do
11253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* confdefs.h. */
11255_ACEOF
11256cat confdefs.h >>conftest.$ac_ext
11257cat >>conftest.$ac_ext <<_ACEOF
11258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011259$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011260 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011261int
11262main ()
11263{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011264static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011265test_array [0] = 0
11266
11267 ;
11268 return 0;
11269}
11270_ACEOF
11271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272if { (ac_try="$ac_compile"
11273case "(($ac_try" in
11274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11275 *) ac_try_echo=$ac_try;;
11276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011280 grep -v '^ *+' conftest.er1 >conftest.err
11281 rm -f conftest.er1
11282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 (exit $ac_status); } && {
11285 test -z "$ac_c_werror_flag" ||
11286 test ! -s conftest.err
11287 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ac_hi=$ac_mid; break
11289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011291sed 's/^/| /' conftest.$ac_ext >&5
11292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293 ac_lo=`expr $ac_mid + 1`
11294 if test $ac_lo -le $ac_mid; then
11295 ac_lo= ac_hi=
11296 break
11297 fi
11298 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300
11301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 done
11303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011305sed 's/^/| /' conftest.$ac_ext >&5
11306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011313$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011314 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011319test_array [0] = 0
11320
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326if { (ac_try="$ac_compile"
11327case "(($ac_try" in
11328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11329 *) ac_try_echo=$ac_try;;
11330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338 (exit $ac_status); } && {
11339 test -z "$ac_c_werror_flag" ||
11340 test ! -s conftest.err
11341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ac_hi=-1 ac_mid=-1
11343 while :; do
11344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011345/* confdefs.h. */
11346_ACEOF
11347cat confdefs.h >>conftest.$ac_ext
11348cat >>conftest.$ac_ext <<_ACEOF
11349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011350$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011351 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011352int
11353main ()
11354{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011356test_array [0] = 0
11357
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ac_lo=$ac_mid; break
11380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011382sed 's/^/| /' conftest.$ac_ext >&5
11383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384 ac_hi=`expr '(' $ac_mid ')' - 1`
11385 if test $ac_mid -le $ac_hi; then
11386 ac_lo= ac_hi=
11387 break
11388 fi
11389 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391
11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 done
11394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011396sed 's/^/| /' conftest.$ac_ext >&5
11397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400
11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403
11404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011405# Binary search between lo and hi bounds.
11406while test "x$ac_lo" != "x$ac_hi"; do
11407 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* confdefs.h. */
11410_ACEOF
11411cat confdefs.h >>conftest.$ac_ext
11412cat >>conftest.$ac_ext <<_ACEOF
11413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011414$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011415 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011416int
11417main ()
11418{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011419static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011420test_array [0] = 0
11421
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427if { (ac_try="$ac_compile"
11428case "(($ac_try" in
11429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11430 *) ac_try_echo=$ac_try;;
11431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011435 grep -v '^ *+' conftest.er1 >conftest.err
11436 rm -f conftest.er1
11437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439 (exit $ac_status); } && {
11440 test -z "$ac_c_werror_flag" ||
11441 test ! -s conftest.err
11442 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_hi=$ac_mid
11444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011446sed 's/^/| /' conftest.$ac_ext >&5
11447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450
11451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011452done
11453case $ac_lo in
11454?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011456 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011457See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011459See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 else
11462 ac_cv_sizeof_long_long=0
11463 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011464esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011465else
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011473 typedef long long ac__type_sizeof_;
11474static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11475static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011476#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011477#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011480{
Martin v. Löwis11437992002-04-12 09:54:03 +000011481
11482 FILE *f = fopen ("conftest.val", "w");
11483 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011485 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 }
11492 else
11493 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011495 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011497 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
11501 ;
11502 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503}
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
11505rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506if { (ac_try="$ac_link"
11507case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 { (case "(($ac_try" in
11517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11518 *) ac_try_echo=$ac_try;;
11519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 (exit $ac_status); }; }; then
11525 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527 echo "$as_me: program exited with status $ac_status" >&5
11528echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011529sed 's/^/| /' conftest.$ac_ext >&5
11530
Martin v. Löwis11437992002-04-12 09:54:03 +000011531( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011533 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538 else
11539 ac_cv_sizeof_long_long=0
11540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542rm -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 +000011543fi
11544rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011545fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11547echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548
11549
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011552#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011553_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554
Michael W. Hudson54241132001-12-07 15:38:26 +000011555
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556fi
11557
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011558{ echo "$as_me:$LINENO: checking for long double support" >&5
11559echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011560have_long_double=no
11561cat >conftest.$ac_ext <<_ACEOF
11562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
11567
11568int
11569main ()
11570{
11571long double x; x = (long double)0;
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576rm -f conftest.$ac_objext
11577if { (ac_try="$ac_compile"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011583 (eval "$ac_compile") 2>conftest.er1
11584 ac_status=$?
11585 grep -v '^ *+' conftest.er1 >conftest.err
11586 rm -f conftest.er1
11587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011589 (exit $ac_status); } && {
11590 test -z "$ac_c_werror_flag" ||
11591 test ! -s conftest.err
11592 } && test -s conftest.$ac_objext; then
11593
11594
11595cat >>confdefs.h <<\_ACEOF
11596#define HAVE_LONG_DOUBLE 1
11597_ACEOF
11598
11599 have_long_double=yes
11600
11601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011602 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011603sed 's/^/| /' conftest.$ac_ext >&5
11604
11605
11606fi
11607
11608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011609{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11610echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011611if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011612{ echo "$as_me:$LINENO: checking for long double" >&5
11613echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11614if test "${ac_cv_type_long_double+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11616else
11617 cat >conftest.$ac_ext <<_ACEOF
11618/* confdefs.h. */
11619_ACEOF
11620cat confdefs.h >>conftest.$ac_ext
11621cat >>conftest.$ac_ext <<_ACEOF
11622/* end confdefs.h. */
11623$ac_includes_default
11624typedef long double ac__type_new_;
11625int
11626main ()
11627{
11628if ((ac__type_new_ *) 0)
11629 return 0;
11630if (sizeof (ac__type_new_))
11631 return 0;
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
11637if { (ac_try="$ac_compile"
11638case "(($ac_try" in
11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11640 *) ac_try_echo=$ac_try;;
11641esac
11642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11643 (eval "$ac_compile") 2>conftest.er1
11644 ac_status=$?
11645 grep -v '^ *+' conftest.er1 >conftest.err
11646 rm -f conftest.er1
11647 cat conftest.err >&5
11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649 (exit $ac_status); } && {
11650 test -z "$ac_c_werror_flag" ||
11651 test ! -s conftest.err
11652 } && test -s conftest.$ac_objext; then
11653 ac_cv_type_long_double=yes
11654else
11655 echo "$as_me: failed program was:" >&5
11656sed 's/^/| /' conftest.$ac_ext >&5
11657
11658 ac_cv_type_long_double=no
11659fi
11660
11661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11662fi
11663{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11664echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11665
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011666# The cast to long int works around a bug in the HP C Compiler
11667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11669# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011670{ echo "$as_me:$LINENO: checking size of long double" >&5
11671echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011672if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011673 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674else
11675 if test "$cross_compiling" = yes; then
11676 # Depending upon the size, compute the lo and hi bounds.
11677cat >conftest.$ac_ext <<_ACEOF
11678/* confdefs.h. */
11679_ACEOF
11680cat confdefs.h >>conftest.$ac_ext
11681cat >>conftest.$ac_ext <<_ACEOF
11682/* end confdefs.h. */
11683$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011684 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685int
11686main ()
11687{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011688static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689test_array [0] = 0
11690
11691 ;
11692 return 0;
11693}
11694_ACEOF
11695rm -f conftest.$ac_objext
11696if { (ac_try="$ac_compile"
11697case "(($ac_try" in
11698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11699 *) ac_try_echo=$ac_try;;
11700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702 (eval "$ac_compile") 2>conftest.er1
11703 ac_status=$?
11704 grep -v '^ *+' conftest.er1 >conftest.err
11705 rm -f conftest.er1
11706 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708 (exit $ac_status); } && {
11709 test -z "$ac_c_werror_flag" ||
11710 test ! -s conftest.err
11711 } && test -s conftest.$ac_objext; then
11712 ac_lo=0 ac_mid=0
11713 while :; do
11714 cat >conftest.$ac_ext <<_ACEOF
11715/* confdefs.h. */
11716_ACEOF
11717cat confdefs.h >>conftest.$ac_ext
11718cat >>conftest.$ac_ext <<_ACEOF
11719/* end confdefs.h. */
11720$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011721 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011722int
11723main ()
11724{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011726test_array [0] = 0
11727
11728 ;
11729 return 0;
11730}
11731_ACEOF
11732rm -f conftest.$ac_objext
11733if { (ac_try="$ac_compile"
11734case "(($ac_try" in
11735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11736 *) ac_try_echo=$ac_try;;
11737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739 (eval "$ac_compile") 2>conftest.er1
11740 ac_status=$?
11741 grep -v '^ *+' conftest.er1 >conftest.err
11742 rm -f conftest.er1
11743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745 (exit $ac_status); } && {
11746 test -z "$ac_c_werror_flag" ||
11747 test ! -s conftest.err
11748 } && test -s conftest.$ac_objext; then
11749 ac_hi=$ac_mid; break
11750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011751 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752sed 's/^/| /' conftest.$ac_ext >&5
11753
11754 ac_lo=`expr $ac_mid + 1`
11755 if test $ac_lo -le $ac_mid; then
11756 ac_lo= ac_hi=
11757 break
11758 fi
11759 ac_mid=`expr 2 '*' $ac_mid + 1`
11760fi
11761
11762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11763 done
11764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011765 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011766sed 's/^/| /' conftest.$ac_ext >&5
11767
11768 cat >conftest.$ac_ext <<_ACEOF
11769/* confdefs.h. */
11770_ACEOF
11771cat confdefs.h >>conftest.$ac_ext
11772cat >>conftest.$ac_ext <<_ACEOF
11773/* end confdefs.h. */
11774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011775 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011776int
11777main ()
11778{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011780test_array [0] = 0
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext
11787if { (ac_try="$ac_compile"
11788case "(($ac_try" in
11789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11790 *) ac_try_echo=$ac_try;;
11791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793 (eval "$ac_compile") 2>conftest.er1
11794 ac_status=$?
11795 grep -v '^ *+' conftest.er1 >conftest.err
11796 rm -f conftest.er1
11797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799 (exit $ac_status); } && {
11800 test -z "$ac_c_werror_flag" ||
11801 test ! -s conftest.err
11802 } && test -s conftest.$ac_objext; then
11803 ac_hi=-1 ac_mid=-1
11804 while :; do
11805 cat >conftest.$ac_ext <<_ACEOF
11806/* confdefs.h. */
11807_ACEOF
11808cat confdefs.h >>conftest.$ac_ext
11809cat >>conftest.$ac_ext <<_ACEOF
11810/* end confdefs.h. */
11811$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011812 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011813int
11814main ()
11815{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011817test_array [0] = 0
11818
11819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext
11824if { (ac_try="$ac_compile"
11825case "(($ac_try" in
11826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11827 *) ac_try_echo=$ac_try;;
11828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830 (eval "$ac_compile") 2>conftest.er1
11831 ac_status=$?
11832 grep -v '^ *+' conftest.er1 >conftest.err
11833 rm -f conftest.er1
11834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011836 (exit $ac_status); } && {
11837 test -z "$ac_c_werror_flag" ||
11838 test ! -s conftest.err
11839 } && test -s conftest.$ac_objext; then
11840 ac_lo=$ac_mid; break
11841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011842 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843sed 's/^/| /' conftest.$ac_ext >&5
11844
11845 ac_hi=`expr '(' $ac_mid ')' - 1`
11846 if test $ac_mid -le $ac_hi; then
11847 ac_lo= ac_hi=
11848 break
11849 fi
11850 ac_mid=`expr 2 '*' $ac_mid`
11851fi
11852
11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11854 done
11855else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011856 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011857sed 's/^/| /' conftest.$ac_ext >&5
11858
11859 ac_lo= ac_hi=
11860fi
11861
11862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11863fi
11864
11865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866# Binary search between lo and hi bounds.
11867while test "x$ac_lo" != "x$ac_hi"; do
11868 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11869 cat >conftest.$ac_ext <<_ACEOF
11870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
11875$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011876 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011877int
11878main ()
11879{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011881test_array [0] = 0
11882
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext
11888if { (ac_try="$ac_compile"
11889case "(($ac_try" in
11890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11891 *) ac_try_echo=$ac_try;;
11892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894 (eval "$ac_compile") 2>conftest.er1
11895 ac_status=$?
11896 grep -v '^ *+' conftest.er1 >conftest.err
11897 rm -f conftest.er1
11898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011900 (exit $ac_status); } && {
11901 test -z "$ac_c_werror_flag" ||
11902 test ! -s conftest.err
11903 } && test -s conftest.$ac_objext; then
11904 ac_hi=$ac_mid
11905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011906 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907sed 's/^/| /' conftest.$ac_ext >&5
11908
11909 ac_lo=`expr '(' $ac_mid ')' + 1`
11910fi
11911
11912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11913done
11914case $ac_lo in
11915?*) ac_cv_sizeof_long_double=$ac_lo;;
11916'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011918See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922 else
11923 ac_cv_sizeof_long_double=0
11924 fi ;;
11925esac
11926else
11927 cat >conftest.$ac_ext <<_ACEOF
11928/* confdefs.h. */
11929_ACEOF
11930cat confdefs.h >>conftest.$ac_ext
11931cat >>conftest.$ac_ext <<_ACEOF
11932/* end confdefs.h. */
11933$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011934 typedef long double ac__type_sizeof_;
11935static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11936static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011937#include <stdio.h>
11938#include <stdlib.h>
11939int
11940main ()
11941{
11942
11943 FILE *f = fopen ("conftest.val", "w");
11944 if (! f)
11945 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011946 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011947 {
11948 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952 }
11953 else
11954 {
11955 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011958 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 }
11960 return ferror (f) || fclose (f) != 0;
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest$ac_exeext
11967if { (ac_try="$ac_link"
11968case "(($ac_try" in
11969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11970 *) ac_try_echo=$ac_try;;
11971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011973 (eval "$ac_link") 2>&5
11974 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11977 { (case "(($ac_try" in
11978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11979 *) ac_try_echo=$ac_try;;
11980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011982 (eval "$ac_try") 2>&5
11983 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985 (exit $ac_status); }; }; then
11986 ac_cv_sizeof_long_double=`cat conftest.val`
11987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988 echo "$as_me: program exited with status $ac_status" >&5
11989echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011990sed 's/^/| /' conftest.$ac_ext >&5
11991
11992( exit $ac_status )
11993if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999 else
12000 ac_cv_sizeof_long_double=0
12001 fi
12002fi
12003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12004fi
12005rm -f conftest.val
12006fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12008echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009
12010
12011
12012cat >>confdefs.h <<_ACEOF
12013#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12014_ACEOF
12015
12016
12017fi
12018
12019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12021echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012022have_c99_bool=no
12023cat >conftest.$ac_ext <<_ACEOF
12024/* confdefs.h. */
12025_ACEOF
12026cat confdefs.h >>conftest.$ac_ext
12027cat >>conftest.$ac_ext <<_ACEOF
12028/* end confdefs.h. */
12029
12030int
12031main ()
12032{
12033_Bool x; x = (_Bool)0;
12034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039if { (ac_try="$ac_compile"
12040case "(($ac_try" in
12041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12042 *) ac_try_echo=$ac_try;;
12043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012046 ac_status=$?
12047 grep -v '^ *+' conftest.er1 >conftest.err
12048 rm -f conftest.er1
12049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051 (exit $ac_status); } && {
12052 test -z "$ac_c_werror_flag" ||
12053 test ! -s conftest.err
12054 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012055
12056
12057cat >>confdefs.h <<\_ACEOF
12058#define HAVE_C99_BOOL 1
12059_ACEOF
12060
12061 have_c99_bool=yes
12062
12063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012064 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067
Thomas Woutersb2137042007-02-01 18:02:27 +000012068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
12070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012071{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12072echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012073if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074{ echo "$as_me:$LINENO: checking for _Bool" >&5
12075echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12076if test "${ac_cv_type__Bool+set}" = set; then
12077 echo $ECHO_N "(cached) $ECHO_C" >&6
12078else
12079 cat >conftest.$ac_ext <<_ACEOF
12080/* confdefs.h. */
12081_ACEOF
12082cat confdefs.h >>conftest.$ac_ext
12083cat >>conftest.$ac_ext <<_ACEOF
12084/* end confdefs.h. */
12085$ac_includes_default
12086typedef _Bool ac__type_new_;
12087int
12088main ()
12089{
12090if ((ac__type_new_ *) 0)
12091 return 0;
12092if (sizeof (ac__type_new_))
12093 return 0;
12094 ;
12095 return 0;
12096}
12097_ACEOF
12098rm -f conftest.$ac_objext
12099if { (ac_try="$ac_compile"
12100case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
12104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12105 (eval "$ac_compile") 2>conftest.er1
12106 ac_status=$?
12107 grep -v '^ *+' conftest.er1 >conftest.err
12108 rm -f conftest.er1
12109 cat conftest.err >&5
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); } && {
12112 test -z "$ac_c_werror_flag" ||
12113 test ! -s conftest.err
12114 } && test -s conftest.$ac_objext; then
12115 ac_cv_type__Bool=yes
12116else
12117 echo "$as_me: failed program was:" >&5
12118sed 's/^/| /' conftest.$ac_ext >&5
12119
12120 ac_cv_type__Bool=no
12121fi
12122
12123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124fi
12125{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12126echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128# The cast to long int works around a bug in the HP C Compiler
12129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12131# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012132{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12133echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012134if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012135 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012136else
12137 if test "$cross_compiling" = yes; then
12138 # Depending upon the size, compute the lo and hi bounds.
12139cat >conftest.$ac_ext <<_ACEOF
12140/* confdefs.h. */
12141_ACEOF
12142cat confdefs.h >>conftest.$ac_ext
12143cat >>conftest.$ac_ext <<_ACEOF
12144/* end confdefs.h. */
12145$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012146 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012147int
12148main ()
12149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012151test_array [0] = 0
12152
12153 ;
12154 return 0;
12155}
12156_ACEOF
12157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158if { (ac_try="$ac_compile"
12159case "(($ac_try" in
12160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12161 *) ac_try_echo=$ac_try;;
12162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012165 ac_status=$?
12166 grep -v '^ *+' conftest.er1 >conftest.err
12167 rm -f conftest.er1
12168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 (exit $ac_status); } && {
12171 test -z "$ac_c_werror_flag" ||
12172 test ! -s conftest.err
12173 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012174 ac_lo=0 ac_mid=0
12175 while :; do
12176 cat >conftest.$ac_ext <<_ACEOF
12177/* confdefs.h. */
12178_ACEOF
12179cat confdefs.h >>conftest.$ac_ext
12180cat >>conftest.$ac_ext <<_ACEOF
12181/* end confdefs.h. */
12182$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012183 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012184int
12185main ()
12186{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012187static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012188test_array [0] = 0
12189
12190 ;
12191 return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195if { (ac_try="$ac_compile"
12196case "(($ac_try" in
12197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12198 *) ac_try_echo=$ac_try;;
12199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012202 ac_status=$?
12203 grep -v '^ *+' conftest.er1 >conftest.err
12204 rm -f conftest.er1
12205 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012207 (exit $ac_status); } && {
12208 test -z "$ac_c_werror_flag" ||
12209 test ! -s conftest.err
12210 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012211 ac_hi=$ac_mid; break
12212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012213 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012214sed 's/^/| /' conftest.$ac_ext >&5
12215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 ac_lo=`expr $ac_mid + 1`
12217 if test $ac_lo -le $ac_mid; then
12218 ac_lo= ac_hi=
12219 break
12220 fi
12221 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223
12224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012225 done
12226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012227 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012228sed 's/^/| /' conftest.$ac_ext >&5
12229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012231/* confdefs.h. */
12232_ACEOF
12233cat confdefs.h >>conftest.$ac_ext
12234cat >>conftest.$ac_ext <<_ACEOF
12235/* end confdefs.h. */
12236$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012237 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012238int
12239main ()
12240{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012242test_array [0] = 0
12243
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249if { (ac_try="$ac_compile"
12250case "(($ac_try" in
12251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12252 *) ac_try_echo=$ac_try;;
12253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012256 ac_status=$?
12257 grep -v '^ *+' conftest.er1 >conftest.err
12258 rm -f conftest.er1
12259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261 (exit $ac_status); } && {
12262 test -z "$ac_c_werror_flag" ||
12263 test ! -s conftest.err
12264 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012265 ac_hi=-1 ac_mid=-1
12266 while :; do
12267 cat >conftest.$ac_ext <<_ACEOF
12268/* confdefs.h. */
12269_ACEOF
12270cat confdefs.h >>conftest.$ac_ext
12271cat >>conftest.$ac_ext <<_ACEOF
12272/* end confdefs.h. */
12273$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012274 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012275int
12276main ()
12277{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012278static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012279test_array [0] = 0
12280
12281 ;
12282 return 0;
12283}
12284_ACEOF
12285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286if { (ac_try="$ac_compile"
12287case "(($ac_try" in
12288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12289 *) ac_try_echo=$ac_try;;
12290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012293 ac_status=$?
12294 grep -v '^ *+' conftest.er1 >conftest.err
12295 rm -f conftest.er1
12296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298 (exit $ac_status); } && {
12299 test -z "$ac_c_werror_flag" ||
12300 test ! -s conftest.err
12301 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012302 ac_lo=$ac_mid; break
12303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012304 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012305sed 's/^/| /' conftest.$ac_ext >&5
12306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307 ac_hi=`expr '(' $ac_mid ')' - 1`
12308 if test $ac_mid -le $ac_hi; then
12309 ac_lo= ac_hi=
12310 break
12311 fi
12312 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314
12315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012316 done
12317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012318 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012319sed 's/^/| /' conftest.$ac_ext >&5
12320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323
12324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326
12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012328# Binary search between lo and hi bounds.
12329while test "x$ac_lo" != "x$ac_hi"; do
12330 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12331 cat >conftest.$ac_ext <<_ACEOF
12332/* confdefs.h. */
12333_ACEOF
12334cat confdefs.h >>conftest.$ac_ext
12335cat >>conftest.$ac_ext <<_ACEOF
12336/* end confdefs.h. */
12337$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012338 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012339int
12340main ()
12341{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012343test_array [0] = 0
12344
12345 ;
12346 return 0;
12347}
12348_ACEOF
12349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350if { (ac_try="$ac_compile"
12351case "(($ac_try" in
12352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12353 *) ac_try_echo=$ac_try;;
12354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012357 ac_status=$?
12358 grep -v '^ *+' conftest.er1 >conftest.err
12359 rm -f conftest.er1
12360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362 (exit $ac_status); } && {
12363 test -z "$ac_c_werror_flag" ||
12364 test ! -s conftest.err
12365 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012366 ac_hi=$ac_mid
12367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012368 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012369sed 's/^/| /' conftest.$ac_ext >&5
12370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012375done
12376case $ac_lo in
12377?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012379 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012380See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012382See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 else
12385 ac_cv_sizeof__Bool=0
12386 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012387esac
12388else
12389 cat >conftest.$ac_ext <<_ACEOF
12390/* confdefs.h. */
12391_ACEOF
12392cat confdefs.h >>conftest.$ac_ext
12393cat >>conftest.$ac_ext <<_ACEOF
12394/* end confdefs.h. */
12395$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012396 typedef _Bool ac__type_sizeof_;
12397static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12398static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012399#include <stdio.h>
12400#include <stdlib.h>
12401int
12402main ()
12403{
12404
12405 FILE *f = fopen ("conftest.val", "w");
12406 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012408 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012409 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012411 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012414 }
12415 else
12416 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012418 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012421 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012423
12424 ;
12425 return 0;
12426}
12427_ACEOF
12428rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429if { (ac_try="$ac_link"
12430case "(($ac_try" in
12431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12432 *) ac_try_echo=$ac_try;;
12433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012436 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439 { (case "(($ac_try" in
12440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12441 *) ac_try_echo=$ac_try;;
12442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012445 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 (exit $ac_status); }; }; then
12448 ac_cv_sizeof__Bool=`cat conftest.val`
12449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450 echo "$as_me: program exited with status $ac_status" >&5
12451echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012452sed 's/^/| /' conftest.$ac_ext >&5
12453
12454( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012456 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012457See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012459See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461 else
12462 ac_cv_sizeof__Bool=0
12463 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465rm -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 +000012466fi
12467rm -f conftest.val
12468fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12470echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471
12472
12473
Thomas Woutersb2137042007-02-01 18:02:27 +000012474cat >>confdefs.h <<_ACEOF
12475#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12476_ACEOF
12477
12478
12479fi
12480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012481{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12482echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012483if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012485else
12486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012487/* confdefs.h. */
12488_ACEOF
12489cat confdefs.h >>conftest.$ac_ext
12490cat >>conftest.$ac_ext <<_ACEOF
12491/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012492#ifdef HAVE_STDINT_H
12493 #include <stdint.h>
12494 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012496typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012500if ((ac__type_new_ *) 0)
12501 return 0;
12502if (sizeof (ac__type_new_))
12503 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 ;
12505 return 0;
12506}
12507_ACEOF
12508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509if { (ac_try="$ac_compile"
12510case "(($ac_try" in
12511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12512 *) ac_try_echo=$ac_try;;
12513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012517 grep -v '^ *+' conftest.er1 >conftest.err
12518 rm -f conftest.er1
12519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 (exit $ac_status); } && {
12522 test -z "$ac_c_werror_flag" ||
12523 test ! -s conftest.err
12524 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012528sed 's/^/| /' conftest.$ac_ext >&5
12529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012530 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532
12533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012535{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12536echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12537if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012538
12539cat >>confdefs.h <<_ACEOF
12540#define HAVE_UINTPTR_T 1
12541_ACEOF
12542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012543{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12544echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12545if test "${ac_cv_type_uintptr_t+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12547else
12548 cat >conftest.$ac_ext <<_ACEOF
12549/* confdefs.h. */
12550_ACEOF
12551cat confdefs.h >>conftest.$ac_ext
12552cat >>conftest.$ac_ext <<_ACEOF
12553/* end confdefs.h. */
12554$ac_includes_default
12555typedef uintptr_t ac__type_new_;
12556int
12557main ()
12558{
12559if ((ac__type_new_ *) 0)
12560 return 0;
12561if (sizeof (ac__type_new_))
12562 return 0;
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567rm -f conftest.$ac_objext
12568if { (ac_try="$ac_compile"
12569case "(($ac_try" in
12570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12571 *) ac_try_echo=$ac_try;;
12572esac
12573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12574 (eval "$ac_compile") 2>conftest.er1
12575 ac_status=$?
12576 grep -v '^ *+' conftest.er1 >conftest.err
12577 rm -f conftest.er1
12578 cat conftest.err >&5
12579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580 (exit $ac_status); } && {
12581 test -z "$ac_c_werror_flag" ||
12582 test ! -s conftest.err
12583 } && test -s conftest.$ac_objext; then
12584 ac_cv_type_uintptr_t=yes
12585else
12586 echo "$as_me: failed program was:" >&5
12587sed 's/^/| /' conftest.$ac_ext >&5
12588
12589 ac_cv_type_uintptr_t=no
12590fi
12591
12592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12593fi
12594{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12595echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597# The cast to long int works around a bug in the HP C Compiler
12598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12600# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012601{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12602echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012603if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012604 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012605else
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 if test "$cross_compiling" = yes; then
12607 # Depending upon the size, compute the lo and hi bounds.
12608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* confdefs.h. */
12610_ACEOF
12611cat confdefs.h >>conftest.$ac_ext
12612cat >>conftest.$ac_ext <<_ACEOF
12613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012615 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012616int
12617main ()
12618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012620test_array [0] = 0
12621
12622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627if { (ac_try="$ac_compile"
12628case "(($ac_try" in
12629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12630 *) ac_try_echo=$ac_try;;
12631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 ac_lo=0 ac_mid=0
12644 while :; do
12645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* confdefs.h. */
12647_ACEOF
12648cat confdefs.h >>conftest.$ac_ext
12649cat >>conftest.$ac_ext <<_ACEOF
12650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012652 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012657test_array [0] = 0
12658
12659 ;
12660 return 0;
12661}
12662_ACEOF
12663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664if { (ac_try="$ac_compile"
12665case "(($ac_try" in
12666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667 *) ac_try_echo=$ac_try;;
12668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012672 grep -v '^ *+' conftest.er1 >conftest.err
12673 rm -f conftest.er1
12674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676 (exit $ac_status); } && {
12677 test -z "$ac_c_werror_flag" ||
12678 test ! -s conftest.err
12679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_hi=$ac_mid; break
12681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012683sed 's/^/| /' conftest.$ac_ext >&5
12684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 ac_lo=`expr $ac_mid + 1`
12686 if test $ac_lo -le $ac_mid; then
12687 ac_lo= ac_hi=
12688 break
12689 fi
12690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692
12693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 done
12695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012697sed 's/^/| /' conftest.$ac_ext >&5
12698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* confdefs.h. */
12701_ACEOF
12702cat confdefs.h >>conftest.$ac_ext
12703cat >>conftest.$ac_ext <<_ACEOF
12704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012705$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012706 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012711test_array [0] = 0
12712
12713 ;
12714 return 0;
12715}
12716_ACEOF
12717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718if { (ac_try="$ac_compile"
12719case "(($ac_try" in
12720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12721 *) ac_try_echo=$ac_try;;
12722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012726 grep -v '^ *+' conftest.er1 >conftest.err
12727 rm -f conftest.er1
12728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730 (exit $ac_status); } && {
12731 test -z "$ac_c_werror_flag" ||
12732 test ! -s conftest.err
12733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 ac_hi=-1 ac_mid=-1
12735 while :; do
12736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012737/* confdefs.h. */
12738_ACEOF
12739cat confdefs.h >>conftest.$ac_ext
12740cat >>conftest.$ac_ext <<_ACEOF
12741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012743 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012748test_array [0] = 0
12749
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755if { (ac_try="$ac_compile"
12756case "(($ac_try" in
12757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12758 *) ac_try_echo=$ac_try;;
12759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012763 grep -v '^ *+' conftest.er1 >conftest.err
12764 rm -f conftest.er1
12765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767 (exit $ac_status); } && {
12768 test -z "$ac_c_werror_flag" ||
12769 test ! -s conftest.err
12770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_lo=$ac_mid; break
12772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012774sed 's/^/| /' conftest.$ac_ext >&5
12775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776 ac_hi=`expr '(' $ac_mid ')' - 1`
12777 if test $ac_mid -le $ac_hi; then
12778 ac_lo= ac_hi=
12779 break
12780 fi
12781 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783
12784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 done
12786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012788sed 's/^/| /' conftest.$ac_ext >&5
12789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792
12793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795
12796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012797# Binary search between lo and hi bounds.
12798while test "x$ac_lo" != "x$ac_hi"; do
12799 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012807 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012812test_array [0] = 0
12813
12814 ;
12815 return 0;
12816}
12817_ACEOF
12818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819if { (ac_try="$ac_compile"
12820case "(($ac_try" in
12821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12822 *) ac_try_echo=$ac_try;;
12823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012827 grep -v '^ *+' conftest.er1 >conftest.err
12828 rm -f conftest.er1
12829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831 (exit $ac_status); } && {
12832 test -z "$ac_c_werror_flag" ||
12833 test ! -s conftest.err
12834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_hi=$ac_mid
12836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012838sed 's/^/| /' conftest.$ac_ext >&5
12839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842
12843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012844done
12845case $ac_lo in
12846?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 else
12854 ac_cv_sizeof_uintptr_t=0
12855 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012856esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* confdefs.h. */
12860_ACEOF
12861cat confdefs.h >>conftest.$ac_ext
12862cat >>conftest.$ac_ext <<_ACEOF
12863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012864$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012865 typedef uintptr_t ac__type_sizeof_;
12866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
12871main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012872{
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
12874 FILE *f = fopen ("conftest.val", "w");
12875 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 }
12884 else
12885 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012889 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893 ;
12894 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012895}
Martin v. Löwis11437992002-04-12 09:54:03 +000012896_ACEOF
12897rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898if { (ac_try="$ac_link"
12899case "(($ac_try" in
12900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12901 *) ac_try_echo=$ac_try;;
12902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 { (case "(($ac_try" in
12909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12910 *) ac_try_echo=$ac_try;;
12911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 (exit $ac_status); }; }; then
12917 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919 echo "$as_me: program exited with status $ac_status" >&5
12920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012921sed 's/^/| /' conftest.$ac_ext >&5
12922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012928See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930 else
12931 ac_cv_sizeof_uintptr_t=0
12932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934rm -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 +000012935fi
12936rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12939echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
12941
12942
Martin v. Löwis11437992002-04-12 09:54:03 +000012943cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012944#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012945_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948fi
12949
Thomas Wouters89f507f2006-12-13 04:49:30 +000012950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951{ echo "$as_me:$LINENO: checking for off_t" >&5
12952echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12953if test "${ac_cv_type_off_t+set}" = set; then
12954 echo $ECHO_N "(cached) $ECHO_C" >&6
12955else
12956 cat >conftest.$ac_ext <<_ACEOF
12957/* confdefs.h. */
12958_ACEOF
12959cat confdefs.h >>conftest.$ac_ext
12960cat >>conftest.$ac_ext <<_ACEOF
12961/* end confdefs.h. */
12962
12963#ifdef HAVE_SYS_TYPES_H
12964#include <sys/types.h>
12965#endif
12966
12967
12968typedef off_t ac__type_new_;
12969int
12970main ()
12971{
12972if ((ac__type_new_ *) 0)
12973 return 0;
12974if (sizeof (ac__type_new_))
12975 return 0;
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980rm -f conftest.$ac_objext
12981if { (ac_try="$ac_compile"
12982case "(($ac_try" in
12983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984 *) ac_try_echo=$ac_try;;
12985esac
12986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12987 (eval "$ac_compile") 2>conftest.er1
12988 ac_status=$?
12989 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1
12991 cat conftest.err >&5
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } && {
12994 test -z "$ac_c_werror_flag" ||
12995 test ! -s conftest.err
12996 } && test -s conftest.$ac_objext; then
12997 ac_cv_type_off_t=yes
12998else
12999 echo "$as_me: failed program was:" >&5
13000sed 's/^/| /' conftest.$ac_ext >&5
13001
13002 ac_cv_type_off_t=no
13003fi
13004
13005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13006fi
13007{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13008echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010# The cast to long int works around a bug in the HP C Compiler
13011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13013# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013014{ echo "$as_me:$LINENO: checking size of off_t" >&5
13015echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013017 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018else
13019 if test "$cross_compiling" = yes; then
13020 # Depending upon the size, compute the lo and hi bounds.
13021cat >conftest.$ac_ext <<_ACEOF
13022/* confdefs.h. */
13023_ACEOF
13024cat confdefs.h >>conftest.$ac_ext
13025cat >>conftest.$ac_ext <<_ACEOF
13026/* end confdefs.h. */
13027
13028#ifdef HAVE_SYS_TYPES_H
13029#include <sys/types.h>
13030#endif
13031
13032
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013033 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013034int
13035main ()
13036{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013038test_array [0] = 0
13039
13040 ;
13041 return 0;
13042}
13043_ACEOF
13044rm -f conftest.$ac_objext
13045if { (ac_try="$ac_compile"
13046case "(($ac_try" in
13047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13048 *) ac_try_echo=$ac_try;;
13049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013051 (eval "$ac_compile") 2>conftest.er1
13052 ac_status=$?
13053 grep -v '^ *+' conftest.er1 >conftest.err
13054 rm -f conftest.er1
13055 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013057 (exit $ac_status); } && {
13058 test -z "$ac_c_werror_flag" ||
13059 test ! -s conftest.err
13060 } && test -s conftest.$ac_objext; then
13061 ac_lo=0 ac_mid=0
13062 while :; do
13063 cat >conftest.$ac_ext <<_ACEOF
13064/* confdefs.h. */
13065_ACEOF
13066cat confdefs.h >>conftest.$ac_ext
13067cat >>conftest.$ac_ext <<_ACEOF
13068/* end confdefs.h. */
13069
13070#ifdef HAVE_SYS_TYPES_H
13071#include <sys/types.h>
13072#endif
13073
13074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013075 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013076int
13077main ()
13078{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013080test_array [0] = 0
13081
13082 ;
13083 return 0;
13084}
13085_ACEOF
13086rm -f conftest.$ac_objext
13087if { (ac_try="$ac_compile"
13088case "(($ac_try" in
13089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13090 *) ac_try_echo=$ac_try;;
13091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013093 (eval "$ac_compile") 2>conftest.er1
13094 ac_status=$?
13095 grep -v '^ *+' conftest.er1 >conftest.err
13096 rm -f conftest.er1
13097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013099 (exit $ac_status); } && {
13100 test -z "$ac_c_werror_flag" ||
13101 test ! -s conftest.err
13102 } && test -s conftest.$ac_objext; then
13103 ac_hi=$ac_mid; break
13104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013105 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013106sed 's/^/| /' conftest.$ac_ext >&5
13107
13108 ac_lo=`expr $ac_mid + 1`
13109 if test $ac_lo -le $ac_mid; then
13110 ac_lo= ac_hi=
13111 break
13112 fi
13113 ac_mid=`expr 2 '*' $ac_mid + 1`
13114fi
13115
13116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13117 done
13118else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013119 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120sed 's/^/| /' conftest.$ac_ext >&5
13121
13122 cat >conftest.$ac_ext <<_ACEOF
13123/* confdefs.h. */
13124_ACEOF
13125cat confdefs.h >>conftest.$ac_ext
13126cat >>conftest.$ac_ext <<_ACEOF
13127/* end confdefs.h. */
13128
13129#ifdef HAVE_SYS_TYPES_H
13130#include <sys/types.h>
13131#endif
13132
13133
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013134 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135int
13136main ()
13137{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013138static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139test_array [0] = 0
13140
13141 ;
13142 return 0;
13143}
13144_ACEOF
13145rm -f conftest.$ac_objext
13146if { (ac_try="$ac_compile"
13147case "(($ac_try" in
13148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13149 *) ac_try_echo=$ac_try;;
13150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152 (eval "$ac_compile") 2>conftest.er1
13153 ac_status=$?
13154 grep -v '^ *+' conftest.er1 >conftest.err
13155 rm -f conftest.er1
13156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158 (exit $ac_status); } && {
13159 test -z "$ac_c_werror_flag" ||
13160 test ! -s conftest.err
13161 } && test -s conftest.$ac_objext; then
13162 ac_hi=-1 ac_mid=-1
13163 while :; do
13164 cat >conftest.$ac_ext <<_ACEOF
13165/* confdefs.h. */
13166_ACEOF
13167cat confdefs.h >>conftest.$ac_ext
13168cat >>conftest.$ac_ext <<_ACEOF
13169/* end confdefs.h. */
13170
13171#ifdef HAVE_SYS_TYPES_H
13172#include <sys/types.h>
13173#endif
13174
13175
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013176 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177int
13178main ()
13179{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013181test_array [0] = 0
13182
13183 ;
13184 return 0;
13185}
13186_ACEOF
13187rm -f conftest.$ac_objext
13188if { (ac_try="$ac_compile"
13189case "(($ac_try" in
13190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13191 *) ac_try_echo=$ac_try;;
13192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013194 (eval "$ac_compile") 2>conftest.er1
13195 ac_status=$?
13196 grep -v '^ *+' conftest.er1 >conftest.err
13197 rm -f conftest.er1
13198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013200 (exit $ac_status); } && {
13201 test -z "$ac_c_werror_flag" ||
13202 test ! -s conftest.err
13203 } && test -s conftest.$ac_objext; then
13204 ac_lo=$ac_mid; break
13205else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013206 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013207sed 's/^/| /' conftest.$ac_ext >&5
13208
13209 ac_hi=`expr '(' $ac_mid ')' - 1`
13210 if test $ac_mid -le $ac_hi; then
13211 ac_lo= ac_hi=
13212 break
13213 fi
13214 ac_mid=`expr 2 '*' $ac_mid`
13215fi
13216
13217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218 done
13219else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013220 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221sed 's/^/| /' conftest.$ac_ext >&5
13222
13223 ac_lo= ac_hi=
13224fi
13225
13226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227fi
13228
13229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13230# Binary search between lo and hi bounds.
13231while test "x$ac_lo" != "x$ac_hi"; do
13232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13233 cat >conftest.$ac_ext <<_ACEOF
13234/* confdefs.h. */
13235_ACEOF
13236cat confdefs.h >>conftest.$ac_ext
13237cat >>conftest.$ac_ext <<_ACEOF
13238/* end confdefs.h. */
13239
13240#ifdef HAVE_SYS_TYPES_H
13241#include <sys/types.h>
13242#endif
13243
13244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013245 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246int
13247main ()
13248{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013249static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250test_array [0] = 0
13251
13252 ;
13253 return 0;
13254}
13255_ACEOF
13256rm -f conftest.$ac_objext
13257if { (ac_try="$ac_compile"
13258case "(($ac_try" in
13259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13260 *) ac_try_echo=$ac_try;;
13261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263 (eval "$ac_compile") 2>conftest.er1
13264 ac_status=$?
13265 grep -v '^ *+' conftest.er1 >conftest.err
13266 rm -f conftest.er1
13267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269 (exit $ac_status); } && {
13270 test -z "$ac_c_werror_flag" ||
13271 test ! -s conftest.err
13272 } && test -s conftest.$ac_objext; then
13273 ac_hi=$ac_mid
13274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013275 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276sed 's/^/| /' conftest.$ac_ext >&5
13277
13278 ac_lo=`expr '(' $ac_mid ')' + 1`
13279fi
13280
13281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282done
13283case $ac_lo in
13284?*) ac_cv_sizeof_off_t=$ac_lo;;
13285'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013290 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291 else
13292 ac_cv_sizeof_off_t=0
13293 fi ;;
13294esac
13295else
13296 cat >conftest.$ac_ext <<_ACEOF
13297/* confdefs.h. */
13298_ACEOF
13299cat confdefs.h >>conftest.$ac_ext
13300cat >>conftest.$ac_ext <<_ACEOF
13301/* end confdefs.h. */
13302
13303#ifdef HAVE_SYS_TYPES_H
13304#include <sys/types.h>
13305#endif
13306
13307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013308 typedef off_t ac__type_sizeof_;
13309static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13310static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013311#include <stdio.h>
13312#include <stdlib.h>
13313int
13314main ()
13315{
13316
13317 FILE *f = fopen ("conftest.val", "w");
13318 if (! f)
13319 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013320 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321 {
13322 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013323 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013324 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 }
13327 else
13328 {
13329 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013330 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013331 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333 }
13334 return ferror (f) || fclose (f) != 0;
13335
13336 ;
13337 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013338}
Martin v. Löwis11437992002-04-12 09:54:03 +000013339_ACEOF
13340rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341if { (ac_try="$ac_link"
13342case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351 { (case "(($ac_try" in
13352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13353 *) ac_try_echo=$ac_try;;
13354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013362 echo "$as_me: program exited with status $ac_status" >&5
13363echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013364sed 's/^/| /' conftest.$ac_ext >&5
13365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013367if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013368 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373 else
13374 ac_cv_sizeof_off_t=0
13375 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377rm -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 +000013378fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013379rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013381{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13382echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013384
13385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013387#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013388_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389
Michael W. Hudson54241132001-12-07 15:38:26 +000013390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13393echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013394if test "$have_long_long" = yes -a \
13395 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13396 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013397
Martin v. Löwis11437992002-04-12 09:54:03 +000013398cat >>confdefs.h <<\_ACEOF
13399#define HAVE_LARGEFILE_SUPPORT 1
13400_ACEOF
13401
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013402 { echo "$as_me:$LINENO: result: yes" >&5
13403echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013404else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013405 { echo "$as_me:$LINENO: result: no" >&5
13406echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013407fi
13408
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013409{ echo "$as_me:$LINENO: checking for time_t" >&5
13410echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13411if test "${ac_cv_type_time_t+set}" = set; then
13412 echo $ECHO_N "(cached) $ECHO_C" >&6
13413else
13414 cat >conftest.$ac_ext <<_ACEOF
13415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
13420
13421#ifdef HAVE_SYS_TYPES_H
13422#include <sys/types.h>
13423#endif
13424#ifdef HAVE_TIME_H
13425#include <time.h>
13426#endif
13427
13428
13429typedef time_t ac__type_new_;
13430int
13431main ()
13432{
13433if ((ac__type_new_ *) 0)
13434 return 0;
13435if (sizeof (ac__type_new_))
13436 return 0;
13437 ;
13438 return 0;
13439}
13440_ACEOF
13441rm -f conftest.$ac_objext
13442if { (ac_try="$ac_compile"
13443case "(($ac_try" in
13444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13445 *) ac_try_echo=$ac_try;;
13446esac
13447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13448 (eval "$ac_compile") 2>conftest.er1
13449 ac_status=$?
13450 grep -v '^ *+' conftest.er1 >conftest.err
13451 rm -f conftest.er1
13452 cat conftest.err >&5
13453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13454 (exit $ac_status); } && {
13455 test -z "$ac_c_werror_flag" ||
13456 test ! -s conftest.err
13457 } && test -s conftest.$ac_objext; then
13458 ac_cv_type_time_t=yes
13459else
13460 echo "$as_me: failed program was:" >&5
13461sed 's/^/| /' conftest.$ac_ext >&5
13462
13463 ac_cv_type_time_t=no
13464fi
13465
13466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13467fi
13468{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13469echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013471# The cast to long int works around a bug in the HP C Compiler
13472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13474# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013475{ echo "$as_me:$LINENO: checking size of time_t" >&5
13476echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013477if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013478 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013479else
13480 if test "$cross_compiling" = yes; then
13481 # Depending upon the size, compute the lo and hi bounds.
13482cat >conftest.$ac_ext <<_ACEOF
13483/* confdefs.h. */
13484_ACEOF
13485cat confdefs.h >>conftest.$ac_ext
13486cat >>conftest.$ac_ext <<_ACEOF
13487/* end confdefs.h. */
13488
13489#ifdef HAVE_SYS_TYPES_H
13490#include <sys/types.h>
13491#endif
13492#ifdef HAVE_TIME_H
13493#include <time.h>
13494#endif
13495
13496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013497 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013498int
13499main ()
13500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502test_array [0] = 0
13503
13504 ;
13505 return 0;
13506}
13507_ACEOF
13508rm -f conftest.$ac_objext
13509if { (ac_try="$ac_compile"
13510case "(($ac_try" in
13511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13512 *) ac_try_echo=$ac_try;;
13513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515 (eval "$ac_compile") 2>conftest.er1
13516 ac_status=$?
13517 grep -v '^ *+' conftest.er1 >conftest.err
13518 rm -f conftest.er1
13519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013521 (exit $ac_status); } && {
13522 test -z "$ac_c_werror_flag" ||
13523 test ! -s conftest.err
13524 } && test -s conftest.$ac_objext; then
13525 ac_lo=0 ac_mid=0
13526 while :; do
13527 cat >conftest.$ac_ext <<_ACEOF
13528/* confdefs.h. */
13529_ACEOF
13530cat confdefs.h >>conftest.$ac_ext
13531cat >>conftest.$ac_ext <<_ACEOF
13532/* end confdefs.h. */
13533
13534#ifdef HAVE_SYS_TYPES_H
13535#include <sys/types.h>
13536#endif
13537#ifdef HAVE_TIME_H
13538#include <time.h>
13539#endif
13540
13541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013542 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543int
13544main ()
13545{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013546static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013547test_array [0] = 0
13548
13549 ;
13550 return 0;
13551}
13552_ACEOF
13553rm -f conftest.$ac_objext
13554if { (ac_try="$ac_compile"
13555case "(($ac_try" in
13556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13557 *) ac_try_echo=$ac_try;;
13558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013560 (eval "$ac_compile") 2>conftest.er1
13561 ac_status=$?
13562 grep -v '^ *+' conftest.er1 >conftest.err
13563 rm -f conftest.er1
13564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013566 (exit $ac_status); } && {
13567 test -z "$ac_c_werror_flag" ||
13568 test ! -s conftest.err
13569 } && test -s conftest.$ac_objext; then
13570 ac_hi=$ac_mid; break
13571else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013572 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013573sed 's/^/| /' conftest.$ac_ext >&5
13574
13575 ac_lo=`expr $ac_mid + 1`
13576 if test $ac_lo -le $ac_mid; then
13577 ac_lo= ac_hi=
13578 break
13579 fi
13580 ac_mid=`expr 2 '*' $ac_mid + 1`
13581fi
13582
13583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13584 done
13585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013586 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587sed 's/^/| /' conftest.$ac_ext >&5
13588
13589 cat >conftest.$ac_ext <<_ACEOF
13590/* confdefs.h. */
13591_ACEOF
13592cat confdefs.h >>conftest.$ac_ext
13593cat >>conftest.$ac_ext <<_ACEOF
13594/* end confdefs.h. */
13595
13596#ifdef HAVE_SYS_TYPES_H
13597#include <sys/types.h>
13598#endif
13599#ifdef HAVE_TIME_H
13600#include <time.h>
13601#endif
13602
13603
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013604 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605int
13606main ()
13607{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013609test_array [0] = 0
13610
13611 ;
13612 return 0;
13613}
13614_ACEOF
13615rm -f conftest.$ac_objext
13616if { (ac_try="$ac_compile"
13617case "(($ac_try" in
13618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13619 *) ac_try_echo=$ac_try;;
13620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013622 (eval "$ac_compile") 2>conftest.er1
13623 ac_status=$?
13624 grep -v '^ *+' conftest.er1 >conftest.err
13625 rm -f conftest.er1
13626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013628 (exit $ac_status); } && {
13629 test -z "$ac_c_werror_flag" ||
13630 test ! -s conftest.err
13631 } && test -s conftest.$ac_objext; then
13632 ac_hi=-1 ac_mid=-1
13633 while :; do
13634 cat >conftest.$ac_ext <<_ACEOF
13635/* confdefs.h. */
13636_ACEOF
13637cat confdefs.h >>conftest.$ac_ext
13638cat >>conftest.$ac_ext <<_ACEOF
13639/* end confdefs.h. */
13640
13641#ifdef HAVE_SYS_TYPES_H
13642#include <sys/types.h>
13643#endif
13644#ifdef HAVE_TIME_H
13645#include <time.h>
13646#endif
13647
13648
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013649 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013650int
13651main ()
13652{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013654test_array [0] = 0
13655
13656 ;
13657 return 0;
13658}
13659_ACEOF
13660rm -f conftest.$ac_objext
13661if { (ac_try="$ac_compile"
13662case "(($ac_try" in
13663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13664 *) ac_try_echo=$ac_try;;
13665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013667 (eval "$ac_compile") 2>conftest.er1
13668 ac_status=$?
13669 grep -v '^ *+' conftest.er1 >conftest.err
13670 rm -f conftest.er1
13671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013673 (exit $ac_status); } && {
13674 test -z "$ac_c_werror_flag" ||
13675 test ! -s conftest.err
13676 } && test -s conftest.$ac_objext; then
13677 ac_lo=$ac_mid; break
13678else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013679 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013680sed 's/^/| /' conftest.$ac_ext >&5
13681
13682 ac_hi=`expr '(' $ac_mid ')' - 1`
13683 if test $ac_mid -le $ac_hi; then
13684 ac_lo= ac_hi=
13685 break
13686 fi
13687 ac_mid=`expr 2 '*' $ac_mid`
13688fi
13689
13690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13691 done
13692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013693 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694sed 's/^/| /' conftest.$ac_ext >&5
13695
13696 ac_lo= ac_hi=
13697fi
13698
13699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700fi
13701
13702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13703# Binary search between lo and hi bounds.
13704while test "x$ac_lo" != "x$ac_hi"; do
13705 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13706 cat >conftest.$ac_ext <<_ACEOF
13707/* confdefs.h. */
13708_ACEOF
13709cat confdefs.h >>conftest.$ac_ext
13710cat >>conftest.$ac_ext <<_ACEOF
13711/* end confdefs.h. */
13712
13713#ifdef HAVE_SYS_TYPES_H
13714#include <sys/types.h>
13715#endif
13716#ifdef HAVE_TIME_H
13717#include <time.h>
13718#endif
13719
13720
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013721 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722int
13723main ()
13724{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013726test_array [0] = 0
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext
13733if { (ac_try="$ac_compile"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013739 (eval "$ac_compile") 2>conftest.er1
13740 ac_status=$?
13741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
13748 } && test -s conftest.$ac_objext; then
13749 ac_hi=$ac_mid
13750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013751 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752sed 's/^/| /' conftest.$ac_ext >&5
13753
13754 ac_lo=`expr '(' $ac_mid ')' + 1`
13755fi
13756
13757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13758done
13759case $ac_lo in
13760?*) ac_cv_sizeof_time_t=$ac_lo;;
13761'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013762 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013764echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013766 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013767 else
13768 ac_cv_sizeof_time_t=0
13769 fi ;;
13770esac
13771else
13772 cat >conftest.$ac_ext <<_ACEOF
13773/* confdefs.h. */
13774_ACEOF
13775cat confdefs.h >>conftest.$ac_ext
13776cat >>conftest.$ac_ext <<_ACEOF
13777/* end confdefs.h. */
13778
13779#ifdef HAVE_SYS_TYPES_H
13780#include <sys/types.h>
13781#endif
13782#ifdef HAVE_TIME_H
13783#include <time.h>
13784#endif
13785
13786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013787 typedef time_t ac__type_sizeof_;
13788static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13789static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013790#include <stdio.h>
13791#include <stdlib.h>
13792int
13793main ()
13794{
13795
13796 FILE *f = fopen ("conftest.val", "w");
13797 if (! f)
13798 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013799 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013800 {
13801 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013802 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013803 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013804 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013805 }
13806 else
13807 {
13808 unsigned long int i = ulongval ();
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, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013812 }
13813 return ferror (f) || fclose (f) != 0;
13814
13815 ;
13816 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013817}
Martin v. Löwis11437992002-04-12 09:54:03 +000013818_ACEOF
13819rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820if { (ac_try="$ac_link"
13821case "(($ac_try" in
13822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13823 *) ac_try_echo=$ac_try;;
13824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 { (case "(($ac_try" in
13831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13832 *) ac_try_echo=$ac_try;;
13833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013839 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013841 echo "$as_me: program exited with status $ac_status" >&5
13842echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013843sed 's/^/| /' conftest.$ac_ext >&5
13844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013846if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013847 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013849echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013850See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013851 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013852 else
13853 ac_cv_sizeof_time_t=0
13854 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856rm -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 +000013857fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013858rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013860{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13861echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863
13864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013866#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013867_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013868
Michael W. Hudson54241132001-12-07 15:38:26 +000013869
13870
Trent Mick635f6fb2000-08-23 21:33:05 +000013871# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013872ac_save_cc="$CC"
13873if test "$ac_cv_kpthread" = "yes"
13874then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013875elif test "$ac_cv_kthread" = "yes"
13876then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013877elif test "$ac_cv_pthread" = "yes"
13878then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013879fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013881{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13882echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013883have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* confdefs.h. */
13886_ACEOF
13887cat confdefs.h >>conftest.$ac_ext
13888cat >>conftest.$ac_ext <<_ACEOF
13889/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013890#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013891int
13892main ()
13893{
Guido van Rossum12580492000-09-24 16:47:19 +000013894pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 ;
13896 return 0;
13897}
13898_ACEOF
13899rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900if { (ac_try="$ac_compile"
13901case "(($ac_try" in
13902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13903 *) ac_try_echo=$ac_try;;
13904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013908 grep -v '^ *+' conftest.er1 >conftest.err
13909 rm -f conftest.er1
13910 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 (exit $ac_status); } && {
13913 test -z "$ac_c_werror_flag" ||
13914 test ! -s conftest.err
13915 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013916 have_pthread_t=yes
13917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013919sed 's/^/| /' conftest.$ac_ext >&5
13920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921
Trent Mick635f6fb2000-08-23 21:33:05 +000013922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923
13924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13926echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013927if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013928 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13929echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13930if test "${ac_cv_type_pthread_t+set}" = set; then
13931 echo $ECHO_N "(cached) $ECHO_C" >&6
13932else
13933 cat >conftest.$ac_ext <<_ACEOF
13934/* confdefs.h. */
13935_ACEOF
13936cat confdefs.h >>conftest.$ac_ext
13937cat >>conftest.$ac_ext <<_ACEOF
13938/* end confdefs.h. */
13939
13940#ifdef HAVE_PTHREAD_H
13941#include <pthread.h>
13942#endif
13943
13944
13945typedef pthread_t ac__type_new_;
13946int
13947main ()
13948{
13949if ((ac__type_new_ *) 0)
13950 return 0;
13951if (sizeof (ac__type_new_))
13952 return 0;
13953 ;
13954 return 0;
13955}
13956_ACEOF
13957rm -f conftest.$ac_objext
13958if { (ac_try="$ac_compile"
13959case "(($ac_try" in
13960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13961 *) ac_try_echo=$ac_try;;
13962esac
13963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13964 (eval "$ac_compile") 2>conftest.er1
13965 ac_status=$?
13966 grep -v '^ *+' conftest.er1 >conftest.err
13967 rm -f conftest.er1
13968 cat conftest.err >&5
13969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13970 (exit $ac_status); } && {
13971 test -z "$ac_c_werror_flag" ||
13972 test ! -s conftest.err
13973 } && test -s conftest.$ac_objext; then
13974 ac_cv_type_pthread_t=yes
13975else
13976 echo "$as_me: failed program was:" >&5
13977sed 's/^/| /' conftest.$ac_ext >&5
13978
13979 ac_cv_type_pthread_t=no
13980fi
13981
13982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13983fi
13984{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13985echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13986
13987# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13990# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013991{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13992echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013993if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013994 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013995else
13996 if test "$cross_compiling" = yes; then
13997 # Depending upon the size, compute the lo and hi bounds.
13998cat >conftest.$ac_ext <<_ACEOF
13999/* confdefs.h. */
14000_ACEOF
14001cat confdefs.h >>conftest.$ac_ext
14002cat >>conftest.$ac_ext <<_ACEOF
14003/* end confdefs.h. */
14004
14005#ifdef HAVE_PTHREAD_H
14006#include <pthread.h>
14007#endif
14008
14009
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014010 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014011int
14012main ()
14013{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014015test_array [0] = 0
14016
14017 ;
14018 return 0;
14019}
14020_ACEOF
14021rm -f conftest.$ac_objext
14022if { (ac_try="$ac_compile"
14023case "(($ac_try" in
14024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14025 *) ac_try_echo=$ac_try;;
14026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014028 (eval "$ac_compile") 2>conftest.er1
14029 ac_status=$?
14030 grep -v '^ *+' conftest.er1 >conftest.err
14031 rm -f conftest.er1
14032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014034 (exit $ac_status); } && {
14035 test -z "$ac_c_werror_flag" ||
14036 test ! -s conftest.err
14037 } && test -s conftest.$ac_objext; then
14038 ac_lo=0 ac_mid=0
14039 while :; do
14040 cat >conftest.$ac_ext <<_ACEOF
14041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
14046
14047#ifdef HAVE_PTHREAD_H
14048#include <pthread.h>
14049#endif
14050
14051
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014052 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014053int
14054main ()
14055{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014057test_array [0] = 0
14058
14059 ;
14060 return 0;
14061}
14062_ACEOF
14063rm -f conftest.$ac_objext
14064if { (ac_try="$ac_compile"
14065case "(($ac_try" in
14066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14067 *) ac_try_echo=$ac_try;;
14068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014070 (eval "$ac_compile") 2>conftest.er1
14071 ac_status=$?
14072 grep -v '^ *+' conftest.er1 >conftest.err
14073 rm -f conftest.er1
14074 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014076 (exit $ac_status); } && {
14077 test -z "$ac_c_werror_flag" ||
14078 test ! -s conftest.err
14079 } && test -s conftest.$ac_objext; then
14080 ac_hi=$ac_mid; break
14081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014082 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083sed 's/^/| /' conftest.$ac_ext >&5
14084
14085 ac_lo=`expr $ac_mid + 1`
14086 if test $ac_lo -le $ac_mid; then
14087 ac_lo= ac_hi=
14088 break
14089 fi
14090 ac_mid=`expr 2 '*' $ac_mid + 1`
14091fi
14092
14093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14094 done
14095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014096 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014097sed 's/^/| /' conftest.$ac_ext >&5
14098
14099 cat >conftest.$ac_ext <<_ACEOF
14100/* confdefs.h. */
14101_ACEOF
14102cat confdefs.h >>conftest.$ac_ext
14103cat >>conftest.$ac_ext <<_ACEOF
14104/* end confdefs.h. */
14105
14106#ifdef HAVE_PTHREAD_H
14107#include <pthread.h>
14108#endif
14109
14110
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014111 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112int
14113main ()
14114{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014116test_array [0] = 0
14117
14118 ;
14119 return 0;
14120}
14121_ACEOF
14122rm -f conftest.$ac_objext
14123if { (ac_try="$ac_compile"
14124case "(($ac_try" in
14125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14126 *) ac_try_echo=$ac_try;;
14127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129 (eval "$ac_compile") 2>conftest.er1
14130 ac_status=$?
14131 grep -v '^ *+' conftest.er1 >conftest.err
14132 rm -f conftest.er1
14133 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135 (exit $ac_status); } && {
14136 test -z "$ac_c_werror_flag" ||
14137 test ! -s conftest.err
14138 } && test -s conftest.$ac_objext; then
14139 ac_hi=-1 ac_mid=-1
14140 while :; do
14141 cat >conftest.$ac_ext <<_ACEOF
14142/* confdefs.h. */
14143_ACEOF
14144cat confdefs.h >>conftest.$ac_ext
14145cat >>conftest.$ac_ext <<_ACEOF
14146/* end confdefs.h. */
14147
14148#ifdef HAVE_PTHREAD_H
14149#include <pthread.h>
14150#endif
14151
14152
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014153 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014154int
14155main ()
14156{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014158test_array [0] = 0
14159
14160 ;
14161 return 0;
14162}
14163_ACEOF
14164rm -f conftest.$ac_objext
14165if { (ac_try="$ac_compile"
14166case "(($ac_try" in
14167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14168 *) ac_try_echo=$ac_try;;
14169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014171 (eval "$ac_compile") 2>conftest.er1
14172 ac_status=$?
14173 grep -v '^ *+' conftest.er1 >conftest.err
14174 rm -f conftest.er1
14175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014177 (exit $ac_status); } && {
14178 test -z "$ac_c_werror_flag" ||
14179 test ! -s conftest.err
14180 } && test -s conftest.$ac_objext; then
14181 ac_lo=$ac_mid; break
14182else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014183 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184sed 's/^/| /' conftest.$ac_ext >&5
14185
14186 ac_hi=`expr '(' $ac_mid ')' - 1`
14187 if test $ac_mid -le $ac_hi; then
14188 ac_lo= ac_hi=
14189 break
14190 fi
14191 ac_mid=`expr 2 '*' $ac_mid`
14192fi
14193
14194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14195 done
14196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014197 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014198sed 's/^/| /' conftest.$ac_ext >&5
14199
14200 ac_lo= ac_hi=
14201fi
14202
14203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14204fi
14205
14206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14207# Binary search between lo and hi bounds.
14208while test "x$ac_lo" != "x$ac_hi"; do
14209 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14210 cat >conftest.$ac_ext <<_ACEOF
14211/* confdefs.h. */
14212_ACEOF
14213cat confdefs.h >>conftest.$ac_ext
14214cat >>conftest.$ac_ext <<_ACEOF
14215/* end confdefs.h. */
14216
14217#ifdef HAVE_PTHREAD_H
14218#include <pthread.h>
14219#endif
14220
14221
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014222 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014223int
14224main ()
14225{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014227test_array [0] = 0
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext
14234if { (ac_try="$ac_compile"
14235case "(($ac_try" in
14236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14237 *) ac_try_echo=$ac_try;;
14238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014240 (eval "$ac_compile") 2>conftest.er1
14241 ac_status=$?
14242 grep -v '^ *+' conftest.er1 >conftest.err
14243 rm -f conftest.er1
14244 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014246 (exit $ac_status); } && {
14247 test -z "$ac_c_werror_flag" ||
14248 test ! -s conftest.err
14249 } && test -s conftest.$ac_objext; then
14250 ac_hi=$ac_mid
14251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014252 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253sed 's/^/| /' conftest.$ac_ext >&5
14254
14255 ac_lo=`expr '(' $ac_mid ')' + 1`
14256fi
14257
14258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14259done
14260case $ac_lo in
14261?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14262'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014265echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014267 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014268 else
14269 ac_cv_sizeof_pthread_t=0
14270 fi ;;
14271esac
14272else
14273 cat >conftest.$ac_ext <<_ACEOF
14274/* confdefs.h. */
14275_ACEOF
14276cat confdefs.h >>conftest.$ac_ext
14277cat >>conftest.$ac_ext <<_ACEOF
14278/* end confdefs.h. */
14279
14280#ifdef HAVE_PTHREAD_H
14281#include <pthread.h>
14282#endif
14283
14284
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014285 typedef pthread_t ac__type_sizeof_;
14286static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14287static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014288#include <stdio.h>
14289#include <stdlib.h>
14290int
14291main ()
14292{
14293
14294 FILE *f = fopen ("conftest.val", "w");
14295 if (! f)
14296 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014297 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014298 {
14299 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014300 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014301 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014302 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303 }
14304 else
14305 {
14306 unsigned long int i = ulongval ();
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, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310 }
14311 return ferror (f) || fclose (f) != 0;
14312
14313 ;
14314 return 0;
14315}
Martin v. Löwis11437992002-04-12 09:54:03 +000014316_ACEOF
14317rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318if { (ac_try="$ac_link"
14319case "(($ac_try" in
14320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14321 *) ac_try_echo=$ac_try;;
14322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 { (case "(($ac_try" in
14329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14330 *) ac_try_echo=$ac_try;;
14331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014337 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339 echo "$as_me: program exited with status $ac_status" >&5
14340echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014341sed 's/^/| /' conftest.$ac_ext >&5
14342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014345 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014347echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014348See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014349 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014350 else
14351 ac_cv_sizeof_pthread_t=0
14352 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354rm -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 +000014355fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014356rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014357fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014358{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14359echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014361
14362
Martin v. Löwis11437992002-04-12 09:54:03 +000014363cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014364#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014365_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367
Trent Mick635f6fb2000-08-23 21:33:05 +000014368fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014369CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014370
Michael W. Hudson54241132001-12-07 15:38:26 +000014371
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014372case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014373 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014374 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14375 ;;
14376 Darwin/*)
14377 OTHER_LIBTOOL_OPT=""
14378 ;;
14379esac
14380
14381
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014382ARCH_RUN_32BIT=""
14383
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014384case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014385 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014386 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14387 if test "${enable_universalsdk}"; then
14388 :
14389 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014390 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014391 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014392 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014394 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014395 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14396 if test ${gcc_version} '<' 4.0
14397 then
14398 LIBTOOL_CRUFT="-lcc_dynamic"
14399 else
14400 LIBTOOL_CRUFT=""
14401 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014402 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014403 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014404else
14405 cat >conftest.$ac_ext <<_ACEOF
14406/* confdefs.h. */
14407_ACEOF
14408cat confdefs.h >>conftest.$ac_ext
14409cat >>conftest.$ac_ext <<_ACEOF
14410/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014412 #include <unistd.h>
14413 int main(int argc, char*argv[])
14414 {
14415 if (sizeof(long) == 4) {
14416 return 0;
14417 } else {
14418 return 1;
14419 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014420 }
14421
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014422_ACEOF
14423rm -f conftest$ac_exeext
14424if { (ac_try="$ac_link"
14425case "(($ac_try" in
14426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14427 *) ac_try_echo=$ac_try;;
14428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014430 (eval "$ac_link") 2>&5
14431 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14434 { (case "(($ac_try" in
14435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14436 *) ac_try_echo=$ac_try;;
14437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014439 (eval "$ac_try") 2>&5
14440 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014442 (exit $ac_status); }; }; then
14443 ac_osx_32bit=yes
14444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014445 echo "$as_me: program exited with status $ac_status" >&5
14446echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014447sed 's/^/| /' conftest.$ac_ext >&5
14448
14449( exit $ac_status )
14450ac_osx_32bit=no
14451fi
14452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14453fi
14454
14455
14456
14457 if test "${ac_osx_32bit}" = "yes"; then
14458 case `arch` in
14459 i386)
14460 MACOSX_DEFAULT_ARCH="i386"
14461 ;;
14462 ppc)
14463 MACOSX_DEFAULT_ARCH="ppc"
14464 ;;
14465 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014466 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14467echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014468 { (exit 1); exit 1; }; }
14469 ;;
14470 esac
14471 else
14472 case `arch` in
14473 i386)
14474 MACOSX_DEFAULT_ARCH="x86_64"
14475 ;;
14476 ppc)
14477 MACOSX_DEFAULT_ARCH="ppc64"
14478 ;;
14479 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014480 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14481echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014482 { (exit 1); exit 1; }; }
14483 ;;
14484 esac
14485
14486 #ARCH_RUN_32BIT="true"
14487 fi
14488
14489 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014490 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014492esac
14493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014494{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14495echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014496if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014497then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014498 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014500 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502cat >>confdefs.h <<\_ACEOF
14503#define WITH_NEXT_FRAMEWORK 1
14504_ACEOF
14505
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014506 { echo "$as_me:$LINENO: result: yes" >&5
14507echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014508 if test $enable_shared = "yes"
14509 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014510 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14511echo "$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 +000014512 { (exit 1); exit 1; }; }
14513 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014514else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014515 { echo "$as_me:$LINENO: result: no" >&5
14516echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014517fi
14518
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014519{ echo "$as_me:$LINENO: checking for dyld" >&5
14520echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014521case $ac_sys_system/$ac_sys_release in
14522 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014523
Martin v. Löwis11437992002-04-12 09:54:03 +000014524cat >>confdefs.h <<\_ACEOF
14525#define WITH_DYLD 1
14526_ACEOF
14527
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014528 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14529echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014530 ;;
14531 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014532 { echo "$as_me:$LINENO: result: no" >&5
14533echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014534 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014535esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014536
Guido van Rossum0a516c91994-09-12 10:58:40 +000014537# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014538
Michael W. Hudson54241132001-12-07 15:38:26 +000014539
14540
14541
14542
Guido van Rossum0a516c91994-09-12 10:58:40 +000014543# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014544# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014545{ echo "$as_me:$LINENO: checking SO" >&5
14546echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014547if test -z "$SO"
14548then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014549 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014550 hp*|HP*)
14551 case `uname -m` in
14552 ia64) SO=.so;;
14553 *) SO=.sl;;
14554 esac
14555 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014556 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014557 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014558 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014559else
14560 # this might also be a termcap variable, see #610332
14561 echo
14562 echo '====================================================================='
14563 echo '+ +'
14564 echo '+ WARNING: You have set SO in your environment. +'
14565 echo '+ Do you really mean to change the extension for shared libraries? +'
14566 echo '+ Continuing in 10 seconds to let you to ponder. +'
14567 echo '+ +'
14568 echo '====================================================================='
14569 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014570fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014571{ echo "$as_me:$LINENO: result: $SO" >&5
14572echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014573
Georg Brandlb1441c72009-01-03 22:33:39 +000014574
Thomas Wouters477c8d52006-05-27 19:21:47 +000014575cat >>confdefs.h <<_ACEOF
14576#define SHLIB_EXT "$SO"
14577_ACEOF
14578
Guido van Rossum0a516c91994-09-12 10:58:40 +000014579# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014580# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014581# (Shared libraries in this instance are shared modules to be loaded into
14582# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014583{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14584echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014585if test -z "$LDSHARED"
14586then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014587 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014588 AIX*)
14589 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014590 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014591 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014592 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014593 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014595 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014596 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014597 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014598 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014599 hp*|HP*)
14600 if test "$GCC" = "yes"
14601 then LDSHARED='$(CC) -shared'
14602 else LDSHARED='ld -b';
14603 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014604 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014605 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014606 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14607 if test "$enable_framework" ; then
14608 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014609 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14610 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014611 else
14612 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014613 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014614 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014615 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014616 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14617 if test "$enable_framework" ; then
14618 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014619 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14620 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014621 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014622 # No framework, use the Python app as bundle-loader
14623 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014624 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014625 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014626 Darwin/*)
14627 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14628 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014629
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014630 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014631 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014632 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014633 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014634 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014635 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14636 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014637 else
14638 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14639 if test "$enable_framework" ; then
14640 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014641 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14642 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014643 else
14644 # No framework, use the Python app as bundle-loader
14645 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14646 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14647 fi
14648 fi
14649 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014650 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014651 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014652 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014653 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014654 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014655 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014656 else
14657 LDSHARED="ld -Bshareable ${LDFLAGS}"
14658 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014659 OpenBSD*)
14660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14661 then
14662 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14663 else
14664 case `uname -r` in
14665 [01].* | 2.[0-7] | 2.[0-7].*)
14666 LDSHARED="ld -Bshareable ${LDFLAGS}"
14667 ;;
14668 *)
14669 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14670 ;;
14671 esac
14672 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014673 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014674 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014675 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014676 then LDSHARED='$(CC) -shared'
14677 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014678 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014679 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014680 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681 *) LDSHARED="ld";;
14682 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014683fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014684{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14685echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014686BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014687# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014688# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014689{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14690echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014691if test -z "$CCSHARED"
14692then
Guido van Rossum07397971997-04-29 21:49:50 +000014693 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014694 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014695 then CCSHARED="-fPIC";
14696 elif test `uname -p` = sparc;
14697 then CCSHARED="-xcode=pic32";
14698 else CCSHARED="-Kpic";
14699 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014700 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014701 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014702 else CCSHARED="+z";
14703 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014704 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014705 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014706 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014707 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014708 if test "$GCC" = "yes"
14709 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014710 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014711 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014712 SCO_SV*)
14713 if test "$GCC" = "yes"
14714 then CCSHARED="-fPIC"
14715 else CCSHARED="-Kpic -belf"
14716 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014717 IRIX*/6*) case $CC in
14718 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014719 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014720 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014721 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014722fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014723{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14724echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014725# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014726# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014727{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14728echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729if test -z "$LINKFORSHARED"
14730then
Guido van Rossum07397971997-04-29 21:49:50 +000014731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014732 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014733 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014734 LINKFORSHARED="-Wl,-E -Wl,+s";;
14735# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014736 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014737 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014738 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014740 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014741 if test "$enable_framework"
14742 then
Jack Jansenda49e192005-01-07 13:08:22 +000014743 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014744 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014745 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014746 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014747 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014748 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014749 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014750 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14751 then
14752 LINKFORSHARED="-Wl,--export-dynamic"
14753 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014754 SunOS/5*) case $CC in
14755 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014756 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014757 then
14758 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014759 fi;;
14760 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014761 CYGWIN*)
14762 if test $enable_shared = "no"
14763 then
14764 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14765 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014766 QNX*)
14767 # -Wl,-E causes the symbols to be added to the dynamic
14768 # symbol table so that they can be found when a module
14769 # is loaded. -N 2048K causes the stack size to be set
14770 # to 2048 kilobytes so that the stack doesn't overflow
14771 # when running test_compile.py.
14772 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014773 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014775{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14776echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014777
Michael W. Hudson54241132001-12-07 15:38:26 +000014778
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014779
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014780{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14781echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014782if test ! "$LIBRARY" = "$LDLIBRARY"
14783then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014784 case $ac_sys_system in
14785 CYGWIN*)
14786 # Cygwin needs CCSHARED when building extension DLLs
14787 # but not when building the interpreter DLL.
14788 CFLAGSFORSHARED='';;
14789 *)
14790 CFLAGSFORSHARED='$(CCSHARED)'
14791 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014792fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014793{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14794echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014795
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014796# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14797# library (with --enable-shared).
14798# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014799# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14800# if it is not required, since it creates a dependency of the shared library
14801# to LIBS. This, in turn, means that applications linking the shared libpython
14802# don't need to link LIBS explicitly. The default should be only changed
14803# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014805{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14806echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014807case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014809 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014811{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14812echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014813
14814
Guido van Rossum627b2d71993-12-24 10:39:16 +000014815# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014817{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14818echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014819if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014821else
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014823LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* confdefs.h. */
14826_ACEOF
14827cat confdefs.h >>conftest.$ac_ext
14828cat >>conftest.$ac_ext <<_ACEOF
14829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831/* Override any GCC internal prototype to avoid an error.
14832 Use char because int might match the return type of a GCC
14833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014834#ifdef __cplusplus
14835extern "C"
14836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014837char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014838int
14839main ()
14840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ;
14843 return 0;
14844}
14845_ACEOF
14846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847if { (ac_try="$ac_link"
14848case "(($ac_try" in
14849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14850 *) ac_try_echo=$ac_try;;
14851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014855 grep -v '^ *+' conftest.er1 >conftest.err
14856 rm -f conftest.er1
14857 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 (exit $ac_status); } && {
14860 test -z "$ac_c_werror_flag" ||
14861 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014862 } && test -s conftest$ac_exeext &&
14863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014867sed 's/^/| /' conftest.$ac_ext >&5
14868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871
14872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014876{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14877echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14878if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 cat >>confdefs.h <<_ACEOF
14880#define HAVE_LIBDL 1
14881_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014883 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014885fi
14886 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014888{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14889echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014890if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014892else
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014894LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014896/* confdefs.h. */
14897_ACEOF
14898cat confdefs.h >>conftest.$ac_ext
14899cat >>conftest.$ac_ext <<_ACEOF
14900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902/* Override any GCC internal prototype to avoid an error.
14903 Use char because int might match the return type of a GCC
14904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014905#ifdef __cplusplus
14906extern "C"
14907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014908char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014909int
14910main ()
14911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ;
14914 return 0;
14915}
14916_ACEOF
14917rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918if { (ac_try="$ac_link"
14919case "(($ac_try" in
14920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14921 *) ac_try_echo=$ac_try;;
14922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014926 grep -v '^ *+' conftest.er1 >conftest.err
14927 rm -f conftest.er1
14928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 (exit $ac_status); } && {
14931 test -z "$ac_c_werror_flag" ||
14932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014933 } && test -s conftest$ac_exeext &&
14934 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014938sed 's/^/| /' conftest.$ac_ext >&5
14939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942
14943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014945LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014947{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14948echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14949if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 cat >>confdefs.h <<_ACEOF
14951#define HAVE_LIBDLD 1
14952_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014954 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956fi
14957 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014958
Georg Brandlb1441c72009-01-03 22:33:39 +000014959# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014960if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014961 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14962echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014963if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014965else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014966 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014968/* confdefs.h. */
14969_ACEOF
14970cat confdefs.h >>conftest.$ac_ext
14971cat >>conftest.$ac_ext <<_ACEOF
14972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974/* Override any GCC internal prototype to avoid an error.
14975 Use char because int might match the return type of a GCC
14976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977#ifdef __cplusplus
14978extern "C"
14979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014980char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014981int
14982main ()
14983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ;
14986 return 0;
14987}
14988_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989for ac_lib in '' pthread rt posix4; do
14990 if test -z "$ac_lib"; then
14991 ac_res="none required"
14992 else
14993 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 fi
14996 rm -f conftest.$ac_objext conftest$ac_exeext
14997if { (ac_try="$ac_link"
14998case "(($ac_try" in
14999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15000 *) ac_try_echo=$ac_try;;
15001esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015004 ac_status=$?
15005 grep -v '^ *+' conftest.er1 >conftest.err
15006 rm -f conftest.er1
15007 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009 (exit $ac_status); } && {
15010 test -z "$ac_c_werror_flag" ||
15011 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015012 } && test -s conftest$ac_exeext &&
15013 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015015else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015016 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015017sed 's/^/| /' conftest.$ac_ext >&5
15018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019
Thomas Wouters477c8d52006-05-27 19:21:47 +000015020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021
15022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15023 conftest$ac_exeext
15024 if test "${ac_cv_search_sem_init+set}" = set; then
15025 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027done
15028if test "${ac_cv_search_sem_init+set}" = set; then
15029 :
15030else
15031 ac_cv_search_sem_init=no
15032fi
15033rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015034LIBS=$ac_func_search_save_LIBS
15035fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015036{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15037echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038ac_res=$ac_cv_search_sem_init
15039if test "$ac_res" != no; then
15040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015041
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015042fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015043 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015044 # posix4 on Solaris 2.6
15045 # pthread (first!) on Linux
15046fi
15047
Martin v. Löwis19d17342003-06-14 21:03:05 +000015048# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015049{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15050echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015051if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015052 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015053else
15054 ac_check_lib_save_LIBS=$LIBS
15055LIBS="-lintl $LIBS"
15056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015057/* confdefs.h. */
15058_ACEOF
15059cat confdefs.h >>conftest.$ac_ext
15060cat >>conftest.$ac_ext <<_ACEOF
15061/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063/* Override any GCC internal prototype to avoid an error.
15064 Use char because int might match the return type of a GCC
15065 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015066#ifdef __cplusplus
15067extern "C"
15068#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015069char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015070int
15071main ()
15072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015074 ;
15075 return 0;
15076}
15077_ACEOF
15078rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079if { (ac_try="$ac_link"
15080case "(($ac_try" in
15081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15082 *) ac_try_echo=$ac_try;;
15083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015087 grep -v '^ *+' conftest.er1 >conftest.err
15088 rm -f conftest.er1
15089 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091 (exit $ac_status); } && {
15092 test -z "$ac_c_werror_flag" ||
15093 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015094 } && test -s conftest$ac_exeext &&
15095 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015096 ac_cv_lib_intl_textdomain=yes
15097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015099sed 's/^/| /' conftest.$ac_ext >&5
15100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103
15104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015106LIBS=$ac_check_lib_save_LIBS
15107fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015108{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15109echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15110if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015111
15112cat >>confdefs.h <<\_ACEOF
15113#define WITH_LIBINTL 1
15114_ACEOF
15115
Brett Cannonc6d936e2009-06-07 20:09:53 +000015116 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015117fi
15118
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015119
15120# checks for system dependent C++ extensions support
15121case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015122 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15123echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015125/* confdefs.h. */
15126_ACEOF
15127cat confdefs.h >>conftest.$ac_ext
15128cat >>conftest.$ac_ext <<_ACEOF
15129/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015130#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015131int
15132main ()
15133{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015134loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 ;
15136 return 0;
15137}
15138_ACEOF
15139rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140if { (ac_try="$ac_link"
15141case "(($ac_try" in
15142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15143 *) ac_try_echo=$ac_try;;
15144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015148 grep -v '^ *+' conftest.er1 >conftest.err
15149 rm -f conftest.er1
15150 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 (exit $ac_status); } && {
15153 test -z "$ac_c_werror_flag" ||
15154 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015155 } && test -s conftest$ac_exeext &&
15156 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015157
Martin v. Löwis11437992002-04-12 09:54:03 +000015158cat >>confdefs.h <<\_ACEOF
15159#define AIX_GENUINE_CPLUSPLUS 1
15160_ACEOF
15161
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015162 { echo "$as_me:$LINENO: result: yes" >&5
15163echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015164else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015166sed 's/^/| /' conftest.$ac_ext >&5
15167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015168 { echo "$as_me:$LINENO: result: no" >&5
15169echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171
15172rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015173 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015174 *) ;;
15175esac
15176
Guido van Rossum70c7f481998-03-26 18:44:10 +000015177# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015178{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15179echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015180if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015182else
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015184LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192/* Override any GCC internal prototype to avoid an error.
15193 Use char because int might match the return type of a GCC
15194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015195#ifdef __cplusplus
15196extern "C"
15197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015198char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015199int
15200main ()
15201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;
15204 return 0;
15205}
15206_ACEOF
15207rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208if { (ac_try="$ac_link"
15209case "(($ac_try" in
15210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15211 *) ac_try_echo=$ac_try;;
15212esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015216 grep -v '^ *+' conftest.er1 >conftest.err
15217 rm -f conftest.er1
15218 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220 (exit $ac_status); } && {
15221 test -z "$ac_c_werror_flag" ||
15222 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015223 } && test -s conftest$ac_exeext &&
15224 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015228sed 's/^/| /' conftest.$ac_ext >&5
15229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232
15233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015237{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15238echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15239if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015240 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015242 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015243{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15244echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015245if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247else
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015249LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015251/* confdefs.h. */
15252_ACEOF
15253cat confdefs.h >>conftest.$ac_ext
15254cat >>conftest.$ac_ext <<_ACEOF
15255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257/* Override any GCC internal prototype to avoid an error.
15258 Use char because int might match the return type of a GCC
15259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015260#ifdef __cplusplus
15261extern "C"
15262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015263char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015264int
15265main ()
15266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 ;
15269 return 0;
15270}
15271_ACEOF
15272rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273if { (ac_try="$ac_link"
15274case "(($ac_try" in
15275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15276 *) ac_try_echo=$ac_try;;
15277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015281 grep -v '^ *+' conftest.er1 >conftest.err
15282 rm -f conftest.er1
15283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285 (exit $ac_status); } && {
15286 test -z "$ac_c_werror_flag" ||
15287 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015288 } && test -s conftest$ac_exeext &&
15289 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015293sed 's/^/| /' conftest.$ac_ext >&5
15294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297
15298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015300LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015302{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15303echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15304if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015305 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015306fi
15307 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015309{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15310echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015313if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015315{ echo "$as_me:$LINENO: result: $withval" >&5
15316echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015317LIBS="$withval $LIBS"
15318
15319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320 { echo "$as_me:$LINENO: result: no" >&5
15321echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322fi
15323
Guido van Rossum7f43da71994-08-01 12:15:30 +000015324
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015325# Check for use of the system expat library
15326{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15327echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15328
15329# Check whether --with-system_expat was given.
15330if test "${with_system_expat+set}" = set; then
15331 withval=$with_system_expat;
15332fi
15333
15334
15335{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15336echo "${ECHO_T}$with_system_expat" >&6; }
15337
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015339{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15340echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015343if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344 withval=$with_system_ffi;
15345fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015346
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015347
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015348{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15349echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015350
Matthias Klose55708cc2009-04-30 08:06:49 +000015351# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015352{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15353echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015354
15355# Check whether --with-dbmliborder was given.
15356if test "${with_dbmliborder+set}" = set; then
15357 withval=$with_dbmliborder;
15358if test x$with_dbmliborder = xyes
15359then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15361echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015362 { (exit 1); exit 1; }; }
15363else
15364 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15365 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15366 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015367 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15368echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015369 { (exit 1); exit 1; }; }
15370 fi
15371 done
15372fi
15373fi
15374
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015375{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15376echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015377
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015378# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015379
15380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015381{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15382echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015385if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386 withval=$with_signal_module;
15387fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015388
15389
15390if test -z "$with_signal_module"
15391then with_signal_module="yes"
15392fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015393{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15394echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015395
15396if test "${with_signal_module}" = "yes"; then
15397 USE_SIGNAL_MODULE=""
15398 SIGNAL_OBJS=""
15399else
15400 USE_SIGNAL_MODULE="#"
15401 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15402fi
15403
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015404# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015405
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015406USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015407
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015408{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15409echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Guido van Rossumec2f0731997-01-22 20:54:01 +000015411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015413if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015414 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015415{ echo "$as_me:$LINENO: result: $withval" >&5
15416echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015417LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015418if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015419 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015420fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015422 { echo "$as_me:$LINENO: result: no" >&5
15423echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424fi
15425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
15427# Templates for things AC_DEFINEd more than once.
15428# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015429
15430
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432
15433
15434
15435
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015436{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15437echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015440if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441 withval=$with_threads;
15442fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015443
15444
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015445# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015448if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449 withval=$with_thread; with_threads=$with_thread
15450fi
15451
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015452
15453if test -z "$with_threads"
15454then with_threads="yes"
15455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015456{ echo "$as_me:$LINENO: result: $with_threads" >&5
15457echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015458
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015459
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015460if test "$with_threads" = "no"
15461then
15462 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015463elif test "$ac_cv_pthread_is_default" = yes
15464then
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015466#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015467_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015468
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015469 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015471#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015473
15474 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015476elif test "$ac_cv_kpthread" = "yes"
15477then
15478 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015479 if test "$ac_cv_cxx_thread" = "yes"; then
15480 CXX="$CXX -Kpthread"
15481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015484_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015486 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015487 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015488elif test "$ac_cv_kthread" = "yes"
15489then
15490 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015491 if test "$ac_cv_cxx_thread" = "yes"; then
15492 CXX="$CXX -Kthread"
15493 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015494 cat >>confdefs.h <<\_ACEOF
15495#define WITH_THREAD 1
15496_ACEOF
15497
15498 posix_threads=yes
15499 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015500elif test "$ac_cv_pthread" = "yes"
15501then
15502 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015503 if test "$ac_cv_cxx_thread" = "yes"; then
15504 CXX="$CXX -pthread"
15505 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015506 cat >>confdefs.h <<\_ACEOF
15507#define WITH_THREAD 1
15508_ACEOF
15509
15510 posix_threads=yes
15511 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015512else
15513 if test ! -z "$with_threads" -a -d "$with_threads"
15514 then LDFLAGS="$LDFLAGS -L$with_threads"
15515 fi
15516 if test ! -z "$withval" -a -d "$withval"
15517 then LDFLAGS="$LDFLAGS -L$withval"
15518 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015519
15520 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015521 # define _POSIX_THREADS in unistd.h. Some apparently don't
15522 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015523 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15524echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015526/* confdefs.h. */
15527_ACEOF
15528cat confdefs.h >>conftest.$ac_ext
15529cat >>conftest.$ac_ext <<_ACEOF
15530/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015531
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015532#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015533#ifdef _POSIX_THREADS
15534yes
15535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
15537_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015539 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015540 unistd_defines_pthreads=yes
15541else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015542 unistd_defines_pthreads=no
15543fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015544rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015546 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15547echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015548
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015550#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015554 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15555echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015556if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015558fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015559{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15560echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015561else
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015563{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15564echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015566/* confdefs.h. */
15567_ACEOF
15568cat confdefs.h >>conftest.$ac_ext
15569cat >>conftest.$ac_ext <<_ACEOF
15570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015571$ac_includes_default
15572#include <cthreads.h>
15573_ACEOF
15574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575if { (ac_try="$ac_compile"
15576case "(($ac_try" in
15577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15578 *) ac_try_echo=$ac_try;;
15579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015583 grep -v '^ *+' conftest.er1 >conftest.err
15584 rm -f conftest.er1
15585 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587 (exit $ac_status); } && {
15588 test -z "$ac_c_werror_flag" ||
15589 test ! -s conftest.err
15590 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_header_compiler=yes
15592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015594sed 's/^/| /' conftest.$ac_ext >&5
15595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598
15599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015600{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15601echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015604{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15605echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015612#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015613_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614if { (ac_try="$ac_cpp conftest.$ac_ext"
15615case "(($ac_try" in
15616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15617 *) ac_try_echo=$ac_try;;
15618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015622 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 rm -f conftest.er1
15624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626 (exit $ac_status); } >/dev/null && {
15627 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15628 test ! -s conftest.err
15629 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 ac_header_preproc=yes
15631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015633sed 's/^/| /' conftest.$ac_ext >&5
15634
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015639{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15640echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
15642# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15644 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015645 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15646echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15647 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15648echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015649 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015650 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015651 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015652 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15653echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15654 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15655echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15656 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15657echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15658 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15659echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15660 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15661echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15662 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15663echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015665## -------------------------------------- ##
15666## Report this to http://bugs.python.org/ ##
15667## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015668_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015670 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015672{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15673echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015674if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015676else
15677 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015679{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15680echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
15682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015683if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015684 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015685#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015686_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015689#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015690_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015691
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
15693cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015694#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015695_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015696
15697 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015698 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015699else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015700
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015702 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15703echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015704if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015705 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015706fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015707{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15708echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015709else
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015711{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15712echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015714/* confdefs.h. */
15715_ACEOF
15716cat confdefs.h >>conftest.$ac_ext
15717cat >>conftest.$ac_ext <<_ACEOF
15718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015719$ac_includes_default
15720#include <mach/cthreads.h>
15721_ACEOF
15722rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723if { (ac_try="$ac_compile"
15724case "(($ac_try" in
15725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15726 *) ac_try_echo=$ac_try;;
15727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015731 grep -v '^ *+' conftest.er1 >conftest.err
15732 rm -f conftest.er1
15733 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735 (exit $ac_status); } && {
15736 test -z "$ac_c_werror_flag" ||
15737 test ! -s conftest.err
15738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ac_header_compiler=yes
15740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015742sed 's/^/| /' conftest.$ac_ext >&5
15743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746
15747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015748{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15749echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015750
15751# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015752{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15753echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015755/* confdefs.h. */
15756_ACEOF
15757cat confdefs.h >>conftest.$ac_ext
15758cat >>conftest.$ac_ext <<_ACEOF
15759/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015760#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762if { (ac_try="$ac_cpp conftest.$ac_ext"
15763case "(($ac_try" in
15764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765 *) ac_try_echo=$ac_try;;
15766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015770 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 rm -f conftest.er1
15772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774 (exit $ac_status); } >/dev/null && {
15775 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15776 test ! -s conftest.err
15777 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 ac_header_preproc=yes
15779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015781sed 's/^/| /' conftest.$ac_ext >&5
15782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015787{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15788echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015789
15790# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015791case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15792 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015793 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15794echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15795 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15796echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015797 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015798 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015799 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015800 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15801echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15802 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15803echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15804 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15805echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15806 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15807echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15808 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15809echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15810 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15811echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015813## -------------------------------------- ##
15814## Report this to http://bugs.python.org/ ##
15815## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015816_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015818 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15821echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015822if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015823 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015824else
15825 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015826fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15828echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015831if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015833#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015834_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015835
Martin v. Löwis11437992002-04-12 09:54:03 +000015836 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015837#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015838_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015839
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
15841cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015842#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015844
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015845 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015846else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015847
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015848 # Just looking for pthread_create in libpthread is not enough:
15849 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15850 # So we really have to include pthread.h, and then link.
15851 _libs=$LIBS
15852 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015853 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15854echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015856/* confdefs.h. */
15857_ACEOF
15858cat confdefs.h >>conftest.$ac_ext
15859cat >>conftest.$ac_ext <<_ACEOF
15860/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015861#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015862
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015863void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015864int
15865main ()
15866{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015867
15868pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874if { (ac_try="$ac_link"
15875case "(($ac_try" in
15876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15877 *) ac_try_echo=$ac_try;;
15878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882 grep -v '^ *+' conftest.er1 >conftest.err
15883 rm -f conftest.er1
15884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 (exit $ac_status); } && {
15887 test -z "$ac_c_werror_flag" ||
15888 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 } && test -s conftest$ac_exeext &&
15890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015892 { echo "$as_me:$LINENO: result: yes" >&5
15893echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015895#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015896_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015897
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015898 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015899 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015902sed 's/^/| /' conftest.$ac_ext >&5
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015905 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015906 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15907echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015908if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015910else
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015912/* confdefs.h. */
15913_ACEOF
15914cat confdefs.h >>conftest.$ac_ext
15915cat >>conftest.$ac_ext <<_ACEOF
15916/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015917/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15918 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15919#define pthread_detach innocuous_pthread_detach
15920
Guido van Rossumad678af1998-10-02 14:42:15 +000015921/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015922 which can conflict with char pthread_detach (); below.
15923 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015924 <limits.h> exists even on freestanding compilers. */
15925
15926#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015927# include <limits.h>
15928#else
15929# include <assert.h>
15930#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015931
15932#undef pthread_detach
15933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934/* Override any GCC internal prototype to avoid an error.
15935 Use char because int might match the return type of a GCC
15936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015937#ifdef __cplusplus
15938extern "C"
15939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015940char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015941/* The GNU C library defines this for functions which it implements
15942 to always fail with ENOSYS. Some functions are actually named
15943 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015944#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015945choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015946#endif
15947
Skip Montanaro6dead952003-09-25 14:50:04 +000015948int
15949main ()
15950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ;
15953 return 0;
15954}
15955_ACEOF
15956rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957if { (ac_try="$ac_link"
15958case "(($ac_try" in
15959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15960 *) ac_try_echo=$ac_try;;
15961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015965 grep -v '^ *+' conftest.er1 >conftest.err
15966 rm -f conftest.er1
15967 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969 (exit $ac_status); } && {
15970 test -z "$ac_c_werror_flag" ||
15971 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015972 } && test -s conftest$ac_exeext &&
15973 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015977sed 's/^/| /' conftest.$ac_ext >&5
15978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981
15982rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015983 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015984fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015985{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15986echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15987if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015989#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015990_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015991
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015992 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015993 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015994else
Guido van Rossumad678af1998-10-02 14:42:15 +000015995
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015996 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15997echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015998if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016000else
Martin v. Löwis11437992002-04-12 09:54:03 +000016001 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016002LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016004/* confdefs.h. */
16005_ACEOF
16006cat confdefs.h >>conftest.$ac_ext
16007cat >>conftest.$ac_ext <<_ACEOF
16008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010/* Override any GCC internal prototype to avoid an error.
16011 Use char because int might match the return type of a GCC
16012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016013#ifdef __cplusplus
16014extern "C"
16015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016016char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016017int
16018main ()
16019{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ;
16022 return 0;
16023}
16024_ACEOF
16025rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026if { (ac_try="$ac_link"
16027case "(($ac_try" in
16028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16029 *) ac_try_echo=$ac_try;;
16030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016034 grep -v '^ *+' conftest.er1 >conftest.err
16035 rm -f conftest.er1
16036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038 (exit $ac_status); } && {
16039 test -z "$ac_c_werror_flag" ||
16040 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016041 } && test -s conftest$ac_exeext &&
16042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016046sed 's/^/| /' conftest.$ac_ext >&5
16047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050
16051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016053LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016055{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16056echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16057if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016059#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016060_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016062 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016063 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016064 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016065else
Greg Steinadf63d62000-07-05 10:38:09 +000016066
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016067 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16068echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016069if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016070 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016071else
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016073LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016075/* confdefs.h. */
16076_ACEOF
16077cat confdefs.h >>conftest.$ac_ext
16078cat >>conftest.$ac_ext <<_ACEOF
16079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081/* Override any GCC internal prototype to avoid an error.
16082 Use char because int might match the return type of a GCC
16083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016084#ifdef __cplusplus
16085extern "C"
16086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016087char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016088int
16089main ()
16090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ;
16093 return 0;
16094}
16095_ACEOF
16096rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097if { (ac_try="$ac_link"
16098case "(($ac_try" in
16099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16100 *) ac_try_echo=$ac_try;;
16101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016105 grep -v '^ *+' conftest.er1 >conftest.err
16106 rm -f conftest.er1
16107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109 (exit $ac_status); } && {
16110 test -z "$ac_c_werror_flag" ||
16111 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016112 } && test -s conftest$ac_exeext &&
16113 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016117sed 's/^/| /' conftest.$ac_ext >&5
16118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121
16122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016124LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016125fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16127echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16128if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016130#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016131_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016133 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016134 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016135 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016136else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016137
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016138 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16139echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016140if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016142else
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016144LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016146/* confdefs.h. */
16147_ACEOF
16148cat confdefs.h >>conftest.$ac_ext
16149cat >>conftest.$ac_ext <<_ACEOF
16150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152/* Override any GCC internal prototype to avoid an error.
16153 Use char because int might match the return type of a GCC
16154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016155#ifdef __cplusplus
16156extern "C"
16157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016158char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016159int
16160main ()
16161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ;
16164 return 0;
16165}
16166_ACEOF
16167rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168if { (ac_try="$ac_link"
16169case "(($ac_try" in
16170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16171 *) ac_try_echo=$ac_try;;
16172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016176 grep -v '^ *+' conftest.er1 >conftest.err
16177 rm -f conftest.er1
16178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 (exit $ac_status); } && {
16181 test -z "$ac_c_werror_flag" ||
16182 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016183 } && test -s conftest$ac_exeext &&
16184 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016186else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016188sed 's/^/| /' conftest.$ac_ext >&5
16189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192
16193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016195LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016197{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16198echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16199if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016201#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016202_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016203
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016204 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016205 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016206 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016207else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016208
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016209 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16210echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016211if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016213else
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016215LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016217/* confdefs.h. */
16218_ACEOF
16219cat confdefs.h >>conftest.$ac_ext
16220cat >>conftest.$ac_ext <<_ACEOF
16221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223/* Override any GCC internal prototype to avoid an error.
16224 Use char because int might match the return type of a GCC
16225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016226#ifdef __cplusplus
16227extern "C"
16228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016229char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016230int
16231main ()
16232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ;
16235 return 0;
16236}
16237_ACEOF
16238rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239if { (ac_try="$ac_link"
16240case "(($ac_try" in
16241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16242 *) ac_try_echo=$ac_try;;
16243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016247 grep -v '^ *+' conftest.er1 >conftest.err
16248 rm -f conftest.er1
16249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 (exit $ac_status); } && {
16252 test -z "$ac_c_werror_flag" ||
16253 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016254 } && test -s conftest$ac_exeext &&
16255 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016259sed 's/^/| /' conftest.$ac_ext >&5
16260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263
16264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016266LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016267fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016268{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16269echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16270if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016271 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016273_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016275 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016276 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016277 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016278else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016279
Martin v. Löwis130fb172001-07-19 11:00:41 +000016280 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016281fi
16282
Guido van Rossum627b2d71993-12-24 10:39:16 +000016283
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016284fi
16285
Guido van Rossum0be3e491997-05-22 20:33:33 +000016286fi
16287
Guido van Rossum49545951997-12-02 19:28:29 +000016288fi
16289
Guido van Rossumb93a8621998-05-07 13:27:32 +000016290fi
16291
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293
16294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296fi
16297
Martin v. Löwis11437992002-04-12 09:54:03 +000016298
16299fi
16300
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016301
Michael W. Hudson54241132001-12-07 15:38:26 +000016302
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016303 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16304echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016305if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016307else
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016309LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016311/* confdefs.h. */
16312_ACEOF
16313cat confdefs.h >>conftest.$ac_ext
16314cat >>conftest.$ac_ext <<_ACEOF
16315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317/* Override any GCC internal prototype to avoid an error.
16318 Use char because int might match the return type of a GCC
16319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016320#ifdef __cplusplus
16321extern "C"
16322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016323char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016324int
16325main ()
16326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ;
16329 return 0;
16330}
16331_ACEOF
16332rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333if { (ac_try="$ac_link"
16334case "(($ac_try" in
16335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16336 *) ac_try_echo=$ac_try;;
16337esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016341 grep -v '^ *+' conftest.er1 >conftest.err
16342 rm -f conftest.er1
16343 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345 (exit $ac_status); } && {
16346 test -z "$ac_c_werror_flag" ||
16347 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016348 } && test -s conftest$ac_exeext &&
16349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016353sed 's/^/| /' conftest.$ac_ext >&5
16354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357
16358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016360LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016361fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016362{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16363echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16364if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016366#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016367_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016368
Martin v. Löwis130fb172001-07-19 11:00:41 +000016369 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016370 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016371 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016372fi
16373
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016374
Neal Norwitza978ab02002-11-02 16:58:05 +000016375 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016376 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16377echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016378if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016380else
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016382LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016384/* confdefs.h. */
16385_ACEOF
16386cat confdefs.h >>conftest.$ac_ext
16387cat >>conftest.$ac_ext <<_ACEOF
16388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390/* Override any GCC internal prototype to avoid an error.
16391 Use char because int might match the return type of a GCC
16392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016393#ifdef __cplusplus
16394extern "C"
16395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016396char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016397int
16398main ()
16399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ;
16402 return 0;
16403}
16404_ACEOF
16405rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406if { (ac_try="$ac_link"
16407case "(($ac_try" in
16408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16409 *) ac_try_echo=$ac_try;;
16410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016414 grep -v '^ *+' conftest.er1 >conftest.err
16415 rm -f conftest.er1
16416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418 (exit $ac_status); } && {
16419 test -z "$ac_c_werror_flag" ||
16420 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016421 } && test -s conftest$ac_exeext &&
16422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016426sed 's/^/| /' conftest.$ac_ext >&5
16427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430
16431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016434fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016435{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16436echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16437if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016441
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016442 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016443 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016445fi
16446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016447 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016448
Martin v. Löwis130fb172001-07-19 11:00:41 +000016449 if test "$USE_THREAD_MODULE" != "#"
16450 then
16451 # If the above checks didn't disable threads, (at least) OSF1
16452 # needs this '-threads' argument during linking.
16453 case $ac_sys_system in
16454 OSF1) LDLAST=-threads;;
16455 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016456 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016457fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016458
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016459if test "$posix_threads" = "yes"; then
16460 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016461
16462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016463#define _POSIX_THREADS 1
16464_ACEOF
16465
16466 fi
16467
16468 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16469 case $ac_sys_system/$ac_sys_release in
16470 SunOS/5.6)
16471cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016472#define HAVE_PTHREAD_DESTRUCTOR 1
16473_ACEOF
16474
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016475 ;;
16476 SunOS/5.8)
16477cat >>confdefs.h <<\_ACEOF
16478#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16479_ACEOF
16480
16481 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016482 AIX/5)
16483cat >>confdefs.h <<\_ACEOF
16484#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16485_ACEOF
16486
16487 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016488 esac
16489
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016490 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16491echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016492 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016494else
16495 if test "$cross_compiling" = yes; then
16496 ac_cv_pthread_system_supported=no
16497else
16498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016499/* confdefs.h. */
16500_ACEOF
16501cat confdefs.h >>conftest.$ac_ext
16502cat >>conftest.$ac_ext <<_ACEOF
16503/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016504#include <pthread.h>
16505 void *foo(void *parm) {
16506 return NULL;
16507 }
16508 main() {
16509 pthread_attr_t attr;
16510 pthread_t id;
16511 if (pthread_attr_init(&attr)) exit(-1);
16512 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16513 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16514 exit(0);
16515 }
16516_ACEOF
16517rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518if { (ac_try="$ac_link"
16519case "(($ac_try" in
16520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16521 *) ac_try_echo=$ac_try;;
16522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016525 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 { (case "(($ac_try" in
16529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16530 *) ac_try_echo=$ac_try;;
16531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016534 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016536 (exit $ac_status); }; }; then
16537 ac_cv_pthread_system_supported=yes
16538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016539 echo "$as_me: program exited with status $ac_status" >&5
16540echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016541sed 's/^/| /' conftest.$ac_ext >&5
16542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016543( exit $ac_status )
16544ac_cv_pthread_system_supported=no
16545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546rm -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 +000016547fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549
16550
Guido van Rossum627b2d71993-12-24 10:39:16 +000016551fi
16552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016553 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16554echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016555 if test "$ac_cv_pthread_system_supported" = "yes"; then
16556
16557cat >>confdefs.h <<\_ACEOF
16558#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16559_ACEOF
16560
16561 fi
16562
16563for ac_func in pthread_sigmask
16564do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016565as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16566{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16567echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016570else
16571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016572/* confdefs.h. */
16573_ACEOF
16574cat confdefs.h >>conftest.$ac_ext
16575cat >>conftest.$ac_ext <<_ACEOF
16576/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016577/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16579#define $ac_func innocuous_$ac_func
16580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016582 which can conflict with char $ac_func (); below.
16583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016584 <limits.h> exists even on freestanding compilers. */
16585
16586#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016587# include <limits.h>
16588#else
16589# include <assert.h>
16590#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016591
16592#undef $ac_func
16593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594/* Override any GCC internal prototype to avoid an error.
16595 Use char because int might match the return type of a GCC
16596 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016597#ifdef __cplusplus
16598extern "C"
16599#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016600char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016601/* The GNU C library defines this for functions which it implements
16602 to always fail with ENOSYS. Some functions are actually named
16603 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016605choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016606#endif
16607
Skip Montanaro6dead952003-09-25 14:50:04 +000016608int
16609main ()
16610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016612 ;
16613 return 0;
16614}
16615_ACEOF
16616rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617if { (ac_try="$ac_link"
16618case "(($ac_try" in
16619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16620 *) ac_try_echo=$ac_try;;
16621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016625 grep -v '^ *+' conftest.er1 >conftest.err
16626 rm -f conftest.er1
16627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 (exit $ac_status); } && {
16630 test -z "$ac_c_werror_flag" ||
16631 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016632 } && test -s conftest$ac_exeext &&
16633 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016634 eval "$as_ac_var=yes"
16635else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016637sed 's/^/| /' conftest.$ac_ext >&5
16638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641
16642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016644fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016645ac_res=`eval echo '${'$as_ac_var'}'`
16646 { echo "$as_me:$LINENO: result: $ac_res" >&5
16647echo "${ECHO_T}$ac_res" >&6; }
16648if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016650#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016651_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016652 case $ac_sys_system in
16653 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016654
Jason Tishlerfac083d2003-07-22 15:20:49 +000016655cat >>confdefs.h <<\_ACEOF
16656#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16657_ACEOF
16658
16659 ;;
16660 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016661fi
16662done
16663
16664fi
16665
16666
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016667# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016668
16669
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016670{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16671echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016673if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016675 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016676 { echo "$as_me:$LINENO: result: no" >&5
16677echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016678 ipv6=no
16679 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016680 *) { echo "$as_me:$LINENO: result: yes" >&5
16681echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016683#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016684_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016685
16686 ipv6=yes
16687 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016689else
Martin v. Löwis11437992002-04-12 09:54:03 +000016690
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016691 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016692 { echo "$as_me:$LINENO: result: no" >&5
16693echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016694 ipv6=no
16695
16696else
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016698/* confdefs.h. */
16699_ACEOF
16700cat confdefs.h >>conftest.$ac_ext
16701cat >>conftest.$ac_ext <<_ACEOF
16702/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016703 /* AF_INET6 available check */
16704#include <sys/types.h>
16705#include <sys/socket.h>
16706main()
16707{
16708 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16709 exit(1);
16710 else
16711 exit(0);
16712}
16713
Martin v. Löwis11437992002-04-12 09:54:03 +000016714_ACEOF
16715rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716if { (ac_try="$ac_link"
16717case "(($ac_try" in
16718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16719 *) ac_try_echo=$ac_try;;
16720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726 { (case "(($ac_try" in
16727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16728 *) ac_try_echo=$ac_try;;
16729esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016734 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016735 { echo "$as_me:$LINENO: result: yes" >&5
16736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016737 ipv6=yes
16738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016739 echo "$as_me: program exited with status $ac_status" >&5
16740echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016741sed 's/^/| /' conftest.$ac_ext >&5
16742
Martin v. Löwis11437992002-04-12 09:54:03 +000016743( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016744{ echo "$as_me:$LINENO: result: no" >&5
16745echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016746 ipv6=no
16747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748rm -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 +000016749fi
16750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751
16752
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016753if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016754 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16755echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016757/* confdefs.h. */
16758_ACEOF
16759cat confdefs.h >>conftest.$ac_ext
16760cat >>conftest.$ac_ext <<_ACEOF
16761/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016762#include <sys/types.h>
16763#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016764int
16765main ()
16766{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016767struct sockaddr_in6 x;
16768x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 ;
16770 return 0;
16771}
16772_ACEOF
16773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774if { (ac_try="$ac_compile"
16775case "(($ac_try" in
16776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16777 *) ac_try_echo=$ac_try;;
16778esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016782 grep -v '^ *+' conftest.er1 >conftest.err
16783 rm -f conftest.er1
16784 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786 (exit $ac_status); } && {
16787 test -z "$ac_c_werror_flag" ||
16788 test ! -s conftest.err
16789 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016790 { echo "$as_me:$LINENO: result: yes" >&5
16791echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016792 ipv6=yes
16793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016795sed 's/^/| /' conftest.$ac_ext >&5
16796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016797 { echo "$as_me:$LINENO: result: no" >&5
16798echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016799 ipv6=no
16800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801
16802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016803fi
16804
16805if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016806 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016807#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016808_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016809
16810fi
16811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812fi
16813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016814
16815ipv6type=unknown
16816ipv6lib=none
16817ipv6trylibc=no
16818
16819if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016820 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16821echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016822 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16823 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016824 case $i in
16825 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016827/* confdefs.h. */
16828_ACEOF
16829cat confdefs.h >>conftest.$ac_ext
16830cat >>conftest.$ac_ext <<_ACEOF
16831/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016833#include <netinet/in.h>
16834#ifdef IPV6_INRIA_VERSION
16835yes
16836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016837_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016839 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016840 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016841fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016843
16844 ;;
16845 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016847/* confdefs.h. */
16848_ACEOF
16849cat confdefs.h >>conftest.$ac_ext
16850cat >>conftest.$ac_ext <<_ACEOF
16851/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016853#include <netinet/in.h>
16854#ifdef __KAME__
16855yes
16856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016857_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016859 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016860 ipv6type=$i;
16861 ipv6lib=inet6
16862 ipv6libdir=/usr/local/v6/lib
16863 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016865rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866
16867 ;;
16868 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016870/* confdefs.h. */
16871_ACEOF
16872cat confdefs.h >>conftest.$ac_ext
16873cat >>conftest.$ac_ext <<_ACEOF
16874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016876#include <features.h>
16877#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16878yes
16879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016882 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016883 ipv6type=$i;
16884 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016885fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016886rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016887
16888 ;;
16889 linux-inet6)
16890 if test -d /usr/inet6; then
16891 ipv6type=$i
16892 ipv6lib=inet6
16893 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016894 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016895 fi
16896 ;;
16897 solaris)
16898 if test -f /etc/netconfig; then
16899 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16900 ipv6type=$i
16901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016902 fi
16903 fi
16904 ;;
16905 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016907/* confdefs.h. */
16908_ACEOF
16909cat confdefs.h >>conftest.$ac_ext
16910cat >>conftest.$ac_ext <<_ACEOF
16911/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016912
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016913#include <sys/param.h>
16914#ifdef _TOSHIBA_INET6
16915yes
16916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016917_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016919 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016920 ipv6type=$i;
16921 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016922 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016924rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925
16926 ;;
16927 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016929/* confdefs.h. */
16930_ACEOF
16931cat confdefs.h >>conftest.$ac_ext
16932cat >>conftest.$ac_ext <<_ACEOF
16933/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016935#include </usr/local/v6/include/sys/v6config.h>
16936#ifdef __V6D__
16937yes
16938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016939_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016941 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016942 ipv6type=$i;
16943 ipv6lib=v6;
16944 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016945 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016946fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016947rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016948
16949 ;;
16950 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016952/* confdefs.h. */
16953_ACEOF
16954cat confdefs.h >>conftest.$ac_ext
16955cat >>conftest.$ac_ext <<_ACEOF
16956/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016958#include <sys/param.h>
16959#ifdef _ZETA_MINAMI_INET6
16960yes
16961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016962_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016964 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016965 ipv6type=$i;
16966 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016967 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016968fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016969rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016970
16971 ;;
16972 esac
16973 if test "$ipv6type" != "unknown"; then
16974 break
16975 fi
16976 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016977 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16978echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016979fi
16980
16981if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16982 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16983 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16984 echo "using lib$ipv6lib"
16985 else
16986 if test $ipv6trylibc = "yes"; then
16987 echo "using libc"
16988 else
16989 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16990 echo "You need to fetch lib$ipv6lib.a from appropriate"
16991 echo 'ipv6 kit and compile beforehand.'
16992 exit 1
16993 fi
16994 fi
16995fi
16996
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016997{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16998echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016999cat >conftest.$ac_ext <<_ACEOF
17000/* confdefs.h. */
17001_ACEOF
17002cat confdefs.h >>conftest.$ac_ext
17003cat >>conftest.$ac_ext <<_ACEOF
17004/* end confdefs.h. */
17005#include <Carbon/Carbon.h>
17006int
17007main ()
17008{
17009FSIORefNum fRef = 0
17010 ;
17011 return 0;
17012}
17013_ACEOF
17014rm -f conftest.$ac_objext
17015if { (ac_try="$ac_compile"
17016case "(($ac_try" in
17017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018 *) ac_try_echo=$ac_try;;
17019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017021 (eval "$ac_compile") 2>conftest.er1
17022 ac_status=$?
17023 grep -v '^ *+' conftest.er1 >conftest.err
17024 rm -f conftest.er1
17025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017027 (exit $ac_status); } && {
17028 test -z "$ac_c_werror_flag" ||
17029 test ! -s conftest.err
17030 } && test -s conftest.$ac_objext; then
17031
17032cat >>confdefs.h <<\_ACEOF
17033#define HAVE_OSX105_SDK 1
17034_ACEOF
17035
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017036 { echo "$as_me:$LINENO: result: yes" >&5
17037echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017038else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017039 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017040sed 's/^/| /' conftest.$ac_ext >&5
17041
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017042 { echo "$as_me:$LINENO: result: no" >&5
17043echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017044
17045fi
17046
17047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17048
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017049# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017050{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17051echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017054if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055 withval=$with_doc_strings;
17056fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017057
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017058
17059if test -z "$with_doc_strings"
17060then with_doc_strings="yes"
17061fi
17062if test "$with_doc_strings" != "no"
17063then
17064
17065cat >>confdefs.h <<\_ACEOF
17066#define WITH_DOC_STRINGS 1
17067_ACEOF
17068
17069fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017070{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17071echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017072
Neil Schemenauera35c6882001-02-27 04:45:05 +000017073# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017074{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17075echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017078if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017080if test "$withval" != no
17081then
17082
17083cat >>confdefs.h <<\_ACEOF
17084#define WITH_TSC 1
17085_ACEOF
17086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017087 { echo "$as_me:$LINENO: result: yes" >&5
17088echo "${ECHO_T}yes" >&6; }
17089else { echo "$as_me:$LINENO: result: no" >&5
17090echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017091fi
17092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017093 { echo "$as_me:$LINENO: result: no" >&5
17094echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095fi
17096
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017097
17098# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017099{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17100echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017103if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 withval=$with_pymalloc;
17105fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017106
Neil Schemenauera35c6882001-02-27 04:45:05 +000017107
Neil Schemenauer16c22972002-03-22 15:34:49 +000017108if test -z "$with_pymalloc"
17109then with_pymalloc="yes"
17110fi
17111if test "$with_pymalloc" != "no"
17112then
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
17114cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017115#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017116_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017117
17118fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017119{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17120echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017121
Benjamin Peterson05159c42009-12-03 03:01:27 +000017122# Check for Valgrind support
17123{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17124echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17125
17126# Check whether --with-valgrind was given.
17127if test "${with_valgrind+set}" = set; then
17128 withval=$with_valgrind;
17129else
17130 with_valgrind=no
17131fi
17132
17133{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17134echo "${ECHO_T}$with_valgrind" >&6; }
17135if test "$with_valgrind" != no; then
17136 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17137 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17138echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17139if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17140 echo $ECHO_N "(cached) $ECHO_C" >&6
17141fi
17142{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17143echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17144else
17145 # Is the header compilable?
17146{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17147echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17148cat >conftest.$ac_ext <<_ACEOF
17149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
17154$ac_includes_default
17155#include <valgrind/valgrind.h>
17156_ACEOF
17157rm -f conftest.$ac_objext
17158if { (ac_try="$ac_compile"
17159case "(($ac_try" in
17160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17161 *) ac_try_echo=$ac_try;;
17162esac
17163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17164 (eval "$ac_compile") 2>conftest.er1
17165 ac_status=$?
17166 grep -v '^ *+' conftest.er1 >conftest.err
17167 rm -f conftest.er1
17168 cat conftest.err >&5
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); } && {
17171 test -z "$ac_c_werror_flag" ||
17172 test ! -s conftest.err
17173 } && test -s conftest.$ac_objext; then
17174 ac_header_compiler=yes
17175else
17176 echo "$as_me: failed program was:" >&5
17177sed 's/^/| /' conftest.$ac_ext >&5
17178
17179 ac_header_compiler=no
17180fi
17181
17182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17183{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17184echo "${ECHO_T}$ac_header_compiler" >&6; }
17185
17186# Is the header present?
17187{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17188echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17189cat >conftest.$ac_ext <<_ACEOF
17190/* confdefs.h. */
17191_ACEOF
17192cat confdefs.h >>conftest.$ac_ext
17193cat >>conftest.$ac_ext <<_ACEOF
17194/* end confdefs.h. */
17195#include <valgrind/valgrind.h>
17196_ACEOF
17197if { (ac_try="$ac_cpp conftest.$ac_ext"
17198case "(($ac_try" in
17199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17200 *) ac_try_echo=$ac_try;;
17201esac
17202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17203 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17204 ac_status=$?
17205 grep -v '^ *+' conftest.er1 >conftest.err
17206 rm -f conftest.er1
17207 cat conftest.err >&5
17208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17209 (exit $ac_status); } >/dev/null && {
17210 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17211 test ! -s conftest.err
17212 }; then
17213 ac_header_preproc=yes
17214else
17215 echo "$as_me: failed program was:" >&5
17216sed 's/^/| /' conftest.$ac_ext >&5
17217
17218 ac_header_preproc=no
17219fi
17220
17221rm -f conftest.err conftest.$ac_ext
17222{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17223echo "${ECHO_T}$ac_header_preproc" >&6; }
17224
17225# So? What about this header?
17226case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17227 yes:no: )
17228 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17229echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17230 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17231echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17232 ac_header_preproc=yes
17233 ;;
17234 no:yes:* )
17235 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17236echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17237 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17238echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17239 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17240echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17241 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17242echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17243 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17244echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17245 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17246echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17247 ( cat <<\_ASBOX
17248## -------------------------------------- ##
17249## Report this to http://bugs.python.org/ ##
17250## -------------------------------------- ##
17251_ASBOX
17252 ) | sed "s/^/$as_me: WARNING: /" >&2
17253 ;;
17254esac
17255{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17256echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17257if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17258 echo $ECHO_N "(cached) $ECHO_C" >&6
17259else
17260 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17261fi
17262{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17263echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17264
17265fi
17266if test $ac_cv_header_valgrind_valgrind_h = yes; then
17267
17268cat >>confdefs.h <<\_ACEOF
17269#define WITH_VALGRIND 1
17270_ACEOF
17271
17272else
17273 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17274echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17275 { (exit 1); exit 1; }; }
17276
17277fi
17278
17279
17280fi
17281
Barry Warsawef82cd72000-06-30 16:21:01 +000017282# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017283{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17284echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017287if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017289if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017290then
17291
17292cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017293#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017294_ACEOF
17295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017296 { echo "$as_me:$LINENO: result: yes" >&5
17297echo "${ECHO_T}yes" >&6; }
17298else { echo "$as_me:$LINENO: result: no" >&5
17299echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017300fi
17301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017302 { echo "$as_me:$LINENO: result: no" >&5
17303echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304fi
17305
Barry Warsawef82cd72000-06-30 16:21:01 +000017306
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017307# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017308
Guido van Rossum98935bf2001-09-05 19:13:16 +000017309DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017310
Guido van Rossume97ee181999-12-20 21:27:22 +000017311# the dlopen() function means we might want to use dynload_shlib.o. some
17312# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017313
Thomas Wouters3a584202000-08-05 23:28:51 +000017314for ac_func in dlopen
17315do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17317{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017321else
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017323/* confdefs.h. */
17324_ACEOF
17325cat confdefs.h >>conftest.$ac_ext
17326cat >>conftest.$ac_ext <<_ACEOF
17327/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017328/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17329 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17330#define $ac_func innocuous_$ac_func
17331
Guido van Rossume97ee181999-12-20 21:27:22 +000017332/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017333 which can conflict with char $ac_func (); below.
17334 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017335 <limits.h> exists even on freestanding compilers. */
17336
17337#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017338# include <limits.h>
17339#else
17340# include <assert.h>
17341#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017342
17343#undef $ac_func
17344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345/* Override any GCC internal prototype to avoid an error.
17346 Use char because int might match the return type of a GCC
17347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017348#ifdef __cplusplus
17349extern "C"
17350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017351char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017352/* The GNU C library defines this for functions which it implements
17353 to always fail with ENOSYS. Some functions are actually named
17354 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017356choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017357#endif
17358
Skip Montanaro6dead952003-09-25 14:50:04 +000017359int
17360main ()
17361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 ;
17364 return 0;
17365}
17366_ACEOF
17367rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368if { (ac_try="$ac_link"
17369case "(($ac_try" in
17370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17371 *) ac_try_echo=$ac_try;;
17372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017376 grep -v '^ *+' conftest.er1 >conftest.err
17377 rm -f conftest.er1
17378 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 (exit $ac_status); } && {
17381 test -z "$ac_c_werror_flag" ||
17382 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017383 } && test -s conftest$ac_exeext &&
17384 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017388sed 's/^/| /' conftest.$ac_ext >&5
17389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392
17393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017394 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017395fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017396ac_res=`eval echo '${'$as_ac_var'}'`
17397 { echo "$as_me:$LINENO: result: $ac_res" >&5
17398echo "${ECHO_T}$ac_res" >&6; }
17399if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017402_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017403
Guido van Rossume97ee181999-12-20 21:27:22 +000017404fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017405done
Guido van Rossume97ee181999-12-20 21:27:22 +000017406
Michael W. Hudson54241132001-12-07 15:38:26 +000017407
Guido van Rossume97ee181999-12-20 21:27:22 +000017408# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17409# loading of modules.
17410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017411{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17412echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017413if test -z "$DYNLOADFILE"
17414then
17415 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017416 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17417 if test "$ac_cv_func_dlopen" = yes
17418 then DYNLOADFILE="dynload_shlib.o"
17419 else DYNLOADFILE="dynload_aix.o"
17420 fi
17421 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017422 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017423 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17424 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017425 *)
17426 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17427 # out any dynamic loading
17428 if test "$ac_cv_func_dlopen" = yes
17429 then DYNLOADFILE="dynload_shlib.o"
17430 else DYNLOADFILE="dynload_stub.o"
17431 fi
17432 ;;
17433 esac
17434fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017435{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17436echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017437if test "$DYNLOADFILE" != "dynload_stub.o"
17438then
Martin v. Löwis11437992002-04-12 09:54:03 +000017439
17440cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017441#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017442_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017443
17444fi
17445
Neil Schemenauer4e425612001-06-19 15:44:15 +000017446# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17447
Michael W. Hudson54241132001-12-07 15:38:26 +000017448
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017449{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17450echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017451if test -z "$MACHDEP_OBJS"
17452then
Jack Jansene578a632001-08-15 01:27:14 +000017453 MACHDEP_OBJS=$extra_machdep_objs
17454else
17455 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017456fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017457{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17458echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017459
Guido van Rossum627b2d71993-12-24 10:39:16 +000017460# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
Martin v. Löwisd6320502004-08-12 13:45:08 +000017532
Martin v. Löwisc3001752005-01-23 09:27:24 +000017533
17534
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017535
17536
Thomas Wouterscf297e42007-02-23 15:07:44 +000017537
17538
Gregory P. Smith25523d22007-09-03 16:44:55 +000017539
Christian Heimes4e30a842007-11-30 22:12:06 +000017540
Martin v. Löwis92fab752008-03-08 10:40:41 +000017541
Martin v. Löwis823725e2008-03-24 13:39:54 +000017542
17543
Benjamin Peterson965ce872009-04-05 21:24:58 +000017544
17545
17546
17547
Martin v. Löwis011e8422009-05-05 04:43:17 +000017548
Martin v. Löwis113a0852009-05-29 17:25:39 +000017549
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017550
17551
17552
17553
Antoine Pitroub7572f02009-12-02 20:46:48 +000017554
Martin v. Löwis823725e2008-03-24 13:39:54 +000017555for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17556 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017557 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017558 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017559 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017560 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017561 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017562 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17563 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017564 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17565 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017566 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017567 truncate uname unsetenv utimes waitpid wait3 wait4 \
17568 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017569do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017570as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17571{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17572echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017575else
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017577/* confdefs.h. */
17578_ACEOF
17579cat confdefs.h >>conftest.$ac_ext
17580cat >>conftest.$ac_ext <<_ACEOF
17581/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017582/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17583 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17584#define $ac_func innocuous_$ac_func
17585
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017586/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017587 which can conflict with char $ac_func (); below.
17588 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017589 <limits.h> exists even on freestanding compilers. */
17590
17591#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017592# include <limits.h>
17593#else
17594# include <assert.h>
17595#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017596
17597#undef $ac_func
17598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599/* Override any GCC internal prototype to avoid an error.
17600 Use char because int might match the return type of a GCC
17601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017602#ifdef __cplusplus
17603extern "C"
17604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017605char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017606/* The GNU C library defines this for functions which it implements
17607 to always fail with ENOSYS. Some functions are actually named
17608 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017610choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017611#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017612
Skip Montanaro6dead952003-09-25 14:50:04 +000017613int
17614main ()
17615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 ;
17618 return 0;
17619}
17620_ACEOF
17621rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622if { (ac_try="$ac_link"
17623case "(($ac_try" in
17624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17625 *) ac_try_echo=$ac_try;;
17626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630 grep -v '^ *+' conftest.er1 >conftest.err
17631 rm -f conftest.er1
17632 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 (exit $ac_status); } && {
17635 test -z "$ac_c_werror_flag" ||
17636 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017637 } && test -s conftest$ac_exeext &&
17638 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017642sed 's/^/| /' conftest.$ac_ext >&5
17643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646
17647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017648 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017649fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017650ac_res=`eval echo '${'$as_ac_var'}'`
17651 { echo "$as_me:$LINENO: result: $ac_res" >&5
17652echo "${ECHO_T}$ac_res" >&6; }
17653if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017655#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017656_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017657
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017658fi
17659done
17660
Michael W. Hudson54241132001-12-07 15:38:26 +000017661
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017662# For some functions, having a definition is not sufficient, since
17663# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017664{ echo "$as_me:$LINENO: checking for chroot" >&5
17665echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017667/* confdefs.h. */
17668_ACEOF
17669cat confdefs.h >>conftest.$ac_ext
17670cat >>conftest.$ac_ext <<_ACEOF
17671/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017672#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017673int
17674main ()
17675{
17676void *x=chroot
17677 ;
17678 return 0;
17679}
17680_ACEOF
17681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682if { (ac_try="$ac_compile"
17683case "(($ac_try" in
17684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17685 *) ac_try_echo=$ac_try;;
17686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017690 grep -v '^ *+' conftest.er1 >conftest.err
17691 rm -f conftest.er1
17692 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 (exit $ac_status); } && {
17695 test -z "$ac_c_werror_flag" ||
17696 test ! -s conftest.err
17697 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017698
17699cat >>confdefs.h <<\_ACEOF
17700#define HAVE_CHROOT 1
17701_ACEOF
17702
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017703 { echo "$as_me:$LINENO: result: yes" >&5
17704echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017707sed 's/^/| /' conftest.$ac_ext >&5
17708
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017709 { echo "$as_me:$LINENO: result: no" >&5
17710echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017711
17712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713
17714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017715{ echo "$as_me:$LINENO: checking for link" >&5
17716echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017718/* confdefs.h. */
17719_ACEOF
17720cat confdefs.h >>conftest.$ac_ext
17721cat >>conftest.$ac_ext <<_ACEOF
17722/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017723#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017724int
17725main ()
17726{
17727void *x=link
17728 ;
17729 return 0;
17730}
17731_ACEOF
17732rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733if { (ac_try="$ac_compile"
17734case "(($ac_try" in
17735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17736 *) ac_try_echo=$ac_try;;
17737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017741 grep -v '^ *+' conftest.er1 >conftest.err
17742 rm -f conftest.er1
17743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745 (exit $ac_status); } && {
17746 test -z "$ac_c_werror_flag" ||
17747 test ! -s conftest.err
17748 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017749
17750cat >>confdefs.h <<\_ACEOF
17751#define HAVE_LINK 1
17752_ACEOF
17753
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017754 { echo "$as_me:$LINENO: result: yes" >&5
17755echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017760 { echo "$as_me:$LINENO: result: no" >&5
17761echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017762
17763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764
17765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017766{ echo "$as_me:$LINENO: checking for symlink" >&5
17767echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017769/* confdefs.h. */
17770_ACEOF
17771cat confdefs.h >>conftest.$ac_ext
17772cat >>conftest.$ac_ext <<_ACEOF
17773/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017774#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017775int
17776main ()
17777{
17778void *x=symlink
17779 ;
17780 return 0;
17781}
17782_ACEOF
17783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784if { (ac_try="$ac_compile"
17785case "(($ac_try" in
17786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17787 *) ac_try_echo=$ac_try;;
17788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017792 grep -v '^ *+' conftest.er1 >conftest.err
17793 rm -f conftest.er1
17794 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 (exit $ac_status); } && {
17797 test -z "$ac_c_werror_flag" ||
17798 test ! -s conftest.err
17799 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017800
17801cat >>confdefs.h <<\_ACEOF
17802#define HAVE_SYMLINK 1
17803_ACEOF
17804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017805 { echo "$as_me:$LINENO: result: yes" >&5
17806echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017809sed 's/^/| /' conftest.$ac_ext >&5
17810
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017811 { echo "$as_me:$LINENO: result: no" >&5
17812echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017813
17814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815
17816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017817{ echo "$as_me:$LINENO: checking for fchdir" >&5
17818echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017820/* confdefs.h. */
17821_ACEOF
17822cat confdefs.h >>conftest.$ac_ext
17823cat >>conftest.$ac_ext <<_ACEOF
17824/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017825#include <unistd.h>
17826int
17827main ()
17828{
17829void *x=fchdir
17830 ;
17831 return 0;
17832}
17833_ACEOF
17834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835if { (ac_try="$ac_compile"
17836case "(($ac_try" in
17837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17838 *) ac_try_echo=$ac_try;;
17839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017843 grep -v '^ *+' conftest.er1 >conftest.err
17844 rm -f conftest.er1
17845 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 (exit $ac_status); } && {
17848 test -z "$ac_c_werror_flag" ||
17849 test ! -s conftest.err
17850 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017851
17852cat >>confdefs.h <<\_ACEOF
17853#define HAVE_FCHDIR 1
17854_ACEOF
17855
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017856 { echo "$as_me:$LINENO: result: yes" >&5
17857echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017860sed 's/^/| /' conftest.$ac_ext >&5
17861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017862 { echo "$as_me:$LINENO: result: no" >&5
17863echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017864
17865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866
17867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017868{ echo "$as_me:$LINENO: checking for fsync" >&5
17869echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017871/* confdefs.h. */
17872_ACEOF
17873cat confdefs.h >>conftest.$ac_ext
17874cat >>conftest.$ac_ext <<_ACEOF
17875/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017876#include <unistd.h>
17877int
17878main ()
17879{
17880void *x=fsync
17881 ;
17882 return 0;
17883}
17884_ACEOF
17885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886if { (ac_try="$ac_compile"
17887case "(($ac_try" in
17888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17889 *) ac_try_echo=$ac_try;;
17890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894 grep -v '^ *+' conftest.er1 >conftest.err
17895 rm -f conftest.er1
17896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898 (exit $ac_status); } && {
17899 test -z "$ac_c_werror_flag" ||
17900 test ! -s conftest.err
17901 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017902
17903cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017904#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017905_ACEOF
17906
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017907 { echo "$as_me:$LINENO: result: yes" >&5
17908echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017911sed 's/^/| /' conftest.$ac_ext >&5
17912
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017913 { echo "$as_me:$LINENO: result: no" >&5
17914echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017915
17916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917
17918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017919{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17920echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017922/* confdefs.h. */
17923_ACEOF
17924cat confdefs.h >>conftest.$ac_ext
17925cat >>conftest.$ac_ext <<_ACEOF
17926/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017927#include <unistd.h>
17928int
17929main ()
17930{
17931void *x=fdatasync
17932 ;
17933 return 0;
17934}
17935_ACEOF
17936rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937if { (ac_try="$ac_compile"
17938case "(($ac_try" in
17939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17940 *) ac_try_echo=$ac_try;;
17941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017945 grep -v '^ *+' conftest.er1 >conftest.err
17946 rm -f conftest.er1
17947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 (exit $ac_status); } && {
17950 test -z "$ac_c_werror_flag" ||
17951 test ! -s conftest.err
17952 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017953
17954cat >>confdefs.h <<\_ACEOF
17955#define HAVE_FDATASYNC 1
17956_ACEOF
17957
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017958 { echo "$as_me:$LINENO: result: yes" >&5
17959echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017962sed 's/^/| /' conftest.$ac_ext >&5
17963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017964 { echo "$as_me:$LINENO: result: no" >&5
17965echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017966
17967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968
17969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017970{ echo "$as_me:$LINENO: checking for epoll" >&5
17971echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017972cat >conftest.$ac_ext <<_ACEOF
17973/* confdefs.h. */
17974_ACEOF
17975cat confdefs.h >>conftest.$ac_ext
17976cat >>conftest.$ac_ext <<_ACEOF
17977/* end confdefs.h. */
17978#include <sys/epoll.h>
17979int
17980main ()
17981{
17982void *x=epoll_create
17983 ;
17984 return 0;
17985}
17986_ACEOF
17987rm -f conftest.$ac_objext
17988if { (ac_try="$ac_compile"
17989case "(($ac_try" in
17990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17991 *) ac_try_echo=$ac_try;;
17992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017994 (eval "$ac_compile") 2>conftest.er1
17995 ac_status=$?
17996 grep -v '^ *+' conftest.er1 >conftest.err
17997 rm -f conftest.er1
17998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018000 (exit $ac_status); } && {
18001 test -z "$ac_c_werror_flag" ||
18002 test ! -s conftest.err
18003 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018004
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018005cat >>confdefs.h <<\_ACEOF
18006#define HAVE_EPOLL 1
18007_ACEOF
18008
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018009 { echo "$as_me:$LINENO: result: yes" >&5
18010echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018012 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018013sed 's/^/| /' conftest.$ac_ext >&5
18014
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018015 { echo "$as_me:$LINENO: result: no" >&5
18016echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018017
18018fi
18019
18020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018021{ echo "$as_me:$LINENO: checking for kqueue" >&5
18022echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018023cat >conftest.$ac_ext <<_ACEOF
18024/* confdefs.h. */
18025_ACEOF
18026cat confdefs.h >>conftest.$ac_ext
18027cat >>conftest.$ac_ext <<_ACEOF
18028/* end confdefs.h. */
18029
18030#include <sys/types.h>
18031#include <sys/event.h>
18032
18033int
18034main ()
18035{
18036int x=kqueue()
18037 ;
18038 return 0;
18039}
18040_ACEOF
18041rm -f conftest.$ac_objext
18042if { (ac_try="$ac_compile"
18043case "(($ac_try" in
18044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18045 *) ac_try_echo=$ac_try;;
18046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018048 (eval "$ac_compile") 2>conftest.er1
18049 ac_status=$?
18050 grep -v '^ *+' conftest.er1 >conftest.err
18051 rm -f conftest.er1
18052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018054 (exit $ac_status); } && {
18055 test -z "$ac_c_werror_flag" ||
18056 test ! -s conftest.err
18057 } && test -s conftest.$ac_objext; then
18058
18059cat >>confdefs.h <<\_ACEOF
18060#define HAVE_KQUEUE 1
18061_ACEOF
18062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018063 { echo "$as_me:$LINENO: result: yes" >&5
18064echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018066 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018067sed 's/^/| /' conftest.$ac_ext >&5
18068
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018069 { echo "$as_me:$LINENO: result: no" >&5
18070echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018071
18072fi
18073
18074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018075# On some systems (eg. FreeBSD 5), we would find a definition of the
18076# functions ctermid_r, setgroups in the library, but no prototype
18077# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18078# address to avoid compiler warnings and potential miscompilations
18079# because of the missing prototypes.
18080
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018081{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18082echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018084/* confdefs.h. */
18085_ACEOF
18086cat confdefs.h >>conftest.$ac_ext
18087cat >>conftest.$ac_ext <<_ACEOF
18088/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018089
18090#include "confdefs.h"
18091#include <stdio.h>
18092
Martin v. Löwisd5843682002-11-21 20:41:28 +000018093int
18094main ()
18095{
18096void* p = ctermid_r
18097 ;
18098 return 0;
18099}
18100_ACEOF
18101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102if { (ac_try="$ac_compile"
18103case "(($ac_try" in
18104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18105 *) ac_try_echo=$ac_try;;
18106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018110 grep -v '^ *+' conftest.er1 >conftest.err
18111 rm -f conftest.er1
18112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114 (exit $ac_status); } && {
18115 test -z "$ac_c_werror_flag" ||
18116 test ! -s conftest.err
18117 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018118
18119cat >>confdefs.h <<\_ACEOF
18120#define HAVE_CTERMID_R 1
18121_ACEOF
18122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018123 { echo "$as_me:$LINENO: result: yes" >&5
18124echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018127sed 's/^/| /' conftest.$ac_ext >&5
18128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018129 { echo "$as_me:$LINENO: result: no" >&5
18130echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018131
18132fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018136{ echo "$as_me:$LINENO: checking for flock" >&5
18137echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018139/* confdefs.h. */
18140_ACEOF
18141cat confdefs.h >>conftest.$ac_ext
18142cat >>conftest.$ac_ext <<_ACEOF
18143/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018144
18145#include "confdefs.h"
18146#include <sys/file.h>
18147
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018148int
18149main ()
18150{
18151void* p = flock
18152 ;
18153 return 0;
18154}
18155_ACEOF
18156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157if { (ac_try="$ac_compile"
18158case "(($ac_try" in
18159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18160 *) ac_try_echo=$ac_try;;
18161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165 grep -v '^ *+' conftest.er1 >conftest.err
18166 rm -f conftest.er1
18167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169 (exit $ac_status); } && {
18170 test -z "$ac_c_werror_flag" ||
18171 test ! -s conftest.err
18172 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018173
18174cat >>confdefs.h <<\_ACEOF
18175#define HAVE_FLOCK 1
18176_ACEOF
18177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018178 { echo "$as_me:$LINENO: result: yes" >&5
18179echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018180else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018182sed 's/^/| /' conftest.$ac_ext >&5
18183
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018184 { echo "$as_me:$LINENO: result: no" >&5
18185echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018186
18187fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018191{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18192echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018194/* confdefs.h. */
18195_ACEOF
18196cat confdefs.h >>conftest.$ac_ext
18197cat >>conftest.$ac_ext <<_ACEOF
18198/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018199
18200#include "confdefs.h"
18201#include <unistd.h>
18202
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018203int
18204main ()
18205{
18206void* p = getpagesize
18207 ;
18208 return 0;
18209}
18210_ACEOF
18211rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212if { (ac_try="$ac_compile"
18213case "(($ac_try" in
18214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18215 *) ac_try_echo=$ac_try;;
18216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018220 grep -v '^ *+' conftest.er1 >conftest.err
18221 rm -f conftest.er1
18222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 (exit $ac_status); } && {
18225 test -z "$ac_c_werror_flag" ||
18226 test ! -s conftest.err
18227 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018228
18229cat >>confdefs.h <<\_ACEOF
18230#define HAVE_GETPAGESIZE 1
18231_ACEOF
18232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018233 { echo "$as_me:$LINENO: result: yes" >&5
18234echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018237sed 's/^/| /' conftest.$ac_ext >&5
18238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239 { echo "$as_me:$LINENO: result: no" >&5
18240echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018241
18242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243
18244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018245
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018246for ac_prog in true
18247do
18248 # Extract the first word of "$ac_prog", so it can be a program name with args.
18249set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018250{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018252if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018253 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018254else
18255 if test -n "$TRUE"; then
18256 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18257else
18258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18259for as_dir in $PATH
18260do
18261 IFS=$as_save_IFS
18262 test -z "$as_dir" && as_dir=.
18263 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264 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 +000018265 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018267 break 2
18268 fi
18269done
18270done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018272
18273fi
18274fi
18275TRUE=$ac_cv_prog_TRUE
18276if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018277 { echo "$as_me:$LINENO: result: $TRUE" >&5
18278echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018280 { echo "$as_me:$LINENO: result: no" >&5
18281echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018282fi
18283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018285 test -n "$TRUE" && break
18286done
18287test -n "$TRUE" || TRUE="/bin/true"
18288
18289
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018290{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18291echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018292if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018294else
18295 ac_check_lib_save_LIBS=$LIBS
18296LIBS="-lc $LIBS"
18297cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018298/* confdefs.h. */
18299_ACEOF
18300cat confdefs.h >>conftest.$ac_ext
18301cat >>conftest.$ac_ext <<_ACEOF
18302/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018304/* Override any GCC internal prototype to avoid an error.
18305 Use char because int might match the return type of a GCC
18306 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018307#ifdef __cplusplus
18308extern "C"
18309#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018310char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018311int
18312main ()
18313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018315 ;
18316 return 0;
18317}
18318_ACEOF
18319rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320if { (ac_try="$ac_link"
18321case "(($ac_try" in
18322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18323 *) ac_try_echo=$ac_try;;
18324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018326 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018328 grep -v '^ *+' conftest.er1 >conftest.err
18329 rm -f conftest.er1
18330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332 (exit $ac_status); } && {
18333 test -z "$ac_c_werror_flag" ||
18334 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018335 } && test -s conftest$ac_exeext &&
18336 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018337 ac_cv_lib_c_inet_aton=yes
18338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018340sed 's/^/| /' conftest.$ac_ext >&5
18341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018342 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344
18345rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018347LIBS=$ac_check_lib_save_LIBS
18348fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18350echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18351if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018352 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018353else
18354
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018355{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18356echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018357if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018359else
18360 ac_check_lib_save_LIBS=$LIBS
18361LIBS="-lresolv $LIBS"
18362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018363/* confdefs.h. */
18364_ACEOF
18365cat confdefs.h >>conftest.$ac_ext
18366cat >>conftest.$ac_ext <<_ACEOF
18367/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018369/* Override any GCC internal prototype to avoid an error.
18370 Use char because int might match the return type of a GCC
18371 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018372#ifdef __cplusplus
18373extern "C"
18374#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018375char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018376int
18377main ()
18378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018380 ;
18381 return 0;
18382}
18383_ACEOF
18384rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385if { (ac_try="$ac_link"
18386case "(($ac_try" in
18387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18388 *) ac_try_echo=$ac_try;;
18389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018393 grep -v '^ *+' conftest.er1 >conftest.err
18394 rm -f conftest.er1
18395 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397 (exit $ac_status); } && {
18398 test -z "$ac_c_werror_flag" ||
18399 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018400 } && test -s conftest$ac_exeext &&
18401 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018402 ac_cv_lib_resolv_inet_aton=yes
18403else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018405sed 's/^/| /' conftest.$ac_ext >&5
18406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409
18410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018412LIBS=$ac_check_lib_save_LIBS
18413fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18415echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18416if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018417 cat >>confdefs.h <<_ACEOF
18418#define HAVE_LIBRESOLV 1
18419_ACEOF
18420
18421 LIBS="-lresolv $LIBS"
18422
18423fi
18424
18425
18426fi
18427
18428
Christian Heimesd0764e22007-12-04 15:00:33 +000018429# On Tru64, chflags seems to be present, but calling it will
18430# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018431{ echo "$as_me:$LINENO: checking for chflags" >&5
18432echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018433if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018434 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018435else
18436 if test "$cross_compiling" = yes; then
18437 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018438else
18439 cat >conftest.$ac_ext <<_ACEOF
18440/* confdefs.h. */
18441_ACEOF
18442cat confdefs.h >>conftest.$ac_ext
18443cat >>conftest.$ac_ext <<_ACEOF
18444/* end confdefs.h. */
18445
18446#include <sys/stat.h>
18447#include <unistd.h>
18448int main(int argc, char*argv[])
18449{
18450 if(chflags(argv[0], 0) != 0)
18451 return 1;
18452 return 0;
18453}
18454
18455_ACEOF
18456rm -f conftest$ac_exeext
18457if { (ac_try="$ac_link"
18458case "(($ac_try" in
18459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18460 *) ac_try_echo=$ac_try;;
18461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018463 (eval "$ac_link") 2>&5
18464 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18467 { (case "(($ac_try" in
18468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18469 *) ac_try_echo=$ac_try;;
18470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018472 (eval "$ac_try") 2>&5
18473 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018475 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018476 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018477else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018478 echo "$as_me: program exited with status $ac_status" >&5
18479echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018480sed 's/^/| /' conftest.$ac_ext >&5
18481
18482( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018483ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018484fi
18485rm -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 +000018486fi
18487
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018488
18489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018490fi
18491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018492{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18493echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018494if test $ac_cv_have_chflags = yes
18495then
18496
18497cat >>confdefs.h <<\_ACEOF
18498#define HAVE_CHFLAGS 1
18499_ACEOF
18500
18501fi
18502
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018503{ echo "$as_me:$LINENO: checking for lchflags" >&5
18504echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018505if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018506 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018507else
18508 if test "$cross_compiling" = yes; then
18509 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018510else
18511 cat >conftest.$ac_ext <<_ACEOF
18512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
18517
18518#include <sys/stat.h>
18519#include <unistd.h>
18520int main(int argc, char*argv[])
18521{
18522 if(lchflags(argv[0], 0) != 0)
18523 return 1;
18524 return 0;
18525}
18526
18527_ACEOF
18528rm -f conftest$ac_exeext
18529if { (ac_try="$ac_link"
18530case "(($ac_try" in
18531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18532 *) ac_try_echo=$ac_try;;
18533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018535 (eval "$ac_link") 2>&5
18536 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18539 { (case "(($ac_try" in
18540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18541 *) ac_try_echo=$ac_try;;
18542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018544 (eval "$ac_try") 2>&5
18545 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018547 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018548 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550 echo "$as_me: program exited with status $ac_status" >&5
18551echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018552sed 's/^/| /' conftest.$ac_ext >&5
18553
18554( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018555ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018556fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18558fi
18559
18560
Christian Heimesd0764e22007-12-04 15:00:33 +000018561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018562fi
18563
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018564{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18565echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018566if test $ac_cv_have_lchflags = yes
18567then
18568
18569cat >>confdefs.h <<\_ACEOF
18570#define HAVE_LCHFLAGS 1
18571_ACEOF
18572
18573fi
18574
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018575case $ac_sys_system/$ac_sys_release in
18576Darwin/*)
18577 _CUR_CFLAGS="${CFLAGS}"
18578 _CUR_LDFLAGS="${LDFLAGS}"
18579 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18580 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18581 ;;
18582esac
18583
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018584{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18585echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018586if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018587 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018588else
18589 ac_check_lib_save_LIBS=$LIBS
18590LIBS="-lz $LIBS"
18591cat >conftest.$ac_ext <<_ACEOF
18592/* confdefs.h. */
18593_ACEOF
18594cat confdefs.h >>conftest.$ac_ext
18595cat >>conftest.$ac_ext <<_ACEOF
18596/* end confdefs.h. */
18597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598/* Override any GCC internal prototype to avoid an error.
18599 Use char because int might match the return type of a GCC
18600 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018601#ifdef __cplusplus
18602extern "C"
18603#endif
18604char inflateCopy ();
18605int
18606main ()
18607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018608return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018609 ;
18610 return 0;
18611}
18612_ACEOF
18613rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614if { (ac_try="$ac_link"
18615case "(($ac_try" in
18616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18617 *) ac_try_echo=$ac_try;;
18618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018621 ac_status=$?
18622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626 (exit $ac_status); } && {
18627 test -z "$ac_c_werror_flag" ||
18628 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018629 } && test -s conftest$ac_exeext &&
18630 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018631 ac_cv_lib_z_inflateCopy=yes
18632else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018633 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018634sed 's/^/| /' conftest.$ac_ext >&5
18635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018636 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638
18639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018640 conftest$ac_exeext conftest.$ac_ext
18641LIBS=$ac_check_lib_save_LIBS
18642fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018643{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18644echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18645if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018646
18647cat >>confdefs.h <<\_ACEOF
18648#define HAVE_ZLIB_COPY 1
18649_ACEOF
18650
18651fi
18652
18653
18654case $ac_sys_system/$ac_sys_release in
18655Darwin/*)
18656 CFLAGS="${_CUR_CFLAGS}"
18657 LDFLAGS="${_CUR_LDFLAGS}"
18658 ;;
18659esac
18660
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018661{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18662echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018664/* confdefs.h. */
18665_ACEOF
18666cat confdefs.h >>conftest.$ac_ext
18667cat >>conftest.$ac_ext <<_ACEOF
18668/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018669
18670#include "confdefs.h"
18671#include <netdb.h>
18672
Martin v. Löwise9416172003-05-03 10:12:45 +000018673int
18674main ()
18675{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018676void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018677 ;
18678 return 0;
18679}
18680_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682if { (ac_try="$ac_link"
18683case "(($ac_try" in
18684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18685 *) ac_try_echo=$ac_try;;
18686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018690 grep -v '^ *+' conftest.er1 >conftest.err
18691 rm -f conftest.er1
18692 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694 (exit $ac_status); } && {
18695 test -z "$ac_c_werror_flag" ||
18696 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018697 } && test -s conftest$ac_exeext &&
18698 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018699
18700cat >>confdefs.h <<\_ACEOF
18701#define HAVE_HSTRERROR 1
18702_ACEOF
18703
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018704 { echo "$as_me:$LINENO: result: yes" >&5
18705echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018708sed 's/^/| /' conftest.$ac_ext >&5
18709
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018710 { echo "$as_me:$LINENO: result: no" >&5
18711echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018712
18713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714
18715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018717
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018718{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18719echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018720cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018721/* confdefs.h. */
18722_ACEOF
18723cat confdefs.h >>conftest.$ac_ext
18724cat >>conftest.$ac_ext <<_ACEOF
18725/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018726
18727#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018728#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018729#include <sys/socket.h>
18730#include <netinet/in.h>
18731#include <arpa/inet.h>
18732
Martin v. Löwise9416172003-05-03 10:12:45 +000018733int
18734main ()
18735{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018736void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018737 ;
18738 return 0;
18739}
18740_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018741rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018742if { (ac_try="$ac_link"
18743case "(($ac_try" in
18744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18745 *) ac_try_echo=$ac_try;;
18746esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018748 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018750 grep -v '^ *+' conftest.er1 >conftest.err
18751 rm -f conftest.er1
18752 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018754 (exit $ac_status); } && {
18755 test -z "$ac_c_werror_flag" ||
18756 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018757 } && test -s conftest$ac_exeext &&
18758 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018759
18760cat >>confdefs.h <<\_ACEOF
18761#define HAVE_INET_ATON 1
18762_ACEOF
18763
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018764 { echo "$as_me:$LINENO: result: yes" >&5
18765echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018768sed 's/^/| /' conftest.$ac_ext >&5
18769
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018770 { echo "$as_me:$LINENO: result: no" >&5
18771echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018772
18773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018774
18775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018777
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018778{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18779echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018781/* confdefs.h. */
18782_ACEOF
18783cat confdefs.h >>conftest.$ac_ext
18784cat >>conftest.$ac_ext <<_ACEOF
18785/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018786
18787#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018788#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018789#include <sys/socket.h>
18790#include <netinet/in.h>
18791#include <arpa/inet.h>
18792
Martin v. Löwise9416172003-05-03 10:12:45 +000018793int
18794main ()
18795{
18796void* p = inet_pton
18797 ;
18798 return 0;
18799}
18800_ACEOF
18801rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802if { (ac_try="$ac_compile"
18803case "(($ac_try" in
18804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18805 *) ac_try_echo=$ac_try;;
18806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018810 grep -v '^ *+' conftest.er1 >conftest.err
18811 rm -f conftest.er1
18812 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814 (exit $ac_status); } && {
18815 test -z "$ac_c_werror_flag" ||
18816 test ! -s conftest.err
18817 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018818
18819cat >>confdefs.h <<\_ACEOF
18820#define HAVE_INET_PTON 1
18821_ACEOF
18822
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018823 { echo "$as_me:$LINENO: result: yes" >&5
18824echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018827sed 's/^/| /' conftest.$ac_ext >&5
18828
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018829 { echo "$as_me:$LINENO: result: no" >&5
18830echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018831
18832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833
18834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018835
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018836# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018837{ echo "$as_me:$LINENO: checking for setgroups" >&5
18838echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018840/* confdefs.h. */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018845
18846#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018847#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018848#ifdef HAVE_GRP_H
18849#include <grp.h>
18850#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018851
Martin v. Löwisd5843682002-11-21 20:41:28 +000018852int
18853main ()
18854{
18855void* p = setgroups
18856 ;
18857 return 0;
18858}
18859_ACEOF
18860rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018861if { (ac_try="$ac_compile"
18862case "(($ac_try" in
18863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18864 *) ac_try_echo=$ac_try;;
18865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018869 grep -v '^ *+' conftest.er1 >conftest.err
18870 rm -f conftest.er1
18871 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873 (exit $ac_status); } && {
18874 test -z "$ac_c_werror_flag" ||
18875 test ! -s conftest.err
18876 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018877
18878cat >>confdefs.h <<\_ACEOF
18879#define HAVE_SETGROUPS 1
18880_ACEOF
18881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018882 { echo "$as_me:$LINENO: result: yes" >&5
18883echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018886sed 's/^/| /' conftest.$ac_ext >&5
18887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018888 { echo "$as_me:$LINENO: result: no" >&5
18889echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018890
18891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018892
18893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018894
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018895# check for openpty and forkpty
18896
Martin v. Löwis11437992002-04-12 09:54:03 +000018897
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018898for ac_func in openpty
18899do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018900as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18901{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18902echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018903if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018905else
Martin v. Löwis11437992002-04-12 09:54:03 +000018906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018907/* confdefs.h. */
18908_ACEOF
18909cat confdefs.h >>conftest.$ac_ext
18910cat >>conftest.$ac_ext <<_ACEOF
18911/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018912/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18913 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18914#define $ac_func innocuous_$ac_func
18915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018916/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018917 which can conflict with char $ac_func (); below.
18918 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018919 <limits.h> exists even on freestanding compilers. */
18920
18921#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018922# include <limits.h>
18923#else
18924# include <assert.h>
18925#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018926
18927#undef $ac_func
18928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018929/* Override any GCC internal prototype to avoid an error.
18930 Use char because int might match the return type of a GCC
18931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018932#ifdef __cplusplus
18933extern "C"
18934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018935char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018936/* The GNU C library defines this for functions which it implements
18937 to always fail with ENOSYS. Some functions are actually named
18938 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018939#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018940choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018941#endif
18942
Skip Montanaro6dead952003-09-25 14:50:04 +000018943int
18944main ()
18945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018946return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 ;
18948 return 0;
18949}
18950_ACEOF
18951rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952if { (ac_try="$ac_link"
18953case "(($ac_try" in
18954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18955 *) ac_try_echo=$ac_try;;
18956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018960 grep -v '^ *+' conftest.er1 >conftest.err
18961 rm -f conftest.er1
18962 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964 (exit $ac_status); } && {
18965 test -z "$ac_c_werror_flag" ||
18966 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018967 } && test -s conftest$ac_exeext &&
18968 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018970else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018972sed 's/^/| /' conftest.$ac_ext >&5
18973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018976
18977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018978 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018980ac_res=`eval echo '${'$as_ac_var'}'`
18981 { echo "$as_me:$LINENO: result: $ac_res" >&5
18982echo "${ECHO_T}$ac_res" >&6; }
18983if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018984 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018985#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018986_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018987
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018989 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18990echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018991if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018992 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018993else
Martin v. Löwis11437992002-04-12 09:54:03 +000018994 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018995LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018997/* confdefs.h. */
18998_ACEOF
18999cat confdefs.h >>conftest.$ac_ext
19000cat >>conftest.$ac_ext <<_ACEOF
19001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003/* Override any GCC internal prototype to avoid an error.
19004 Use char because int might match the return type of a GCC
19005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019006#ifdef __cplusplus
19007extern "C"
19008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019009char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019010int
19011main ()
19012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019013return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019014 ;
19015 return 0;
19016}
19017_ACEOF
19018rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019019if { (ac_try="$ac_link"
19020case "(($ac_try" in
19021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19022 *) ac_try_echo=$ac_try;;
19023esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019027 grep -v '^ *+' conftest.er1 >conftest.err
19028 rm -f conftest.er1
19029 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019031 (exit $ac_status); } && {
19032 test -z "$ac_c_werror_flag" ||
19033 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019034 } && test -s conftest$ac_exeext &&
19035 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019039sed 's/^/| /' conftest.$ac_ext >&5
19040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019041 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043
19044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019046LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019047fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019048{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19049echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19050if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019052#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019053_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019054 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019056 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19057echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019058if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019060else
19061 ac_check_lib_save_LIBS=$LIBS
19062LIBS="-lbsd $LIBS"
19063cat >conftest.$ac_ext <<_ACEOF
19064/* confdefs.h. */
19065_ACEOF
19066cat confdefs.h >>conftest.$ac_ext
19067cat >>conftest.$ac_ext <<_ACEOF
19068/* end confdefs.h. */
19069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019070/* Override any GCC internal prototype to avoid an error.
19071 Use char because int might match the return type of a GCC
19072 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019073#ifdef __cplusplus
19074extern "C"
19075#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019076char openpty ();
19077int
19078main ()
19079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019081 ;
19082 return 0;
19083}
19084_ACEOF
19085rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019086if { (ac_try="$ac_link"
19087case "(($ac_try" in
19088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19089 *) ac_try_echo=$ac_try;;
19090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019093 ac_status=$?
19094 grep -v '^ *+' conftest.er1 >conftest.err
19095 rm -f conftest.er1
19096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 (exit $ac_status); } && {
19099 test -z "$ac_c_werror_flag" ||
19100 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019101 } && test -s conftest$ac_exeext &&
19102 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019103 ac_cv_lib_bsd_openpty=yes
19104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019105 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019106sed 's/^/| /' conftest.$ac_ext >&5
19107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110
19111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019112 conftest$ac_exeext conftest.$ac_ext
19113LIBS=$ac_check_lib_save_LIBS
19114fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019115{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19116echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19117if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019118 cat >>confdefs.h <<\_ACEOF
19119#define HAVE_OPENPTY 1
19120_ACEOF
19121 LIBS="$LIBS -lbsd"
19122fi
19123
19124
19125fi
19126
Fred Drake8cef4cf2000-06-28 16:40:38 +000019127
19128fi
19129done
19130
Martin v. Löwis11437992002-04-12 09:54:03 +000019131
Fred Drake8cef4cf2000-06-28 16:40:38 +000019132for ac_func in forkpty
19133do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019134as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19135{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19136echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019137if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019138 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019139else
Martin v. Löwis11437992002-04-12 09:54:03 +000019140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019141/* confdefs.h. */
19142_ACEOF
19143cat confdefs.h >>conftest.$ac_ext
19144cat >>conftest.$ac_ext <<_ACEOF
19145/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019146/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19147 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19148#define $ac_func innocuous_$ac_func
19149
Fred Drake8cef4cf2000-06-28 16:40:38 +000019150/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019151 which can conflict with char $ac_func (); below.
19152 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019153 <limits.h> exists even on freestanding compilers. */
19154
19155#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019156# include <limits.h>
19157#else
19158# include <assert.h>
19159#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019160
19161#undef $ac_func
19162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019163/* Override any GCC internal prototype to avoid an error.
19164 Use char because int might match the return type of a GCC
19165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019166#ifdef __cplusplus
19167extern "C"
19168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019169char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019170/* The GNU C library defines this for functions which it implements
19171 to always fail with ENOSYS. Some functions are actually named
19172 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019173#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019174choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019175#endif
19176
Skip Montanaro6dead952003-09-25 14:50:04 +000019177int
19178main ()
19179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019180return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019181 ;
19182 return 0;
19183}
19184_ACEOF
19185rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019186if { (ac_try="$ac_link"
19187case "(($ac_try" in
19188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19189 *) ac_try_echo=$ac_try;;
19190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019192 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019194 grep -v '^ *+' conftest.er1 >conftest.err
19195 rm -f conftest.er1
19196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019198 (exit $ac_status); } && {
19199 test -z "$ac_c_werror_flag" ||
19200 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019201 } && test -s conftest$ac_exeext &&
19202 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019206sed 's/^/| /' conftest.$ac_ext >&5
19207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019208 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019210
19211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019212 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019213fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019214ac_res=`eval echo '${'$as_ac_var'}'`
19215 { echo "$as_me:$LINENO: result: $ac_res" >&5
19216echo "${ECHO_T}$ac_res" >&6; }
19217if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019218 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019219#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019220_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019221
Fred Drake8cef4cf2000-06-28 16:40:38 +000019222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019223 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19224echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019225if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019226 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019227else
Martin v. Löwis11437992002-04-12 09:54:03 +000019228 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019229LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019237/* Override any GCC internal prototype to avoid an error.
19238 Use char because int might match the return type of a GCC
19239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019240#ifdef __cplusplus
19241extern "C"
19242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019243char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019244int
19245main ()
19246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019247return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019248 ;
19249 return 0;
19250}
19251_ACEOF
19252rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019253if { (ac_try="$ac_link"
19254case "(($ac_try" in
19255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19256 *) ac_try_echo=$ac_try;;
19257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019259 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019261 grep -v '^ *+' conftest.er1 >conftest.err
19262 rm -f conftest.er1
19263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019265 (exit $ac_status); } && {
19266 test -z "$ac_c_werror_flag" ||
19267 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019268 } && test -s conftest$ac_exeext &&
19269 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019273sed 's/^/| /' conftest.$ac_ext >&5
19274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019275 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019277
19278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019280LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019281fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19283echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19284if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019286#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019287_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019288 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019290 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19291echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019292if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019294else
19295 ac_check_lib_save_LIBS=$LIBS
19296LIBS="-lbsd $LIBS"
19297cat >conftest.$ac_ext <<_ACEOF
19298/* confdefs.h. */
19299_ACEOF
19300cat confdefs.h >>conftest.$ac_ext
19301cat >>conftest.$ac_ext <<_ACEOF
19302/* end confdefs.h. */
19303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019304/* Override any GCC internal prototype to avoid an error.
19305 Use char because int might match the return type of a GCC
19306 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019307#ifdef __cplusplus
19308extern "C"
19309#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019310char forkpty ();
19311int
19312main ()
19313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019314return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019315 ;
19316 return 0;
19317}
19318_ACEOF
19319rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019320if { (ac_try="$ac_link"
19321case "(($ac_try" in
19322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19323 *) ac_try_echo=$ac_try;;
19324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019326 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019327 ac_status=$?
19328 grep -v '^ *+' conftest.er1 >conftest.err
19329 rm -f conftest.er1
19330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019332 (exit $ac_status); } && {
19333 test -z "$ac_c_werror_flag" ||
19334 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019335 } && test -s conftest$ac_exeext &&
19336 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019337 ac_cv_lib_bsd_forkpty=yes
19338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019339 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019340sed 's/^/| /' conftest.$ac_ext >&5
19341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019344
19345rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019346 conftest$ac_exeext conftest.$ac_ext
19347LIBS=$ac_check_lib_save_LIBS
19348fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019349{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19350echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19351if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019352 cat >>confdefs.h <<\_ACEOF
19353#define HAVE_FORKPTY 1
19354_ACEOF
19355 LIBS="$LIBS -lbsd"
19356fi
19357
19358
19359fi
19360
Fred Drake8cef4cf2000-06-28 16:40:38 +000019361
19362fi
19363done
19364
Jack Jansendd19cf82001-12-06 22:36:17 +000019365
Christian Heimesb186d002008-03-18 15:15:01 +000019366# Stuff for expat.
19367
19368for ac_func in memmove
19369do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19371{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019373if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019374 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019375else
19376 cat >conftest.$ac_ext <<_ACEOF
19377/* confdefs.h. */
19378_ACEOF
19379cat confdefs.h >>conftest.$ac_ext
19380cat >>conftest.$ac_ext <<_ACEOF
19381/* end confdefs.h. */
19382/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19384#define $ac_func innocuous_$ac_func
19385
19386/* System header to define __stub macros and hopefully few prototypes,
19387 which can conflict with char $ac_func (); below.
19388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19389 <limits.h> exists even on freestanding compilers. */
19390
19391#ifdef __STDC__
19392# include <limits.h>
19393#else
19394# include <assert.h>
19395#endif
19396
19397#undef $ac_func
19398
19399/* Override any GCC internal prototype to avoid an error.
19400 Use char because int might match the return type of a GCC
19401 builtin and then its argument prototype would still apply. */
19402#ifdef __cplusplus
19403extern "C"
19404#endif
19405char $ac_func ();
19406/* The GNU C library defines this for functions which it implements
19407 to always fail with ENOSYS. Some functions are actually named
19408 something starting with __ and the normal name is an alias. */
19409#if defined __stub_$ac_func || defined __stub___$ac_func
19410choke me
19411#endif
19412
19413int
19414main ()
19415{
19416return $ac_func ();
19417 ;
19418 return 0;
19419}
19420_ACEOF
19421rm -f conftest.$ac_objext conftest$ac_exeext
19422if { (ac_try="$ac_link"
19423case "(($ac_try" in
19424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19425 *) ac_try_echo=$ac_try;;
19426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019428 (eval "$ac_link") 2>conftest.er1
19429 ac_status=$?
19430 grep -v '^ *+' conftest.er1 >conftest.err
19431 rm -f conftest.er1
19432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019434 (exit $ac_status); } && {
19435 test -z "$ac_c_werror_flag" ||
19436 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019437 } && test -s conftest$ac_exeext &&
19438 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019439 eval "$as_ac_var=yes"
19440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019441 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019442sed 's/^/| /' conftest.$ac_ext >&5
19443
19444 eval "$as_ac_var=no"
19445fi
19446
19447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19448 conftest$ac_exeext conftest.$ac_ext
19449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019450ac_res=`eval echo '${'$as_ac_var'}'`
19451 { echo "$as_me:$LINENO: result: $ac_res" >&5
19452echo "${ECHO_T}$ac_res" >&6; }
19453if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019454 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019455#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019456_ACEOF
19457
19458fi
19459done
19460
19461
Michael W. Hudson54241132001-12-07 15:38:26 +000019462# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019463
19464
19465
19466
19467
19468
Fred Drake8cef4cf2000-06-28 16:40:38 +000019469for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19470do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019471as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19472{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19473echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019474if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019476else
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019478/* confdefs.h. */
19479_ACEOF
19480cat confdefs.h >>conftest.$ac_ext
19481cat >>conftest.$ac_ext <<_ACEOF
19482/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019483/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19484 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19485#define $ac_func innocuous_$ac_func
19486
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019487/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019488 which can conflict with char $ac_func (); below.
19489 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019490 <limits.h> exists even on freestanding compilers. */
19491
19492#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019493# include <limits.h>
19494#else
19495# include <assert.h>
19496#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019497
19498#undef $ac_func
19499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019500/* Override any GCC internal prototype to avoid an error.
19501 Use char because int might match the return type of a GCC
19502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019503#ifdef __cplusplus
19504extern "C"
19505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019506char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019507/* The GNU C library defines this for functions which it implements
19508 to always fail with ENOSYS. Some functions are actually named
19509 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019510#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019511choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019512#endif
19513
Skip Montanaro6dead952003-09-25 14:50:04 +000019514int
19515main ()
19516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019517return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019518 ;
19519 return 0;
19520}
19521_ACEOF
19522rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019523if { (ac_try="$ac_link"
19524case "(($ac_try" in
19525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19526 *) ac_try_echo=$ac_try;;
19527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019531 grep -v '^ *+' conftest.er1 >conftest.err
19532 rm -f conftest.er1
19533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019535 (exit $ac_status); } && {
19536 test -z "$ac_c_werror_flag" ||
19537 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019538 } && test -s conftest$ac_exeext &&
19539 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019541else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019543sed 's/^/| /' conftest.$ac_ext >&5
19544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019547
19548rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019549 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019551ac_res=`eval echo '${'$as_ac_var'}'`
19552 { echo "$as_me:$LINENO: result: $ac_res" >&5
19553echo "${ECHO_T}$ac_res" >&6; }
19554if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019555 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019556#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019557_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019558
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019559fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019560done
19561
Michael W. Hudson54241132001-12-07 15:38:26 +000019562
Martin v. Löwis11437992002-04-12 09:54:03 +000019563
19564
19565
Christian Heimesb186d002008-03-18 15:15:01 +000019566for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019567do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573else
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019575/* confdefs.h. */
19576_ACEOF
19577cat confdefs.h >>conftest.$ac_ext
19578cat >>conftest.$ac_ext <<_ACEOF
19579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19582#define $ac_func innocuous_$ac_func
19583
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019585 which can conflict with char $ac_func (); below.
19586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019587 <limits.h> exists even on freestanding compilers. */
19588
19589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019590# include <limits.h>
19591#else
19592# include <assert.h>
19593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019594
19595#undef $ac_func
19596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597/* Override any GCC internal prototype to avoid an error.
19598 Use char because int might match the return type of a GCC
19599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019600#ifdef __cplusplus
19601extern "C"
19602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019603char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019604/* The GNU C library defines this for functions which it implements
19605 to always fail with ENOSYS. Some functions are actually named
19606 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019607#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019608choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019609#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019610
Skip Montanaro6dead952003-09-25 14:50:04 +000019611int
19612main ()
19613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 ;
19616 return 0;
19617}
19618_ACEOF
19619rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019620if { (ac_try="$ac_link"
19621case "(($ac_try" in
19622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19623 *) ac_try_echo=$ac_try;;
19624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019628 grep -v '^ *+' conftest.er1 >conftest.err
19629 rm -f conftest.er1
19630 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019632 (exit $ac_status); } && {
19633 test -z "$ac_c_werror_flag" ||
19634 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019635 } && test -s conftest$ac_exeext &&
19636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019640sed 's/^/| /' conftest.$ac_ext >&5
19641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019642 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019644
19645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019647fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019648ac_res=`eval echo '${'$as_ac_var'}'`
19649 { echo "$as_me:$LINENO: result: $ac_res" >&5
19650echo "${ECHO_T}$ac_res" >&6; }
19651if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019652 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019654_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019655
Martin v. Löwis1142de32002-03-29 16:28:31 +000019656else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019657 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019658 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19660 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019661esac
19662
Martin v. Löwis1142de32002-03-29 16:28:31 +000019663fi
19664done
19665
19666
Martin v. Löwis11437992002-04-12 09:54:03 +000019667
Martin v. Löwis1142de32002-03-29 16:28:31 +000019668for ac_func in getpgrp
19669do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19671{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019675else
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019682/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19683 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19684#define $ac_func innocuous_$ac_func
19685
Martin v. Löwis1142de32002-03-29 16:28:31 +000019686/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019687 which can conflict with char $ac_func (); below.
19688 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019689 <limits.h> exists even on freestanding compilers. */
19690
19691#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019692# include <limits.h>
19693#else
19694# include <assert.h>
19695#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019696
19697#undef $ac_func
19698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019699/* Override any GCC internal prototype to avoid an error.
19700 Use char because int might match the return type of a GCC
19701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019702#ifdef __cplusplus
19703extern "C"
19704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019705char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019706/* The GNU C library defines this for functions which it implements
19707 to always fail with ENOSYS. Some functions are actually named
19708 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019709#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019710choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019711#endif
19712
Skip Montanaro6dead952003-09-25 14:50:04 +000019713int
19714main ()
19715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019716return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019717 ;
19718 return 0;
19719}
19720_ACEOF
19721rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019722if { (ac_try="$ac_link"
19723case "(($ac_try" in
19724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19725 *) ac_try_echo=$ac_try;;
19726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019728 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019730 grep -v '^ *+' conftest.er1 >conftest.err
19731 rm -f conftest.er1
19732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019734 (exit $ac_status); } && {
19735 test -z "$ac_c_werror_flag" ||
19736 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019737 } && test -s conftest$ac_exeext &&
19738 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019739 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019742sed 's/^/| /' conftest.$ac_ext >&5
19743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019744 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019746
19747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019748 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019749fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019750ac_res=`eval echo '${'$as_ac_var'}'`
19751 { echo "$as_me:$LINENO: result: $ac_res" >&5
19752echo "${ECHO_T}$ac_res" >&6; }
19753if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019754 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019755#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019756_ACEOF
19757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019758/* confdefs.h. */
19759_ACEOF
19760cat confdefs.h >>conftest.$ac_ext
19761cat >>conftest.$ac_ext <<_ACEOF
19762/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019763#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019764int
19765main ()
19766{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019767getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019768 ;
19769 return 0;
19770}
19771_ACEOF
19772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773if { (ac_try="$ac_compile"
19774case "(($ac_try" in
19775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19776 *) ac_try_echo=$ac_try;;
19777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019781 grep -v '^ *+' conftest.er1 >conftest.err
19782 rm -f conftest.er1
19783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019785 (exit $ac_status); } && {
19786 test -z "$ac_c_werror_flag" ||
19787 test ! -s conftest.err
19788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019789
19790cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019791#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019792_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019793
Martin v. Löwis11437992002-04-12 09:54:03 +000019794
Guido van Rossumf78abae1997-01-21 22:02:36 +000019795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019799
Guido van Rossum627b2d71993-12-24 10:39:16 +000019800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019801
19802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019803
Guido van Rossum627b2d71993-12-24 10:39:16 +000019804fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019805done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019806
Jack Jansen150753c2003-03-29 22:07:47 +000019807
19808for ac_func in setpgrp
19809do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019815else
Martin v. Löwis11437992002-04-12 09:54:03 +000019816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019817/* confdefs.h. */
19818_ACEOF
19819cat confdefs.h >>conftest.$ac_ext
19820cat >>conftest.$ac_ext <<_ACEOF
19821/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19824#define $ac_func innocuous_$ac_func
19825
Jack Jansen150753c2003-03-29 22:07:47 +000019826/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019827 which can conflict with char $ac_func (); below.
19828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019829 <limits.h> exists even on freestanding compilers. */
19830
19831#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019832# include <limits.h>
19833#else
19834# include <assert.h>
19835#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019836
19837#undef $ac_func
19838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019839/* Override any GCC internal prototype to avoid an error.
19840 Use char because int might match the return type of a GCC
19841 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019842#ifdef __cplusplus
19843extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019844#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019845char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019846/* The GNU C library defines this for functions which it implements
19847 to always fail with ENOSYS. Some functions are actually named
19848 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019849#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019850choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019851#endif
19852
Skip Montanaro6dead952003-09-25 14:50:04 +000019853int
19854main ()
19855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019856return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 ;
19858 return 0;
19859}
19860_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862if { (ac_try="$ac_link"
19863case "(($ac_try" in
19864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865 *) ac_try_echo=$ac_try;;
19866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874 (exit $ac_status); } && {
19875 test -z "$ac_c_werror_flag" ||
19876 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019877 } && test -s conftest$ac_exeext &&
19878 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019879 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019882sed 's/^/| /' conftest.$ac_ext >&5
19883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019884 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019886
19887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019890ac_res=`eval echo '${'$as_ac_var'}'`
19891 { echo "$as_me:$LINENO: result: $ac_res" >&5
19892echo "${ECHO_T}$ac_res" >&6; }
19893if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019894 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019896_ACEOF
19897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019898/* confdefs.h. */
19899_ACEOF
19900cat confdefs.h >>conftest.$ac_ext
19901cat >>conftest.$ac_ext <<_ACEOF
19902/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019903#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019904int
19905main ()
19906{
19907setpgrp(0,0);
19908 ;
19909 return 0;
19910}
19911_ACEOF
19912rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019913if { (ac_try="$ac_compile"
19914case "(($ac_try" in
19915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19916 *) ac_try_echo=$ac_try;;
19917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019919 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019921 grep -v '^ *+' conftest.er1 >conftest.err
19922 rm -f conftest.er1
19923 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925 (exit $ac_status); } && {
19926 test -z "$ac_c_werror_flag" ||
19927 test ! -s conftest.err
19928 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019929
19930cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019931#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019932_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019933
Jack Jansen150753c2003-03-29 22:07:47 +000019934
19935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019937sed 's/^/| /' conftest.$ac_ext >&5
19938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019939
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019941
19942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019943
19944fi
19945done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019946
Martin v. Löwis11437992002-04-12 09:54:03 +000019947
Thomas Wouters3a584202000-08-05 23:28:51 +000019948for ac_func in gettimeofday
19949do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019950as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19951{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19952echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019953if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019954 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019955else
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019957/* confdefs.h. */
19958_ACEOF
19959cat confdefs.h >>conftest.$ac_ext
19960cat >>conftest.$ac_ext <<_ACEOF
19961/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019962/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19963 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19964#define $ac_func innocuous_$ac_func
19965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019966/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019967 which can conflict with char $ac_func (); below.
19968 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019969 <limits.h> exists even on freestanding compilers. */
19970
19971#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019972# include <limits.h>
19973#else
19974# include <assert.h>
19975#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019976
19977#undef $ac_func
19978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979/* Override any GCC internal prototype to avoid an error.
19980 Use char because int might match the return type of a GCC
19981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019982#ifdef __cplusplus
19983extern "C"
19984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019985char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019986/* The GNU C library defines this for functions which it implements
19987 to always fail with ENOSYS. Some functions are actually named
19988 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019989#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019990choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019991#endif
19992
Skip Montanaro6dead952003-09-25 14:50:04 +000019993int
19994main ()
19995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019996return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 ;
19998 return 0;
19999}
20000_ACEOF
20001rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002if { (ac_try="$ac_link"
20003case "(($ac_try" in
20004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20005 *) ac_try_echo=$ac_try;;
20006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020010 grep -v '^ *+' conftest.er1 >conftest.err
20011 rm -f conftest.er1
20012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020014 (exit $ac_status); } && {
20015 test -z "$ac_c_werror_flag" ||
20016 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020017 } && test -s conftest$ac_exeext &&
20018 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020022sed 's/^/| /' conftest.$ac_ext >&5
20023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020024 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020026
20027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020028 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020029fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020030ac_res=`eval echo '${'$as_ac_var'}'`
20031 { echo "$as_me:$LINENO: result: $ac_res" >&5
20032echo "${ECHO_T}$ac_res" >&6; }
20033if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020034 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020035#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020036_ACEOF
20037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020038/* confdefs.h. */
20039_ACEOF
20040cat confdefs.h >>conftest.$ac_ext
20041cat >>conftest.$ac_ext <<_ACEOF
20042/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020043#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020044int
20045main ()
20046{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020047gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020048 ;
20049 return 0;
20050}
20051_ACEOF
20052rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020053if { (ac_try="$ac_compile"
20054case "(($ac_try" in
20055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20056 *) ac_try_echo=$ac_try;;
20057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020061 grep -v '^ *+' conftest.er1 >conftest.err
20062 rm -f conftest.er1
20063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020065 (exit $ac_status); } && {
20066 test -z "$ac_c_werror_flag" ||
20067 test ! -s conftest.err
20068 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020069 :
20070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020072sed 's/^/| /' conftest.$ac_ext >&5
20073
Martin v. Löwis11437992002-04-12 09:54:03 +000020074
20075cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020076#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020077_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020078
Martin v. Löwis11437992002-04-12 09:54:03 +000020079
Guido van Rossum627b2d71993-12-24 10:39:16 +000020080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020081
20082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020083
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020084fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020085done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020086
Michael W. Hudson54241132001-12-07 15:38:26 +000020087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020088{ echo "$as_me:$LINENO: checking for major" >&5
20089echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020091/* confdefs.h. */
20092_ACEOF
20093cat confdefs.h >>conftest.$ac_ext
20094cat >>conftest.$ac_ext <<_ACEOF
20095/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020096
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020097#if defined(MAJOR_IN_MKDEV)
20098#include <sys/mkdev.h>
20099#elif defined(MAJOR_IN_SYSMACROS)
20100#include <sys/sysmacros.h>
20101#else
20102#include <sys/types.h>
20103#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020104
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020105int
20106main ()
20107{
20108
20109 makedev(major(0),minor(0));
20110
20111 ;
20112 return 0;
20113}
20114_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020115rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020116if { (ac_try="$ac_link"
20117case "(($ac_try" in
20118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20119 *) ac_try_echo=$ac_try;;
20120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020124 grep -v '^ *+' conftest.er1 >conftest.err
20125 rm -f conftest.er1
20126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020128 (exit $ac_status); } && {
20129 test -z "$ac_c_werror_flag" ||
20130 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020131 } && test -s conftest$ac_exeext &&
20132 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020133
20134
20135cat >>confdefs.h <<\_ACEOF
20136#define HAVE_DEVICE_MACROS 1
20137_ACEOF
20138
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020139 { echo "$as_me:$LINENO: result: yes" >&5
20140echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020141
20142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020144sed 's/^/| /' conftest.$ac_ext >&5
20145
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020146
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020147 { echo "$as_me:$LINENO: result: no" >&5
20148echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020149
20150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020151
20152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020153 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020154
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020155# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020156# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020157{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20158echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020160/* confdefs.h. */
20161_ACEOF
20162cat confdefs.h >>conftest.$ac_ext
20163cat >>conftest.$ac_ext <<_ACEOF
20164/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020165
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020166#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020167#include <sys/socket.h>
20168#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020169#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020170
Martin v. Löwis11437992002-04-12 09:54:03 +000020171int
20172main ()
20173{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020174getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 ;
20176 return 0;
20177}
20178_ACEOF
20179rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020180if { (ac_try="$ac_link"
20181case "(($ac_try" in
20182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20183 *) ac_try_echo=$ac_try;;
20184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020188 grep -v '^ *+' conftest.er1 >conftest.err
20189 rm -f conftest.er1
20190 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020192 (exit $ac_status); } && {
20193 test -z "$ac_c_werror_flag" ||
20194 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020195 } && test -s conftest$ac_exeext &&
20196 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020197 have_getaddrinfo=yes
20198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020199 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020200sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020202 have_getaddrinfo=no
20203fi
20204
20205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20206 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020207{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20208echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020209if test $have_getaddrinfo = yes
20210then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020211 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20212echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020213 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020214 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020215else
20216 if test "$cross_compiling" = yes; then
20217 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020218else
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020220/* confdefs.h. */
20221_ACEOF
20222cat confdefs.h >>conftest.$ac_ext
20223cat >>conftest.$ac_ext <<_ACEOF
20224/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020225
20226#include <sys/types.h>
20227#include <netdb.h>
20228#include <string.h>
20229#include <sys/socket.h>
20230#include <netinet/in.h>
20231
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020232int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020233{
20234 int passive, gaierr, inet4 = 0, inet6 = 0;
20235 struct addrinfo hints, *ai, *aitop;
20236 char straddr[INET6_ADDRSTRLEN], strport[16];
20237
20238 for (passive = 0; passive <= 1; passive++) {
20239 memset(&hints, 0, sizeof(hints));
20240 hints.ai_family = AF_UNSPEC;
20241 hints.ai_flags = passive ? AI_PASSIVE : 0;
20242 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020243 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020244 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20245 (void)gai_strerror(gaierr);
20246 goto bad;
20247 }
20248 for (ai = aitop; ai; ai = ai->ai_next) {
20249 if (ai->ai_addr == NULL ||
20250 ai->ai_addrlen == 0 ||
20251 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20252 straddr, sizeof(straddr), strport, sizeof(strport),
20253 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20254 goto bad;
20255 }
20256 switch (ai->ai_family) {
20257 case AF_INET:
20258 if (strcmp(strport, "54321") != 0) {
20259 goto bad;
20260 }
20261 if (passive) {
20262 if (strcmp(straddr, "0.0.0.0") != 0) {
20263 goto bad;
20264 }
20265 } else {
20266 if (strcmp(straddr, "127.0.0.1") != 0) {
20267 goto bad;
20268 }
20269 }
20270 inet4++;
20271 break;
20272 case AF_INET6:
20273 if (strcmp(strport, "54321") != 0) {
20274 goto bad;
20275 }
20276 if (passive) {
20277 if (strcmp(straddr, "::") != 0) {
20278 goto bad;
20279 }
20280 } else {
20281 if (strcmp(straddr, "::1") != 0) {
20282 goto bad;
20283 }
20284 }
20285 inet6++;
20286 break;
20287 case AF_UNSPEC:
20288 goto bad;
20289 break;
20290 default:
20291 /* another family support? */
20292 break;
20293 }
20294 }
20295 }
20296
20297 if (!(inet4 == 0 || inet4 == 2))
20298 goto bad;
20299 if (!(inet6 == 0 || inet6 == 2))
20300 goto bad;
20301
20302 if (aitop)
20303 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020304 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020305
20306 bad:
20307 if (aitop)
20308 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020309 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020310}
20311
Martin v. Löwis11437992002-04-12 09:54:03 +000020312_ACEOF
20313rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314if { (ac_try="$ac_link"
20315case "(($ac_try" in
20316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20317 *) ac_try_echo=$ac_try;;
20318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020320 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324 { (case "(($ac_try" in
20325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20326 *) ac_try_echo=$ac_try;;
20327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020333 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020334else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020335 echo "$as_me: program exited with status $ac_status" >&5
20336echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020337sed 's/^/| /' conftest.$ac_ext >&5
20338
Martin v. Löwis11437992002-04-12 09:54:03 +000020339( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020340ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020342rm -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 +000020343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020344
20345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020346fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020347
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020350if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20351then
20352 if test $ipv6 = yes
20353 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020354 echo 'Fatal: You must get working getaddrinfo() function.'
20355 echo ' or you can specify "--disable-ipv6"'.
20356 exit 1
20357 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020358else
Martin v. Löwis11437992002-04-12 09:54:03 +000020359
20360cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020361#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020362_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020363
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020365
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020366for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020367do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20369{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020372 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020373else
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020375/* confdefs.h. */
20376_ACEOF
20377cat confdefs.h >>conftest.$ac_ext
20378cat >>conftest.$ac_ext <<_ACEOF
20379/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020380/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20381 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20382#define $ac_func innocuous_$ac_func
20383
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020384/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020385 which can conflict with char $ac_func (); below.
20386 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020387 <limits.h> exists even on freestanding compilers. */
20388
20389#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020390# include <limits.h>
20391#else
20392# include <assert.h>
20393#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020394
20395#undef $ac_func
20396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020397/* Override any GCC internal prototype to avoid an error.
20398 Use char because int might match the return type of a GCC
20399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020400#ifdef __cplusplus
20401extern "C"
20402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020403char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020404/* The GNU C library defines this for functions which it implements
20405 to always fail with ENOSYS. Some functions are actually named
20406 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020407#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020408choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020409#endif
20410
Skip Montanaro6dead952003-09-25 14:50:04 +000020411int
20412main ()
20413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020414return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 ;
20416 return 0;
20417}
20418_ACEOF
20419rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020420if { (ac_try="$ac_link"
20421case "(($ac_try" in
20422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20423 *) ac_try_echo=$ac_try;;
20424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020428 grep -v '^ *+' conftest.er1 >conftest.err
20429 rm -f conftest.er1
20430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020432 (exit $ac_status); } && {
20433 test -z "$ac_c_werror_flag" ||
20434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020435 } && test -s conftest$ac_exeext &&
20436 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020437 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020440sed 's/^/| /' conftest.$ac_ext >&5
20441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020442 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444
20445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020446 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020448ac_res=`eval echo '${'$as_ac_var'}'`
20449 { echo "$as_me:$LINENO: result: $ac_res" >&5
20450echo "${ECHO_T}$ac_res" >&6; }
20451if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020454_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020455
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020456fi
20457done
20458
Michael W. Hudson54241132001-12-07 15:38:26 +000020459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020460# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020461{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20462echo $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 +000020463if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020465else
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020472#include <sys/types.h>
20473#include <sys/time.h>
20474#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020475
Martin v. Löwis11437992002-04-12 09:54:03 +000020476int
20477main ()
20478{
20479if ((struct tm *) 0)
20480return 0;
20481 ;
20482 return 0;
20483}
20484_ACEOF
20485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020486if { (ac_try="$ac_compile"
20487case "(($ac_try" in
20488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20489 *) ac_try_echo=$ac_try;;
20490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020494 grep -v '^ *+' conftest.er1 >conftest.err
20495 rm -f conftest.er1
20496 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020498 (exit $ac_status); } && {
20499 test -z "$ac_c_werror_flag" ||
20500 test ! -s conftest.err
20501 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020502 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020505sed 's/^/| /' conftest.$ac_ext >&5
20506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020507 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020509
20510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020512{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20513echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020514if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020515
20516cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020518_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020519
20520fi
20521
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020522{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20523echo $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 +000020524if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526else
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020528/* confdefs.h. */
20529_ACEOF
20530cat confdefs.h >>conftest.$ac_ext
20531cat >>conftest.$ac_ext <<_ACEOF
20532/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020533#include <sys/types.h>
20534#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020535
Martin v. Löwis11437992002-04-12 09:54:03 +000020536int
20537main ()
20538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020539struct tm tm;
20540 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020541 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 ;
20543 return 0;
20544}
20545_ACEOF
20546rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020547if { (ac_try="$ac_compile"
20548case "(($ac_try" in
20549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20550 *) ac_try_echo=$ac_try;;
20551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020555 grep -v '^ *+' conftest.er1 >conftest.err
20556 rm -f conftest.er1
20557 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020559 (exit $ac_status); } && {
20560 test -z "$ac_c_werror_flag" ||
20561 test ! -s conftest.err
20562 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020563 ac_cv_struct_tm=time.h
20564else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020566sed 's/^/| /' conftest.$ac_ext >&5
20567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020568 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020570
20571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020573{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20574echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020575if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020576
20577cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020578#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020579_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020580
20581fi
20582
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020583{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20584echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020585if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020587else
Martin v. Löwis11437992002-04-12 09:54:03 +000020588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020589/* confdefs.h. */
20590_ACEOF
20591cat confdefs.h >>conftest.$ac_ext
20592cat >>conftest.$ac_ext <<_ACEOF
20593/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020594#include <sys/types.h>
20595#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020596
20597
Martin v. Löwis11437992002-04-12 09:54:03 +000020598int
20599main ()
20600{
20601static struct tm ac_aggr;
20602if (ac_aggr.tm_zone)
20603return 0;
20604 ;
20605 return 0;
20606}
20607_ACEOF
20608rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020609if { (ac_try="$ac_compile"
20610case "(($ac_try" in
20611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20612 *) ac_try_echo=$ac_try;;
20613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1
20619 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020621 (exit $ac_status); } && {
20622 test -z "$ac_c_werror_flag" ||
20623 test ! -s conftest.err
20624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020625 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020626else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020628sed 's/^/| /' conftest.$ac_ext >&5
20629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020631/* confdefs.h. */
20632_ACEOF
20633cat confdefs.h >>conftest.$ac_ext
20634cat >>conftest.$ac_ext <<_ACEOF
20635/* end confdefs.h. */
20636#include <sys/types.h>
20637#include <$ac_cv_struct_tm>
20638
20639
20640int
20641main ()
20642{
20643static struct tm ac_aggr;
20644if (sizeof ac_aggr.tm_zone)
20645return 0;
20646 ;
20647 return 0;
20648}
20649_ACEOF
20650rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020651if { (ac_try="$ac_compile"
20652case "(($ac_try" in
20653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20654 *) ac_try_echo=$ac_try;;
20655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020657 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020659 grep -v '^ *+' conftest.er1 >conftest.err
20660 rm -f conftest.er1
20661 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663 (exit $ac_status); } && {
20664 test -z "$ac_c_werror_flag" ||
20665 test ! -s conftest.err
20666 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020667 ac_cv_member_struct_tm_tm_zone=yes
20668else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020670sed 's/^/| /' conftest.$ac_ext >&5
20671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020672 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020674
20675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677
20678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020679fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020680{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20681echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20682if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020683
20684cat >>confdefs.h <<_ACEOF
20685#define HAVE_STRUCT_TM_TM_ZONE 1
20686_ACEOF
20687
20688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020689fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020690
Martin v. Löwis11437992002-04-12 09:54:03 +000020691if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20692
20693cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020695_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020696
20697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020698 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20699echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020700if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020701 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702else
20703 cat >conftest.$ac_ext <<_ACEOF
20704/* confdefs.h. */
20705_ACEOF
20706cat confdefs.h >>conftest.$ac_ext
20707cat >>conftest.$ac_ext <<_ACEOF
20708/* end confdefs.h. */
20709#include <time.h>
20710
20711int
20712main ()
20713{
20714#ifndef tzname
20715 (void) tzname;
20716#endif
20717
20718 ;
20719 return 0;
20720}
20721_ACEOF
20722rm -f conftest.$ac_objext
20723if { (ac_try="$ac_compile"
20724case "(($ac_try" in
20725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20726 *) ac_try_echo=$ac_try;;
20727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020729 (eval "$ac_compile") 2>conftest.er1
20730 ac_status=$?
20731 grep -v '^ *+' conftest.er1 >conftest.err
20732 rm -f conftest.er1
20733 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020735 (exit $ac_status); } && {
20736 test -z "$ac_c_werror_flag" ||
20737 test ! -s conftest.err
20738 } && test -s conftest.$ac_objext; then
20739 ac_cv_have_decl_tzname=yes
20740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020741 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742sed 's/^/| /' conftest.$ac_ext >&5
20743
20744 ac_cv_have_decl_tzname=no
20745fi
20746
20747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020749{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20750echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20751if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752
20753cat >>confdefs.h <<_ACEOF
20754#define HAVE_DECL_TZNAME 1
20755_ACEOF
20756
20757
20758else
20759 cat >>confdefs.h <<_ACEOF
20760#define HAVE_DECL_TZNAME 0
20761_ACEOF
20762
20763
20764fi
20765
20766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020767 { echo "$as_me:$LINENO: checking for tzname" >&5
20768echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020769if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020771else
Martin v. Löwis11437992002-04-12 09:54:03 +000020772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020773/* confdefs.h. */
20774_ACEOF
20775cat confdefs.h >>conftest.$ac_ext
20776cat >>conftest.$ac_ext <<_ACEOF
20777/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020778#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779#if !HAVE_DECL_TZNAME
20780extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020782
Martin v. Löwis11437992002-04-12 09:54:03 +000020783int
20784main ()
20785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020786return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 ;
20788 return 0;
20789}
20790_ACEOF
20791rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020792if { (ac_try="$ac_link"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020798 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020807 } && test -s conftest$ac_exeext &&
20808 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020809 ac_cv_var_tzname=yes
20810else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020812sed 's/^/| /' conftest.$ac_ext >&5
20813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020814 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020816
20817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020819fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020820{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20821echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020822 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020823
20824cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020826_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020827
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020828 fi
20829fi
20830
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020831{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20832echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020833if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020834 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020835else
20836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020837/* confdefs.h. */
20838_ACEOF
20839cat confdefs.h >>conftest.$ac_ext
20840cat >>conftest.$ac_ext <<_ACEOF
20841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020842$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020843int
20844main ()
20845{
20846static struct stat ac_aggr;
20847if (ac_aggr.st_rdev)
20848return 0;
20849 ;
20850 return 0;
20851}
20852_ACEOF
20853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020854if { (ac_try="$ac_compile"
20855case "(($ac_try" in
20856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20857 *) ac_try_echo=$ac_try;;
20858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020862 grep -v '^ *+' conftest.er1 >conftest.err
20863 rm -f conftest.er1
20864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020866 (exit $ac_status); } && {
20867 test -z "$ac_c_werror_flag" ||
20868 test ! -s conftest.err
20869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020870 ac_cv_member_struct_stat_st_rdev=yes
20871else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020873sed 's/^/| /' conftest.$ac_ext >&5
20874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020876/* confdefs.h. */
20877_ACEOF
20878cat confdefs.h >>conftest.$ac_ext
20879cat >>conftest.$ac_ext <<_ACEOF
20880/* end confdefs.h. */
20881$ac_includes_default
20882int
20883main ()
20884{
20885static struct stat ac_aggr;
20886if (sizeof ac_aggr.st_rdev)
20887return 0;
20888 ;
20889 return 0;
20890}
20891_ACEOF
20892rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893if { (ac_try="$ac_compile"
20894case "(($ac_try" in
20895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20896 *) ac_try_echo=$ac_try;;
20897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020901 grep -v '^ *+' conftest.er1 >conftest.err
20902 rm -f conftest.er1
20903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020905 (exit $ac_status); } && {
20906 test -z "$ac_c_werror_flag" ||
20907 test ! -s conftest.err
20908 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020909 ac_cv_member_struct_stat_st_rdev=yes
20910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020912sed 's/^/| /' conftest.$ac_ext >&5
20913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020916
20917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919
20920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020921fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020922{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20923echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20924if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020925
20926cat >>confdefs.h <<_ACEOF
20927#define HAVE_STRUCT_STAT_ST_RDEV 1
20928_ACEOF
20929
20930
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020931fi
20932
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020933{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20934echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020935if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020936 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020937else
Martin v. Löwis11437992002-04-12 09:54:03 +000020938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020939/* confdefs.h. */
20940_ACEOF
20941cat confdefs.h >>conftest.$ac_ext
20942cat >>conftest.$ac_ext <<_ACEOF
20943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020944$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020945int
20946main ()
20947{
20948static struct stat ac_aggr;
20949if (ac_aggr.st_blksize)
20950return 0;
20951 ;
20952 return 0;
20953}
20954_ACEOF
20955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020956if { (ac_try="$ac_compile"
20957case "(($ac_try" in
20958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20959 *) ac_try_echo=$ac_try;;
20960esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020964 grep -v '^ *+' conftest.er1 >conftest.err
20965 rm -f conftest.er1
20966 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020968 (exit $ac_status); } && {
20969 test -z "$ac_c_werror_flag" ||
20970 test ! -s conftest.err
20971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020972 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020975sed 's/^/| /' conftest.$ac_ext >&5
20976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020978/* confdefs.h. */
20979_ACEOF
20980cat confdefs.h >>conftest.$ac_ext
20981cat >>conftest.$ac_ext <<_ACEOF
20982/* end confdefs.h. */
20983$ac_includes_default
20984int
20985main ()
20986{
20987static struct stat ac_aggr;
20988if (sizeof ac_aggr.st_blksize)
20989return 0;
20990 ;
20991 return 0;
20992}
20993_ACEOF
20994rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020995if { (ac_try="$ac_compile"
20996case "(($ac_try" in
20997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20998 *) ac_try_echo=$ac_try;;
20999esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021001 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021003 grep -v '^ *+' conftest.er1 >conftest.err
21004 rm -f conftest.er1
21005 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021007 (exit $ac_status); } && {
21008 test -z "$ac_c_werror_flag" ||
21009 test ! -s conftest.err
21010 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021011 ac_cv_member_struct_stat_st_blksize=yes
21012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021014sed 's/^/| /' conftest.$ac_ext >&5
21015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021018
21019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021021
21022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021023fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021024{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21025echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21026if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021027
Martin v. Löwis11437992002-04-12 09:54:03 +000021028cat >>confdefs.h <<_ACEOF
21029#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21030_ACEOF
21031
21032
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021033fi
21034
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021035{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21036echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021037if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021038 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021039else
21040 cat >conftest.$ac_ext <<_ACEOF
21041/* confdefs.h. */
21042_ACEOF
21043cat confdefs.h >>conftest.$ac_ext
21044cat >>conftest.$ac_ext <<_ACEOF
21045/* end confdefs.h. */
21046$ac_includes_default
21047int
21048main ()
21049{
21050static struct stat ac_aggr;
21051if (ac_aggr.st_flags)
21052return 0;
21053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058if { (ac_try="$ac_compile"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021064 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021065 ac_status=$?
21066 grep -v '^ *+' conftest.er1 >conftest.err
21067 rm -f conftest.er1
21068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021070 (exit $ac_status); } && {
21071 test -z "$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021074 ac_cv_member_struct_stat_st_flags=yes
21075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021076 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021077sed 's/^/| /' conftest.$ac_ext >&5
21078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021080/* confdefs.h. */
21081_ACEOF
21082cat confdefs.h >>conftest.$ac_ext
21083cat >>conftest.$ac_ext <<_ACEOF
21084/* end confdefs.h. */
21085$ac_includes_default
21086int
21087main ()
21088{
21089static struct stat ac_aggr;
21090if (sizeof ac_aggr.st_flags)
21091return 0;
21092 ;
21093 return 0;
21094}
21095_ACEOF
21096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097if { (ac_try="$ac_compile"
21098case "(($ac_try" in
21099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21100 *) ac_try_echo=$ac_try;;
21101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021103 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021104 ac_status=$?
21105 grep -v '^ *+' conftest.er1 >conftest.err
21106 rm -f conftest.er1
21107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109 (exit $ac_status); } && {
21110 test -z "$ac_c_werror_flag" ||
21111 test ! -s conftest.err
21112 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021113 ac_cv_member_struct_stat_st_flags=yes
21114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021115 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021116sed 's/^/| /' conftest.$ac_ext >&5
21117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021118 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021120
21121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021123
21124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021125fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021126{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21127echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21128if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021129
21130cat >>confdefs.h <<_ACEOF
21131#define HAVE_STRUCT_STAT_ST_FLAGS 1
21132_ACEOF
21133
21134
21135fi
21136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021137{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21138echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021139if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021140 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021141else
21142 cat >conftest.$ac_ext <<_ACEOF
21143/* confdefs.h. */
21144_ACEOF
21145cat confdefs.h >>conftest.$ac_ext
21146cat >>conftest.$ac_ext <<_ACEOF
21147/* end confdefs.h. */
21148$ac_includes_default
21149int
21150main ()
21151{
21152static struct stat ac_aggr;
21153if (ac_aggr.st_gen)
21154return 0;
21155 ;
21156 return 0;
21157}
21158_ACEOF
21159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160if { (ac_try="$ac_compile"
21161case "(($ac_try" in
21162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21163 *) ac_try_echo=$ac_try;;
21164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021167 ac_status=$?
21168 grep -v '^ *+' conftest.er1 >conftest.err
21169 rm -f conftest.er1
21170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021172 (exit $ac_status); } && {
21173 test -z "$ac_c_werror_flag" ||
21174 test ! -s conftest.err
21175 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021176 ac_cv_member_struct_stat_st_gen=yes
21177else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021178 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021179sed 's/^/| /' conftest.$ac_ext >&5
21180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021181 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021182/* confdefs.h. */
21183_ACEOF
21184cat confdefs.h >>conftest.$ac_ext
21185cat >>conftest.$ac_ext <<_ACEOF
21186/* end confdefs.h. */
21187$ac_includes_default
21188int
21189main ()
21190{
21191static struct stat ac_aggr;
21192if (sizeof ac_aggr.st_gen)
21193return 0;
21194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199if { (ac_try="$ac_compile"
21200case "(($ac_try" in
21201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21202 *) ac_try_echo=$ac_try;;
21203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021206 ac_status=$?
21207 grep -v '^ *+' conftest.er1 >conftest.err
21208 rm -f conftest.er1
21209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211 (exit $ac_status); } && {
21212 test -z "$ac_c_werror_flag" ||
21213 test ! -s conftest.err
21214 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021215 ac_cv_member_struct_stat_st_gen=yes
21216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021217 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021218sed 's/^/| /' conftest.$ac_ext >&5
21219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222
21223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225
21226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021227fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021228{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21229echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21230if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021231
21232cat >>confdefs.h <<_ACEOF
21233#define HAVE_STRUCT_STAT_ST_GEN 1
21234_ACEOF
21235
21236
21237fi
21238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021239{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21240echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021241if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021243else
21244 cat >conftest.$ac_ext <<_ACEOF
21245/* confdefs.h. */
21246_ACEOF
21247cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */
21250$ac_includes_default
21251int
21252main ()
21253{
21254static struct stat ac_aggr;
21255if (ac_aggr.st_birthtime)
21256return 0;
21257 ;
21258 return 0;
21259}
21260_ACEOF
21261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021262if { (ac_try="$ac_compile"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021269 ac_status=$?
21270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274 (exit $ac_status); } && {
21275 test -z "$ac_c_werror_flag" ||
21276 test ! -s conftest.err
21277 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021278 ac_cv_member_struct_stat_st_birthtime=yes
21279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021280 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021281sed 's/^/| /' conftest.$ac_ext >&5
21282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
21289$ac_includes_default
21290int
21291main ()
21292{
21293static struct stat ac_aggr;
21294if (sizeof ac_aggr.st_birthtime)
21295return 0;
21296 ;
21297 return 0;
21298}
21299_ACEOF
21300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301if { (ac_try="$ac_compile"
21302case "(($ac_try" in
21303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21304 *) ac_try_echo=$ac_try;;
21305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021308 ac_status=$?
21309 grep -v '^ *+' conftest.er1 >conftest.err
21310 rm -f conftest.er1
21311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313 (exit $ac_status); } && {
21314 test -z "$ac_c_werror_flag" ||
21315 test ! -s conftest.err
21316 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021317 ac_cv_member_struct_stat_st_birthtime=yes
21318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021319 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021320sed 's/^/| /' conftest.$ac_ext >&5
21321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324
21325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327
21328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21331echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21332if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021333
21334cat >>confdefs.h <<_ACEOF
21335#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21336_ACEOF
21337
21338
21339fi
21340
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021341{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21342echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021343if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021345else
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021347/* confdefs.h. */
21348_ACEOF
21349cat confdefs.h >>conftest.$ac_ext
21350cat >>conftest.$ac_ext <<_ACEOF
21351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021353int
21354main ()
21355{
21356static struct stat ac_aggr;
21357if (ac_aggr.st_blocks)
21358return 0;
21359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021364if { (ac_try="$ac_compile"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021383sed 's/^/| /' conftest.$ac_ext >&5
21384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021386/* confdefs.h. */
21387_ACEOF
21388cat confdefs.h >>conftest.$ac_ext
21389cat >>conftest.$ac_ext <<_ACEOF
21390/* end confdefs.h. */
21391$ac_includes_default
21392int
21393main ()
21394{
21395static struct stat ac_aggr;
21396if (sizeof ac_aggr.st_blocks)
21397return 0;
21398 ;
21399 return 0;
21400}
21401_ACEOF
21402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403if { (ac_try="$ac_compile"
21404case "(($ac_try" in
21405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21406 *) ac_try_echo=$ac_try;;
21407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 (exit $ac_status); } && {
21416 test -z "$ac_c_werror_flag" ||
21417 test ! -s conftest.err
21418 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021419 ac_cv_member_struct_stat_st_blocks=yes
21420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021426
21427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429
21430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021432{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21433echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21434if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021435
Martin v. Löwis11437992002-04-12 09:54:03 +000021436cat >>confdefs.h <<_ACEOF
21437#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21438_ACEOF
21439
21440
21441cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021442#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021443_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021444
21445else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021446 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021447 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021448 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21449 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021450esac
21451
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021452fi
21453
Michael W. Hudson54241132001-12-07 15:38:26 +000021454
Martin v. Löwis11437992002-04-12 09:54:03 +000021455
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021456{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21457echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021458if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021459 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021460else
Martin v. Löwis11437992002-04-12 09:54:03 +000021461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021462/* confdefs.h. */
21463_ACEOF
21464cat confdefs.h >>conftest.$ac_ext
21465cat >>conftest.$ac_ext <<_ACEOF
21466/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021468int
21469main ()
21470{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021471return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021472 ;
21473 return 0;
21474}
21475_ACEOF
21476rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477if { (ac_try="$ac_compile"
21478case "(($ac_try" in
21479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21480 *) ac_try_echo=$ac_try;;
21481esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021485 grep -v '^ *+' conftest.er1 >conftest.err
21486 rm -f conftest.er1
21487 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021489 (exit $ac_status); } && {
21490 test -z "$ac_c_werror_flag" ||
21491 test ! -s conftest.err
21492 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021493 ac_cv_header_time_altzone=yes
21494else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021496sed 's/^/| /' conftest.$ac_ext >&5
21497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021498 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21502fi
21503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021504{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21505echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021506if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021507
21508cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021509#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021510_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021511
21512fi
21513
Guido van Rossumda88dad1995-01-26 00:46:29 +000021514was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021515{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21516echo $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 +000021517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021518/* confdefs.h. */
21519_ACEOF
21520cat confdefs.h >>conftest.$ac_ext
21521cat >>conftest.$ac_ext <<_ACEOF
21522/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021523
21524#include <sys/types.h>
21525#include <sys/select.h>
21526#include <sys/time.h>
21527
Martin v. Löwis11437992002-04-12 09:54:03 +000021528int
21529main ()
21530{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021531;
Martin v. Löwis11437992002-04-12 09:54:03 +000021532 ;
21533 return 0;
21534}
21535_ACEOF
21536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021537if { (ac_try="$ac_compile"
21538case "(($ac_try" in
21539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21540 *) ac_try_echo=$ac_try;;
21541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021545 grep -v '^ *+' conftest.er1 >conftest.err
21546 rm -f conftest.er1
21547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021549 (exit $ac_status); } && {
21550 test -z "$ac_c_werror_flag" ||
21551 test ! -s conftest.err
21552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021553
21554
21555cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021556#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021557_ACEOF
21558
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021559 was_it_defined=yes
21560
Guido van Rossumf78abae1997-01-21 22:02:36 +000021561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021563sed 's/^/| /' conftest.$ac_ext >&5
21564
Thomas Wouters477c8d52006-05-27 19:21:47 +000021565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021566fi
21567
21568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021569{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21570echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021571
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021572{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21573echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021574if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021575 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021576else
Martin v. Löwis11437992002-04-12 09:54:03 +000021577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021578/* confdefs.h. */
21579_ACEOF
21580cat confdefs.h >>conftest.$ac_ext
21581cat >>conftest.$ac_ext <<_ACEOF
21582/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021583
21584# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021585int
21586main ()
21587{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021588struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021589 ;
21590 return 0;
21591}
21592_ACEOF
21593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594if { (ac_try="$ac_compile"
21595case "(($ac_try" in
21596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21597 *) ac_try_echo=$ac_try;;
21598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021602 grep -v '^ *+' conftest.er1 >conftest.err
21603 rm -f conftest.er1
21604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021606 (exit $ac_status); } && {
21607 test -z "$ac_c_werror_flag" ||
21608 test ! -s conftest.err
21609 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021610 ac_cv_struct_addrinfo=yes
21611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021613sed 's/^/| /' conftest.$ac_ext >&5
21614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021615 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021616fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21619fi
21620
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021621{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21622echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021623if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021624
21625cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021626#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021627_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021628
21629fi
21630
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021631{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21632echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021633if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021634 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +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öwis01dfdb32001-06-23 16:30:13 +000021642
21643# include <sys/types.h>
21644# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021645int
21646main ()
21647{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021648struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 ;
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öwis01dfdb32001-06-23 16:30:13 +000021670 ac_cv_struct_sockaddr_storage=yes
21671else
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 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21679fi
21680
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021681{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21682echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021683if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021684
21685cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021686#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021687_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021688
21689fi
21690
Guido van Rossum627b2d71993-12-24 10:39:16 +000021691# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021692
Michael W. Hudson54241132001-12-07 15:38:26 +000021693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021694{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21695echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021696if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021697 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021698else
Martin v. Löwis11437992002-04-12 09:54:03 +000021699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021700/* confdefs.h. */
21701_ACEOF
21702cat confdefs.h >>conftest.$ac_ext
21703cat >>conftest.$ac_ext <<_ACEOF
21704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021705$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021706int
21707main ()
21708{
21709static int test_array [1 - 2 * !(((char) -1) < 0)];
21710test_array [0] = 0
21711
21712 ;
21713 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021714}
Martin v. Löwis11437992002-04-12 09:54:03 +000021715_ACEOF
21716rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021717if { (ac_try="$ac_compile"
21718case "(($ac_try" in
21719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21720 *) ac_try_echo=$ac_try;;
21721esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021725 grep -v '^ *+' conftest.er1 >conftest.err
21726 rm -f conftest.er1
21727 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 (exit $ac_status); } && {
21730 test -z "$ac_c_werror_flag" ||
21731 test ! -s conftest.err
21732 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021733 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021734else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021736sed 's/^/| /' conftest.$ac_ext >&5
21737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021740
21741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021742fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021743{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21744echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021745if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021747#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021748_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021749
21750fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021752{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21753echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021754if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021756else
21757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021758/* confdefs.h. */
21759_ACEOF
21760cat confdefs.h >>conftest.$ac_ext
21761cat >>conftest.$ac_ext <<_ACEOF
21762/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021763
Martin v. Löwis11437992002-04-12 09:54:03 +000021764int
21765main ()
21766{
21767/* FIXME: Include the comments suggested by Paul. */
21768#ifndef __cplusplus
21769 /* Ultrix mips cc rejects this. */
21770 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021773 char const *const *pcpcc;
21774 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021775 /* NEC SVR4.0.2 mips cc rejects this. */
21776 struct point {int x, y;};
21777 static struct point const zero = {0,0};
21778 /* AIX XL C 1.02.0.0 rejects this.
21779 It does not let you subtract one const X* pointer from another in
21780 an arm of an if-expression whose if-part is not a constant
21781 expression */
21782 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021783 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021784 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785 ++pcpcc;
21786 ppc = (char**) pcpcc;
21787 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021788 { /* SCO 3.2v4 cc rejects this. */
21789 char *t;
21790 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021791
Martin v. Löwis11437992002-04-12 09:54:03 +000021792 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021793 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021794 }
21795 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21796 int x[] = {25, 17};
21797 const int *foo = &x[0];
21798 ++foo;
21799 }
21800 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21801 typedef const int *iptr;
21802 iptr p = 0;
21803 ++p;
21804 }
21805 { /* AIX XL C 1.02.0.0 rejects this saying
21806 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21807 struct s { int j; const int *ap[3]; };
21808 struct s *b; b->j = 5;
21809 }
21810 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21811 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021812 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021814 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021815#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021816
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ;
21818 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021819}
Martin v. Löwis11437992002-04-12 09:54:03 +000021820_ACEOF
21821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822if { (ac_try="$ac_compile"
21823case "(($ac_try" in
21824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825 *) ac_try_echo=$ac_try;;
21826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021830 grep -v '^ *+' conftest.er1 >conftest.err
21831 rm -f conftest.er1
21832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834 (exit $ac_status); } && {
21835 test -z "$ac_c_werror_flag" ||
21836 test ! -s conftest.err
21837 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021838 ac_cv_c_const=yes
21839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021841sed 's/^/| /' conftest.$ac_ext >&5
21842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021843 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021845
21846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021847fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021848{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21849echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021850if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021851
21852cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021853#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855
21856fi
21857
Michael W. Hudson54241132001-12-07 15:38:26 +000021858
Guido van Rossumda88dad1995-01-26 00:46:29 +000021859works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021860{ echo "$as_me:$LINENO: checking for working volatile" >&5
21861echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021863/* confdefs.h. */
21864_ACEOF
21865cat confdefs.h >>conftest.$ac_ext
21866cat >>conftest.$ac_ext <<_ACEOF
21867/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021868
Martin v. Löwis11437992002-04-12 09:54:03 +000021869int
21870main ()
21871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021872volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021873 ;
21874 return 0;
21875}
21876_ACEOF
21877rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021878if { (ac_try="$ac_compile"
21879case "(($ac_try" in
21880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21881 *) ac_try_echo=$ac_try;;
21882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886 grep -v '^ *+' conftest.er1 >conftest.err
21887 rm -f conftest.er1
21888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021890 (exit $ac_status); } && {
21891 test -z "$ac_c_werror_flag" ||
21892 test ! -s conftest.err
21893 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021894 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021897sed 's/^/| /' conftest.$ac_ext >&5
21898
Martin v. Löwis11437992002-04-12 09:54:03 +000021899
21900cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021901#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021902_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021903
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021904
Guido van Rossum627b2d71993-12-24 10:39:16 +000021905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906
21907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021908{ echo "$as_me:$LINENO: result: $works" >&5
21909echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021910
Guido van Rossumda88dad1995-01-26 00:46:29 +000021911works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021912{ echo "$as_me:$LINENO: checking for working signed char" >&5
21913echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021915/* confdefs.h. */
21916_ACEOF
21917cat confdefs.h >>conftest.$ac_ext
21918cat >>conftest.$ac_ext <<_ACEOF
21919/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021920
Martin v. Löwis11437992002-04-12 09:54:03 +000021921int
21922main ()
21923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021924signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021925 ;
21926 return 0;
21927}
21928_ACEOF
21929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021930if { (ac_try="$ac_compile"
21931case "(($ac_try" in
21932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21933 *) ac_try_echo=$ac_try;;
21934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021938 grep -v '^ *+' conftest.er1 >conftest.err
21939 rm -f conftest.er1
21940 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021942 (exit $ac_status); } && {
21943 test -z "$ac_c_werror_flag" ||
21944 test ! -s conftest.err
21945 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021946 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021947else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021949sed 's/^/| /' conftest.$ac_ext >&5
21950
Martin v. Löwis11437992002-04-12 09:54:03 +000021951
21952cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021953#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021954_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021955
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021956
Guido van Rossum7f43da71994-08-01 12:15:30 +000021957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021958
21959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021960{ echo "$as_me:$LINENO: result: $works" >&5
21961echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021962
Guido van Rossumda88dad1995-01-26 00:46:29 +000021963have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021964{ echo "$as_me:$LINENO: checking for prototypes" >&5
21965echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021967/* confdefs.h. */
21968_ACEOF
21969cat confdefs.h >>conftest.$ac_ext
21970cat >>conftest.$ac_ext <<_ACEOF
21971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021972int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021973int
21974main ()
21975{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021976return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 ;
21978 return 0;
21979}
21980_ACEOF
21981rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021982if { (ac_try="$ac_compile"
21983case "(($ac_try" in
21984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21985 *) ac_try_echo=$ac_try;;
21986esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021990 grep -v '^ *+' conftest.er1 >conftest.err
21991 rm -f conftest.er1
21992 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021994 (exit $ac_status); } && {
21995 test -z "$ac_c_werror_flag" ||
21996 test ! -s conftest.err
21997 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021998
21999
22000cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022001#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022002_ACEOF
22003
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022004 have_prototypes=yes
22005
Guido van Rossumf78abae1997-01-21 22:02:36 +000022006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022008sed 's/^/| /' conftest.$ac_ext >&5
22009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022010
Guido van Rossum7f43da71994-08-01 12:15:30 +000022011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022012
22013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022014{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22015echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022016
Guido van Rossumda88dad1995-01-26 00:46:29 +000022017works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022018{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22019echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022021/* confdefs.h. */
22022_ACEOF
22023cat confdefs.h >>conftest.$ac_ext
22024cat >>conftest.$ac_ext <<_ACEOF
22025/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022026
22027#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022028int foo(int x, ...) {
22029 va_list va;
22030 va_start(va, x);
22031 va_arg(va, int);
22032 va_arg(va, char *);
22033 va_arg(va, double);
22034 return 0;
22035}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022036
Martin v. Löwis11437992002-04-12 09:54:03 +000022037int
22038main ()
22039{
Guido van Rossum90eea071996-08-30 20:58:57 +000022040return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 ;
22042 return 0;
22043}
22044_ACEOF
22045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022046if { (ac_try="$ac_compile"
22047case "(($ac_try" in
22048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22049 *) ac_try_echo=$ac_try;;
22050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054 grep -v '^ *+' conftest.er1 >conftest.err
22055 rm -f conftest.er1
22056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022058 (exit $ac_status); } && {
22059 test -z "$ac_c_werror_flag" ||
22060 test ! -s conftest.err
22061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022062
22063
22064cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022065#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022066_ACEOF
22067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022068 works=yes
22069
Guido van Rossumf78abae1997-01-21 22:02:36 +000022070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022072sed 's/^/| /' conftest.$ac_ext >&5
22073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074
Guido van Rossum627b2d71993-12-24 10:39:16 +000022075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022076
22077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022078{ echo "$as_me:$LINENO: result: $works" >&5
22079echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022080
Martin v. Löwisd6320502004-08-12 13:45:08 +000022081# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022082{ echo "$as_me:$LINENO: checking for socketpair" >&5
22083echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022084cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022085/* confdefs.h. */
22086_ACEOF
22087cat confdefs.h >>conftest.$ac_ext
22088cat >>conftest.$ac_ext <<_ACEOF
22089/* end confdefs.h. */
22090
22091#include <sys/types.h>
22092#include <sys/socket.h>
22093
22094int
22095main ()
22096{
22097void *x=socketpair
22098 ;
22099 return 0;
22100}
22101_ACEOF
22102rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022103if { (ac_try="$ac_compile"
22104case "(($ac_try" in
22105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22106 *) ac_try_echo=$ac_try;;
22107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022111 grep -v '^ *+' conftest.er1 >conftest.err
22112 rm -f conftest.er1
22113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022115 (exit $ac_status); } && {
22116 test -z "$ac_c_werror_flag" ||
22117 test ! -s conftest.err
22118 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022119
22120cat >>confdefs.h <<\_ACEOF
22121#define HAVE_SOCKETPAIR 1
22122_ACEOF
22123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022124 { echo "$as_me:$LINENO: result: yes" >&5
22125echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022127 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022128sed 's/^/| /' conftest.$ac_ext >&5
22129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022130 { echo "$as_me:$LINENO: result: no" >&5
22131echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022132
22133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022134
22135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022136
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022137# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022138{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22139echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022141/* confdefs.h. */
22142_ACEOF
22143cat confdefs.h >>conftest.$ac_ext
22144cat >>conftest.$ac_ext <<_ACEOF
22145/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022146#include <sys/types.h>
22147#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022148int
22149main ()
22150{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022151struct sockaddr x;
22152x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 ;
22154 return 0;
22155}
22156_ACEOF
22157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022158if { (ac_try="$ac_compile"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022166 grep -v '^ *+' conftest.er1 >conftest.err
22167 rm -f conftest.er1
22168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022170 (exit $ac_status); } && {
22171 test -z "$ac_c_werror_flag" ||
22172 test ! -s conftest.err
22173 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022174 { echo "$as_me:$LINENO: result: yes" >&5
22175echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022176
22177cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022178#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022179_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022180
22181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022183sed 's/^/| /' conftest.$ac_ext >&5
22184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022185 { echo "$as_me:$LINENO: result: no" >&5
22186echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022188
22189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022190
Guido van Rossumda88dad1995-01-26 00:46:29 +000022191va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022192{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22193echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022195/* confdefs.h. */
22196_ACEOF
22197cat confdefs.h >>conftest.$ac_ext
22198cat >>conftest.$ac_ext <<_ACEOF
22199/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022200
22201#ifdef HAVE_STDARG_PROTOTYPES
22202#include <stdarg.h>
22203#else
22204#include <varargs.h>
22205#endif
22206
Martin v. Löwis11437992002-04-12 09:54:03 +000022207int
22208main ()
22209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022210va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 ;
22212 return 0;
22213}
22214_ACEOF
22215rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022216if { (ac_try="$ac_compile"
22217case "(($ac_try" in
22218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22219 *) ac_try_echo=$ac_try;;
22220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022224 grep -v '^ *+' conftest.er1 >conftest.err
22225 rm -f conftest.er1
22226 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022228 (exit $ac_status); } && {
22229 test -z "$ac_c_werror_flag" ||
22230 test ! -s conftest.err
22231 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022232 :
22233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022235sed 's/^/| /' conftest.$ac_ext >&5
22236
Martin v. Löwis11437992002-04-12 09:54:03 +000022237
22238
22239cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022240#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022241_ACEOF
22242
Guido van Rossumda88dad1995-01-26 00:46:29 +000022243 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022244
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022246
22247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022248{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22249echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022250
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022251# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022252
22253
22254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022255{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22256echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022257if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022259else
Martin v. Löwis11437992002-04-12 09:54:03 +000022260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022261/* confdefs.h. */
22262_ACEOF
22263cat confdefs.h >>conftest.$ac_ext
22264cat >>conftest.$ac_ext <<_ACEOF
22265/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022266/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22268#define gethostbyname_r innocuous_gethostbyname_r
22269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022270/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022271 which can conflict with char gethostbyname_r (); below.
22272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022273 <limits.h> exists even on freestanding compilers. */
22274
22275#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022276# include <limits.h>
22277#else
22278# include <assert.h>
22279#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022280
22281#undef gethostbyname_r
22282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022283/* Override any GCC internal prototype to avoid an error.
22284 Use char because int might match the return type of a GCC
22285 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022286#ifdef __cplusplus
22287extern "C"
22288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022289char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022290/* The GNU C library defines this for functions which it implements
22291 to always fail with ENOSYS. Some functions are actually named
22292 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022293#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022294choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022295#endif
22296
Skip Montanaro6dead952003-09-25 14:50:04 +000022297int
22298main ()
22299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022300return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 ;
22302 return 0;
22303}
22304_ACEOF
22305rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022306if { (ac_try="$ac_link"
22307case "(($ac_try" in
22308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22309 *) ac_try_echo=$ac_try;;
22310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022312 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022314 grep -v '^ *+' conftest.er1 >conftest.err
22315 rm -f conftest.er1
22316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022318 (exit $ac_status); } && {
22319 test -z "$ac_c_werror_flag" ||
22320 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022321 } && test -s conftest$ac_exeext &&
22322 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022326sed 's/^/| /' conftest.$ac_ext >&5
22327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022328 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022330
22331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022332 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022334{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22335echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22336if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022337
Martin v. Löwis11437992002-04-12 09:54:03 +000022338 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022339#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022340_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022342 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22343echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022344 OLD_CFLAGS=$CFLAGS
22345 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022347/* confdefs.h. */
22348_ACEOF
22349cat confdefs.h >>conftest.$ac_ext
22350cat >>conftest.$ac_ext <<_ACEOF
22351/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022352
22353# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022354
Martin v. Löwis11437992002-04-12 09:54:03 +000022355int
22356main ()
22357{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022358
22359 char *name;
22360 struct hostent *he, *res;
22361 char buffer[2048];
22362 int buflen = 2048;
22363 int h_errnop;
22364
22365 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022366
22367 ;
22368 return 0;
22369}
22370_ACEOF
22371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022372if { (ac_try="$ac_compile"
22373case "(($ac_try" in
22374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22375 *) ac_try_echo=$ac_try;;
22376esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022380 grep -v '^ *+' conftest.er1 >conftest.err
22381 rm -f conftest.er1
22382 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022384 (exit $ac_status); } && {
22385 test -z "$ac_c_werror_flag" ||
22386 test ! -s conftest.err
22387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022388
22389 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022390#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022391_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022392
Martin v. Löwis11437992002-04-12 09:54:03 +000022393
22394cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022395#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022396_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022397
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022398 { echo "$as_me:$LINENO: result: yes" >&5
22399echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022403sed 's/^/| /' conftest.$ac_ext >&5
22404
Martin v. Löwis11437992002-04-12 09:54:03 +000022405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022406 { echo "$as_me:$LINENO: result: no" >&5
22407echo "${ECHO_T}no" >&6; }
22408 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22409echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022411/* confdefs.h. */
22412_ACEOF
22413cat confdefs.h >>conftest.$ac_ext
22414cat >>conftest.$ac_ext <<_ACEOF
22415/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022416
22417# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022418
Martin v. Löwis11437992002-04-12 09:54:03 +000022419int
22420main ()
22421{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022422
22423 char *name;
22424 struct hostent *he;
22425 char buffer[2048];
22426 int buflen = 2048;
22427 int h_errnop;
22428
22429 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022430
22431 ;
22432 return 0;
22433}
22434_ACEOF
22435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436if { (ac_try="$ac_compile"
22437case "(($ac_try" in
22438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22439 *) ac_try_echo=$ac_try;;
22440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022444 grep -v '^ *+' conftest.er1 >conftest.err
22445 rm -f conftest.er1
22446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022448 (exit $ac_status); } && {
22449 test -z "$ac_c_werror_flag" ||
22450 test ! -s conftest.err
22451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022452
22453 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022454#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022455_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022456
Martin v. Löwis11437992002-04-12 09:54:03 +000022457
22458cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022459#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022460_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022461
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022462 { echo "$as_me:$LINENO: result: yes" >&5
22463echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022467sed 's/^/| /' conftest.$ac_ext >&5
22468
Martin v. Löwis11437992002-04-12 09:54:03 +000022469
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022470 { echo "$as_me:$LINENO: result: no" >&5
22471echo "${ECHO_T}no" >&6; }
22472 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22473echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022475/* confdefs.h. */
22476_ACEOF
22477cat confdefs.h >>conftest.$ac_ext
22478cat >>conftest.$ac_ext <<_ACEOF
22479/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022480
22481# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022482
Martin v. Löwis11437992002-04-12 09:54:03 +000022483int
22484main ()
22485{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022486
22487 char *name;
22488 struct hostent *he;
22489 struct hostent_data data;
22490
22491 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022492
22493 ;
22494 return 0;
22495}
22496_ACEOF
22497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022498if { (ac_try="$ac_compile"
22499case "(($ac_try" in
22500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22501 *) ac_try_echo=$ac_try;;
22502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022506 grep -v '^ *+' conftest.er1 >conftest.err
22507 rm -f conftest.er1
22508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022510 (exit $ac_status); } && {
22511 test -z "$ac_c_werror_flag" ||
22512 test ! -s conftest.err
22513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022514
22515 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022516#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022517_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022518
Martin v. Löwis11437992002-04-12 09:54:03 +000022519
22520cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022521#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022522_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022524 { echo "$as_me:$LINENO: result: yes" >&5
22525echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022529sed 's/^/| /' conftest.$ac_ext >&5
22530
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022532 { echo "$as_me:$LINENO: result: no" >&5
22533echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022534
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022536
22537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022540
22541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022544
22545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022546 CFLAGS=$OLD_CFLAGS
22547
22548else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022549
Martin v. Löwis11437992002-04-12 09:54:03 +000022550
22551for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022552do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022558else
Martin v. Löwis11437992002-04-12 09:54:03 +000022559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022560/* confdefs.h. */
22561_ACEOF
22562cat confdefs.h >>conftest.$ac_ext
22563cat >>conftest.$ac_ext <<_ACEOF
22564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22567#define $ac_func innocuous_$ac_func
22568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022570 which can conflict with char $ac_func (); below.
22571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022572 <limits.h> exists even on freestanding compilers. */
22573
22574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022575# include <limits.h>
22576#else
22577# include <assert.h>
22578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022579
22580#undef $ac_func
22581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022582/* Override any GCC internal prototype to avoid an error.
22583 Use char because int might match the return type of a GCC
22584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022585#ifdef __cplusplus
22586extern "C"
22587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022588char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022589/* The GNU C library defines this for functions which it implements
22590 to always fail with ENOSYS. Some functions are actually named
22591 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022592#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022593choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022594#endif
22595
Skip Montanaro6dead952003-09-25 14:50:04 +000022596int
22597main ()
22598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022599return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022600 ;
22601 return 0;
22602}
22603_ACEOF
22604rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022605if { (ac_try="$ac_link"
22606case "(($ac_try" in
22607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22608 *) ac_try_echo=$ac_try;;
22609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022613 grep -v '^ *+' conftest.er1 >conftest.err
22614 rm -f conftest.er1
22615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022617 (exit $ac_status); } && {
22618 test -z "$ac_c_werror_flag" ||
22619 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022620 } && test -s conftest$ac_exeext &&
22621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022625sed 's/^/| /' conftest.$ac_ext >&5
22626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022627 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022629
22630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022631 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022633ac_res=`eval echo '${'$as_ac_var'}'`
22634 { echo "$as_me:$LINENO: result: $ac_res" >&5
22635echo "${ECHO_T}$ac_res" >&6; }
22636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022637 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022639_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022640
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022641fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022642done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022643
Michael W. Hudson54241132001-12-07 15:38:26 +000022644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022645fi
22646
Michael W. Hudson54241132001-12-07 15:38:26 +000022647
22648
22649
22650
22651
22652
Guido van Rossum627b2d71993-12-24 10:39:16 +000022653# checks for system services
22654# (none yet)
22655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022656# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022657{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22658echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022659if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022660 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022661else
Martin v. Löwis11437992002-04-12 09:54:03 +000022662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022663/* confdefs.h. */
22664_ACEOF
22665cat confdefs.h >>conftest.$ac_ext
22666cat >>conftest.$ac_ext <<_ACEOF
22667/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022668/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22669 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22670#define __fpu_control innocuous___fpu_control
22671
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022672/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022673 which can conflict with char __fpu_control (); below.
22674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022675 <limits.h> exists even on freestanding compilers. */
22676
22677#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022678# include <limits.h>
22679#else
22680# include <assert.h>
22681#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022682
22683#undef __fpu_control
22684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022685/* Override any GCC internal prototype to avoid an error.
22686 Use char because int might match the return type of a GCC
22687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022688#ifdef __cplusplus
22689extern "C"
22690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022691char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022692/* The GNU C library defines this for functions which it implements
22693 to always fail with ENOSYS. Some functions are actually named
22694 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022695#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022696choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022697#endif
22698
Skip Montanaro6dead952003-09-25 14:50:04 +000022699int
22700main ()
22701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022702return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022703 ;
22704 return 0;
22705}
22706_ACEOF
22707rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022708if { (ac_try="$ac_link"
22709case "(($ac_try" in
22710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22711 *) ac_try_echo=$ac_try;;
22712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022714 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022716 grep -v '^ *+' conftest.er1 >conftest.err
22717 rm -f conftest.er1
22718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022720 (exit $ac_status); } && {
22721 test -z "$ac_c_werror_flag" ||
22722 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022723 } && test -s conftest$ac_exeext &&
22724 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022728sed 's/^/| /' conftest.$ac_ext >&5
22729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022730 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022732
22733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022735fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022736{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22737echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22738if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022739 :
22740else
Martin v. Löwis11437992002-04-12 09:54:03 +000022741
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022742{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22743echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022744if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022746else
Martin v. Löwis11437992002-04-12 09:54:03 +000022747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022748LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022750/* confdefs.h. */
22751_ACEOF
22752cat confdefs.h >>conftest.$ac_ext
22753cat >>conftest.$ac_ext <<_ACEOF
22754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022756/* Override any GCC internal prototype to avoid an error.
22757 Use char because int might match the return type of a GCC
22758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022759#ifdef __cplusplus
22760extern "C"
22761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022762char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022763int
22764main ()
22765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022766return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 ;
22768 return 0;
22769}
22770_ACEOF
22771rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022772if { (ac_try="$ac_link"
22773case "(($ac_try" in
22774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22775 *) ac_try_echo=$ac_try;;
22776esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022778 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022780 grep -v '^ *+' conftest.er1 >conftest.err
22781 rm -f conftest.er1
22782 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022784 (exit $ac_status); } && {
22785 test -z "$ac_c_werror_flag" ||
22786 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022787 } && test -s conftest$ac_exeext &&
22788 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022789 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022792sed 's/^/| /' conftest.$ac_ext >&5
22793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022794 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022796
22797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022800fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022801{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22802echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22803if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022804 cat >>confdefs.h <<_ACEOF
22805#define HAVE_LIBIEEE 1
22806_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022808 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022809
Guido van Rossum627b2d71993-12-24 10:39:16 +000022810fi
22811
Michael W. Hudson54241132001-12-07 15:38:26 +000022812
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022813fi
22814
Michael W. Hudson54241132001-12-07 15:38:26 +000022815
Guido van Rossum7f253911997-05-09 02:42:48 +000022816# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022817{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22818echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022820# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022821if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022822 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022823if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022824then
22825
22826cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022827#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022828_ACEOF
22829
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022830 { echo "$as_me:$LINENO: result: yes" >&5
22831echo "${ECHO_T}yes" >&6; }
22832else { echo "$as_me:$LINENO: result: no" >&5
22833echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022834fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022836 { echo "$as_me:$LINENO: result: no" >&5
22837echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022838fi
22839
Guido van Rossum7f253911997-05-09 02:42:48 +000022840
Guido van Rossum7f43da71994-08-01 12:15:30 +000022841# check for --with-libm=...
22842
Guido van Rossum563e7081996-09-10 18:20:48 +000022843case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022844Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022845*) LIBM=-lm
22846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022847{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22848echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022850# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022851if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022852 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022853if test "$withval" = no
22854then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022855 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22856echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022857elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022858then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022859 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22860echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22861else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22862echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022863 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022864fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022866 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22867echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022868fi
22869
Guido van Rossum7f43da71994-08-01 12:15:30 +000022870
22871# check for --with-libc=...
22872
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022873{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22874echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022876# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022877if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022878 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022879if test "$withval" = no
22880then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022881 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22882echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022883elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022884then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022885 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22886echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22887else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22888echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022889 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022890fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022892 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22893echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022894fi
22895
Guido van Rossum7f43da71994-08-01 12:15:30 +000022896
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022897# **************************************************
22898# * Check for various properties of floating point *
22899# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022901{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22902echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022903if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022904 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022905else
22906
22907if test "$cross_compiling" = yes; then
22908 ac_cv_little_endian_double=no
22909else
22910 cat >conftest.$ac_ext <<_ACEOF
22911/* confdefs.h. */
22912_ACEOF
22913cat confdefs.h >>conftest.$ac_ext
22914cat >>conftest.$ac_ext <<_ACEOF
22915/* end confdefs.h. */
22916
22917#include <string.h>
22918int main() {
22919 double x = 9006104071832581.0;
22920 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22921 return 0;
22922 else
22923 return 1;
22924}
22925
22926_ACEOF
22927rm -f conftest$ac_exeext
22928if { (ac_try="$ac_link"
22929case "(($ac_try" in
22930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22931 *) ac_try_echo=$ac_try;;
22932esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022934 (eval "$ac_link") 2>&5
22935 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22938 { (case "(($ac_try" in
22939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22940 *) ac_try_echo=$ac_try;;
22941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022943 (eval "$ac_try") 2>&5
22944 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022946 (exit $ac_status); }; }; then
22947 ac_cv_little_endian_double=yes
22948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022949 echo "$as_me: program exited with status $ac_status" >&5
22950echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022951sed 's/^/| /' conftest.$ac_ext >&5
22952
22953( exit $ac_status )
22954ac_cv_little_endian_double=no
22955fi
22956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22957fi
22958
22959
22960fi
22961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022962{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22963echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022964if test "$ac_cv_little_endian_double" = yes
22965then
22966
22967cat >>confdefs.h <<\_ACEOF
22968#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22969_ACEOF
22970
22971fi
22972
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022973{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22974echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022975if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022976 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022977else
22978
22979if test "$cross_compiling" = yes; then
22980 ac_cv_big_endian_double=no
22981else
22982 cat >conftest.$ac_ext <<_ACEOF
22983/* confdefs.h. */
22984_ACEOF
22985cat confdefs.h >>conftest.$ac_ext
22986cat >>conftest.$ac_ext <<_ACEOF
22987/* end confdefs.h. */
22988
22989#include <string.h>
22990int main() {
22991 double x = 9006104071832581.0;
22992 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22993 return 0;
22994 else
22995 return 1;
22996}
22997
22998_ACEOF
22999rm -f conftest$ac_exeext
23000if { (ac_try="$ac_link"
23001case "(($ac_try" in
23002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23003 *) ac_try_echo=$ac_try;;
23004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023006 (eval "$ac_link") 2>&5
23007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23010 { (case "(($ac_try" in
23011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23012 *) ac_try_echo=$ac_try;;
23013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023015 (eval "$ac_try") 2>&5
23016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023018 (exit $ac_status); }; }; then
23019 ac_cv_big_endian_double=yes
23020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023021 echo "$as_me: program exited with status $ac_status" >&5
23022echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023023sed 's/^/| /' conftest.$ac_ext >&5
23024
23025( exit $ac_status )
23026ac_cv_big_endian_double=no
23027fi
23028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23029fi
23030
23031
23032fi
23033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023034{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23035echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023036if test "$ac_cv_big_endian_double" = yes
23037then
23038
23039cat >>confdefs.h <<\_ACEOF
23040#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23041_ACEOF
23042
23043fi
23044
23045# Some ARM platforms use a mixed-endian representation for doubles.
23046# While Python doesn't currently have full support for these platforms
23047# (see e.g., issue 1762561), we can at least make sure that float <-> string
23048# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023049{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23050echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023051if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023052 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023053else
23054
23055if test "$cross_compiling" = yes; then
23056 ac_cv_mixed_endian_double=no
23057else
23058 cat >conftest.$ac_ext <<_ACEOF
23059/* confdefs.h. */
23060_ACEOF
23061cat confdefs.h >>conftest.$ac_ext
23062cat >>conftest.$ac_ext <<_ACEOF
23063/* end confdefs.h. */
23064
23065#include <string.h>
23066int main() {
23067 double x = 9006104071832581.0;
23068 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23069 return 0;
23070 else
23071 return 1;
23072}
23073
23074_ACEOF
23075rm -f conftest$ac_exeext
23076if { (ac_try="$ac_link"
23077case "(($ac_try" in
23078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23079 *) ac_try_echo=$ac_try;;
23080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023082 (eval "$ac_link") 2>&5
23083 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23086 { (case "(($ac_try" in
23087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23088 *) ac_try_echo=$ac_try;;
23089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023091 (eval "$ac_try") 2>&5
23092 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023094 (exit $ac_status); }; }; then
23095 ac_cv_mixed_endian_double=yes
23096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023097 echo "$as_me: program exited with status $ac_status" >&5
23098echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023099sed 's/^/| /' conftest.$ac_ext >&5
23100
23101( exit $ac_status )
23102ac_cv_mixed_endian_double=no
23103fi
23104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23105fi
23106
23107
23108fi
23109
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023110{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23111echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023112if test "$ac_cv_mixed_endian_double" = yes
23113then
23114
23115cat >>confdefs.h <<\_ACEOF
23116#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23117_ACEOF
23118
23119fi
23120
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023121# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023122# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023123# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023124# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023125# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023126# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023127
23128# This inline assembler syntax may also work for suncc and icc,
23129# so we try it on all platforms.
23130
23131{ 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 +000023132echo $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 +000023133cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023134/* confdefs.h. */
23135_ACEOF
23136cat confdefs.h >>conftest.$ac_ext
23137cat >>conftest.$ac_ext <<_ACEOF
23138/* end confdefs.h. */
23139
23140int
23141main ()
23142{
23143
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023144 unsigned short cw;
23145 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23146 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023147
23148 ;
23149 return 0;
23150}
23151_ACEOF
23152rm -f conftest.$ac_objext
23153if { (ac_try="$ac_compile"
23154case "(($ac_try" in
23155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23156 *) ac_try_echo=$ac_try;;
23157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023159 (eval "$ac_compile") 2>conftest.er1
23160 ac_status=$?
23161 grep -v '^ *+' conftest.er1 >conftest.err
23162 rm -f conftest.er1
23163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023165 (exit $ac_status); } && {
23166 test -z "$ac_c_werror_flag" ||
23167 test ! -s conftest.err
23168 } && test -s conftest.$ac_objext; then
23169 have_gcc_asm_for_x87=yes
23170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023171 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023172sed 's/^/| /' conftest.$ac_ext >&5
23173
23174 have_gcc_asm_for_x87=no
23175fi
23176
23177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023178{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023179echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023180if test "$have_gcc_asm_for_x87" = yes
23181then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023182
23183cat >>confdefs.h <<\_ACEOF
23184#define HAVE_GCC_ASM_FOR_X87 1
23185_ACEOF
23186
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023188
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023189# Detect whether system arithmetic is subject to x87-style double
23190# rounding issues. The result of this test has little meaning on non
23191# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23192# mode is round-to-nearest and double rounding issues are present, and
23193# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023194{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23195echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023196# $BASECFLAGS may affect the result
23197ac_save_cc="$CC"
23198CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023199if test "$cross_compiling" = yes; then
23200 ac_cv_x87_double_rounding=no
23201else
23202 cat >conftest.$ac_ext <<_ACEOF
23203/* confdefs.h. */
23204_ACEOF
23205cat confdefs.h >>conftest.$ac_ext
23206cat >>conftest.$ac_ext <<_ACEOF
23207/* end confdefs.h. */
23208
23209#include <stdlib.h>
23210#include <math.h>
23211int main() {
23212 volatile double x, y, z;
23213 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23214 x = 0.99999999999999989; /* 1-2**-53 */
23215 y = 1./x;
23216 if (y != 1.)
23217 exit(0);
23218 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23219 x = 1e16;
23220 y = 2.99999;
23221 z = x + y;
23222 if (z != 1e16+4.)
23223 exit(0);
23224 /* both tests show evidence of double rounding */
23225 exit(1);
23226}
23227
23228_ACEOF
23229rm -f conftest$ac_exeext
23230if { (ac_try="$ac_link"
23231case "(($ac_try" in
23232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23233 *) ac_try_echo=$ac_try;;
23234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023236 (eval "$ac_link") 2>&5
23237 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23240 { (case "(($ac_try" in
23241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23242 *) ac_try_echo=$ac_try;;
23243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023245 (eval "$ac_try") 2>&5
23246 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023248 (exit $ac_status); }; }; then
23249 ac_cv_x87_double_rounding=no
23250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023251 echo "$as_me: program exited with status $ac_status" >&5
23252echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023253sed 's/^/| /' conftest.$ac_ext >&5
23254
23255( exit $ac_status )
23256ac_cv_x87_double_rounding=yes
23257fi
23258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23259fi
23260
23261
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023262CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23264echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023265if test "$ac_cv_x87_double_rounding" = yes
23266then
23267
23268cat >>confdefs.h <<\_ACEOF
23269#define X87_DOUBLE_ROUNDING 1
23270_ACEOF
23271
23272fi
23273
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023274# ************************************
23275# * Check for mathematical functions *
23276# ************************************
23277
23278LIBS_SAVE=$LIBS
23279LIBS="$LIBS $LIBM"
23280
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023281# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23282# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023283{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23284echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023285if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023286 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023287else
23288
23289if test "$cross_compiling" = yes; then
23290 ac_cv_tanh_preserves_zero_sign=no
23291else
23292 cat >conftest.$ac_ext <<_ACEOF
23293/* confdefs.h. */
23294_ACEOF
23295cat confdefs.h >>conftest.$ac_ext
23296cat >>conftest.$ac_ext <<_ACEOF
23297/* end confdefs.h. */
23298
23299#include <math.h>
23300#include <stdlib.h>
23301int main() {
23302 /* return 0 if either negative zeros don't exist
23303 on this platform or if negative zeros exist
23304 and tanh(-0.) == -0. */
23305 if (atan2(0., -1.) == atan2(-0., -1.) ||
23306 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23307 else exit(1);
23308}
23309
23310_ACEOF
23311rm -f conftest$ac_exeext
23312if { (ac_try="$ac_link"
23313case "(($ac_try" in
23314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23315 *) ac_try_echo=$ac_try;;
23316esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023318 (eval "$ac_link") 2>&5
23319 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23322 { (case "(($ac_try" in
23323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23324 *) ac_try_echo=$ac_try;;
23325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023327 (eval "$ac_try") 2>&5
23328 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023330 (exit $ac_status); }; }; then
23331 ac_cv_tanh_preserves_zero_sign=yes
23332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023333 echo "$as_me: program exited with status $ac_status" >&5
23334echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023335sed 's/^/| /' conftest.$ac_ext >&5
23336
23337( exit $ac_status )
23338ac_cv_tanh_preserves_zero_sign=no
23339fi
23340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23341fi
23342
23343
23344fi
23345
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023346{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23347echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023348if test "$ac_cv_tanh_preserves_zero_sign" = yes
23349then
23350
23351cat >>confdefs.h <<\_ACEOF
23352#define TANH_PRESERVES_ZERO_SIGN 1
23353_ACEOF
23354
23355fi
23356
23357
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023358
Michael W. Hudson54241132001-12-07 15:38:26 +000023359
Christian Heimes99170a52007-12-19 02:07:34 +000023360
23361
23362
23363
23364
Mark Dickinsonf2537862009-04-18 13:58:18 +000023365
Mark Dickinson9c113362009-09-05 10:36:23 +000023366for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23367do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23369{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023371if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023372 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023373else
23374 cat >conftest.$ac_ext <<_ACEOF
23375/* confdefs.h. */
23376_ACEOF
23377cat confdefs.h >>conftest.$ac_ext
23378cat >>conftest.$ac_ext <<_ACEOF
23379/* end confdefs.h. */
23380/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23381 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23382#define $ac_func innocuous_$ac_func
23383
23384/* System header to define __stub macros and hopefully few prototypes,
23385 which can conflict with char $ac_func (); below.
23386 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23387 <limits.h> exists even on freestanding compilers. */
23388
23389#ifdef __STDC__
23390# include <limits.h>
23391#else
23392# include <assert.h>
23393#endif
23394
23395#undef $ac_func
23396
23397/* Override any GCC internal prototype to avoid an error.
23398 Use char because int might match the return type of a GCC
23399 builtin and then its argument prototype would still apply. */
23400#ifdef __cplusplus
23401extern "C"
23402#endif
23403char $ac_func ();
23404/* The GNU C library defines this for functions which it implements
23405 to always fail with ENOSYS. Some functions are actually named
23406 something starting with __ and the normal name is an alias. */
23407#if defined __stub_$ac_func || defined __stub___$ac_func
23408choke me
23409#endif
23410
23411int
23412main ()
23413{
23414return $ac_func ();
23415 ;
23416 return 0;
23417}
23418_ACEOF
23419rm -f conftest.$ac_objext conftest$ac_exeext
23420if { (ac_try="$ac_link"
23421case "(($ac_try" in
23422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23423 *) ac_try_echo=$ac_try;;
23424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023426 (eval "$ac_link") 2>conftest.er1
23427 ac_status=$?
23428 grep -v '^ *+' conftest.er1 >conftest.err
23429 rm -f conftest.er1
23430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023432 (exit $ac_status); } && {
23433 test -z "$ac_c_werror_flag" ||
23434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023435 } && test -s conftest$ac_exeext &&
23436 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023437 eval "$as_ac_var=yes"
23438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023439 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023440sed 's/^/| /' conftest.$ac_ext >&5
23441
23442 eval "$as_ac_var=no"
23443fi
23444
23445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23446 conftest$ac_exeext conftest.$ac_ext
23447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023448ac_res=`eval echo '${'$as_ac_var'}'`
23449 { echo "$as_me:$LINENO: result: $ac_res" >&5
23450echo "${ECHO_T}$ac_res" >&6; }
23451if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023452 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023454_ACEOF
23455
23456fi
23457done
23458
23459
23460
23461
23462
23463
23464for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023465do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023466as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23467{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23468echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023469if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023470 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023471else
23472 cat >conftest.$ac_ext <<_ACEOF
23473/* confdefs.h. */
23474_ACEOF
23475cat confdefs.h >>conftest.$ac_ext
23476cat >>conftest.$ac_ext <<_ACEOF
23477/* end confdefs.h. */
23478/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23479 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23480#define $ac_func innocuous_$ac_func
23481
23482/* System header to define __stub macros and hopefully few prototypes,
23483 which can conflict with char $ac_func (); below.
23484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23485 <limits.h> exists even on freestanding compilers. */
23486
23487#ifdef __STDC__
23488# include <limits.h>
23489#else
23490# include <assert.h>
23491#endif
23492
23493#undef $ac_func
23494
23495/* Override any GCC internal prototype to avoid an error.
23496 Use char because int might match the return type of a GCC
23497 builtin and then its argument prototype would still apply. */
23498#ifdef __cplusplus
23499extern "C"
23500#endif
23501char $ac_func ();
23502/* The GNU C library defines this for functions which it implements
23503 to always fail with ENOSYS. Some functions are actually named
23504 something starting with __ and the normal name is an alias. */
23505#if defined __stub_$ac_func || defined __stub___$ac_func
23506choke me
23507#endif
23508
23509int
23510main ()
23511{
23512return $ac_func ();
23513 ;
23514 return 0;
23515}
23516_ACEOF
23517rm -f conftest.$ac_objext conftest$ac_exeext
23518if { (ac_try="$ac_link"
23519case "(($ac_try" in
23520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23521 *) ac_try_echo=$ac_try;;
23522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023524 (eval "$ac_link") 2>conftest.er1
23525 ac_status=$?
23526 grep -v '^ *+' conftest.er1 >conftest.err
23527 rm -f conftest.er1
23528 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023530 (exit $ac_status); } && {
23531 test -z "$ac_c_werror_flag" ||
23532 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023533 } && test -s conftest$ac_exeext &&
23534 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023535 eval "$as_ac_var=yes"
23536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023537 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023538sed 's/^/| /' conftest.$ac_ext >&5
23539
23540 eval "$as_ac_var=no"
23541fi
23542
23543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23544 conftest$ac_exeext conftest.$ac_ext
23545fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023546ac_res=`eval echo '${'$as_ac_var'}'`
23547 { echo "$as_me:$LINENO: result: $ac_res" >&5
23548echo "${ECHO_T}$ac_res" >&6; }
23549if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023550 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023551#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023552_ACEOF
23553
23554fi
23555done
23556
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023557{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23558echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023559if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023560 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023561else
23562 cat >conftest.$ac_ext <<_ACEOF
23563/* confdefs.h. */
23564_ACEOF
23565cat confdefs.h >>conftest.$ac_ext
23566cat >>conftest.$ac_ext <<_ACEOF
23567/* end confdefs.h. */
23568#include <math.h>
23569
23570int
23571main ()
23572{
23573#ifndef isinf
23574 (void) isinf;
23575#endif
23576
23577 ;
23578 return 0;
23579}
23580_ACEOF
23581rm -f conftest.$ac_objext
23582if { (ac_try="$ac_compile"
23583case "(($ac_try" in
23584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23585 *) ac_try_echo=$ac_try;;
23586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023588 (eval "$ac_compile") 2>conftest.er1
23589 ac_status=$?
23590 grep -v '^ *+' conftest.er1 >conftest.err
23591 rm -f conftest.er1
23592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023594 (exit $ac_status); } && {
23595 test -z "$ac_c_werror_flag" ||
23596 test ! -s conftest.err
23597 } && test -s conftest.$ac_objext; then
23598 ac_cv_have_decl_isinf=yes
23599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023600 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023601sed 's/^/| /' conftest.$ac_ext >&5
23602
23603 ac_cv_have_decl_isinf=no
23604fi
23605
23606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23607fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023608{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23609echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23610if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023611
23612cat >>confdefs.h <<_ACEOF
23613#define HAVE_DECL_ISINF 1
23614_ACEOF
23615
23616
23617else
23618 cat >>confdefs.h <<_ACEOF
23619#define HAVE_DECL_ISINF 0
23620_ACEOF
23621
23622
23623fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023624{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23625echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023626if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023627 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023628else
23629 cat >conftest.$ac_ext <<_ACEOF
23630/* confdefs.h. */
23631_ACEOF
23632cat confdefs.h >>conftest.$ac_ext
23633cat >>conftest.$ac_ext <<_ACEOF
23634/* end confdefs.h. */
23635#include <math.h>
23636
23637int
23638main ()
23639{
23640#ifndef isnan
23641 (void) isnan;
23642#endif
23643
23644 ;
23645 return 0;
23646}
23647_ACEOF
23648rm -f conftest.$ac_objext
23649if { (ac_try="$ac_compile"
23650case "(($ac_try" in
23651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23652 *) ac_try_echo=$ac_try;;
23653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023655 (eval "$ac_compile") 2>conftest.er1
23656 ac_status=$?
23657 grep -v '^ *+' conftest.er1 >conftest.err
23658 rm -f conftest.er1
23659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023661 (exit $ac_status); } && {
23662 test -z "$ac_c_werror_flag" ||
23663 test ! -s conftest.err
23664 } && test -s conftest.$ac_objext; then
23665 ac_cv_have_decl_isnan=yes
23666else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023667 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023668sed 's/^/| /' conftest.$ac_ext >&5
23669
23670 ac_cv_have_decl_isnan=no
23671fi
23672
23673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023675{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23676echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23677if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023678
23679cat >>confdefs.h <<_ACEOF
23680#define HAVE_DECL_ISNAN 1
23681_ACEOF
23682
23683
23684else
23685 cat >>confdefs.h <<_ACEOF
23686#define HAVE_DECL_ISNAN 0
23687_ACEOF
23688
23689
23690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023691{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23692echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023693if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023694 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023695else
23696 cat >conftest.$ac_ext <<_ACEOF
23697/* confdefs.h. */
23698_ACEOF
23699cat confdefs.h >>conftest.$ac_ext
23700cat >>conftest.$ac_ext <<_ACEOF
23701/* end confdefs.h. */
23702#include <math.h>
23703
23704int
23705main ()
23706{
23707#ifndef isfinite
23708 (void) isfinite;
23709#endif
23710
23711 ;
23712 return 0;
23713}
23714_ACEOF
23715rm -f conftest.$ac_objext
23716if { (ac_try="$ac_compile"
23717case "(($ac_try" in
23718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23719 *) ac_try_echo=$ac_try;;
23720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023722 (eval "$ac_compile") 2>conftest.er1
23723 ac_status=$?
23724 grep -v '^ *+' conftest.er1 >conftest.err
23725 rm -f conftest.er1
23726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023728 (exit $ac_status); } && {
23729 test -z "$ac_c_werror_flag" ||
23730 test ! -s conftest.err
23731 } && test -s conftest.$ac_objext; then
23732 ac_cv_have_decl_isfinite=yes
23733else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023734 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023735sed 's/^/| /' conftest.$ac_ext >&5
23736
23737 ac_cv_have_decl_isfinite=no
23738fi
23739
23740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23741fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023742{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23743echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23744if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023745
23746cat >>confdefs.h <<_ACEOF
23747#define HAVE_DECL_ISFINITE 1
23748_ACEOF
23749
23750
23751else
23752 cat >>confdefs.h <<_ACEOF
23753#define HAVE_DECL_ISFINITE 0
23754_ACEOF
23755
23756
23757fi
23758
23759
Christian Heimes99170a52007-12-19 02:07:34 +000023760
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023761LIBS=$LIBS_SAVE
23762
Mark Dickinsona614f042009-11-28 12:48:43 +000023763# For multiprocessing module, check that sem_open
23764# actually works. For FreeBSD versions <= 7.2,
23765# the kernel module that provides POSIX semaphores
23766# isn't loaded by default, so an attempt to call
23767# sem_open results in a 'Signal 12' error.
23768{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23769echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23770if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23771 echo $ECHO_N "(cached) $ECHO_C" >&6
23772else
23773 if test "$cross_compiling" = yes; then
23774 ac_cv_posix_semaphores_enabled=yes
23775else
23776 cat >conftest.$ac_ext <<_ACEOF
23777/* confdefs.h. */
23778_ACEOF
23779cat confdefs.h >>conftest.$ac_ext
23780cat >>conftest.$ac_ext <<_ACEOF
23781/* end confdefs.h. */
23782
23783#include <unistd.h>
23784#include <fcntl.h>
23785#include <stdio.h>
23786#include <semaphore.h>
23787#include <sys/stat.h>
23788
23789int main(void) {
23790 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23791 if (a == SEM_FAILED) {
23792 perror("sem_open");
23793 return 1;
23794 }
23795 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023796 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000023797 return 0;
23798}
23799
23800_ACEOF
23801rm -f conftest$ac_exeext
23802if { (ac_try="$ac_link"
23803case "(($ac_try" in
23804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23805 *) ac_try_echo=$ac_try;;
23806esac
23807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23808 (eval "$ac_link") 2>&5
23809 ac_status=$?
23810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23812 { (case "(($ac_try" in
23813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23814 *) ac_try_echo=$ac_try;;
23815esac
23816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23817 (eval "$ac_try") 2>&5
23818 ac_status=$?
23819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23820 (exit $ac_status); }; }; then
23821 ac_cv_posix_semaphores_enabled=yes
23822else
23823 echo "$as_me: program exited with status $ac_status" >&5
23824echo "$as_me: failed program was:" >&5
23825sed 's/^/| /' conftest.$ac_ext >&5
23826
23827( exit $ac_status )
23828ac_cv_posix_semaphores_enabled=no
23829fi
23830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23831fi
23832
23833
23834
23835fi
23836
23837{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23838echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23839if test $ac_cv_posix_semaphores_enabled = no
23840then
23841
23842cat >>confdefs.h <<\_ACEOF
23843#define POSIX_SEMAPHORES_NOT_ENABLED 1
23844_ACEOF
23845
23846fi
23847
Mark Dickinson10683072009-04-18 21:18:19 +000023848# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023849{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23850echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023851if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023852 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023853else
23854 if test "$cross_compiling" = yes; then
23855 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023856else
23857 cat >conftest.$ac_ext <<_ACEOF
23858/* confdefs.h. */
23859_ACEOF
23860cat confdefs.h >>conftest.$ac_ext
23861cat >>conftest.$ac_ext <<_ACEOF
23862/* end confdefs.h. */
23863
23864#include <unistd.h>
23865#include <fcntl.h>
23866#include <stdio.h>
23867#include <semaphore.h>
23868#include <sys/stat.h>
23869
23870int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000023871 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000023872 int count;
23873 int res;
23874 if(a==SEM_FAILED){
23875 perror("sem_open");
23876 return 1;
23877
23878 }
23879 res = sem_getvalue(a, &count);
23880 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023881 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000023882 return res==-1 ? 1 : 0;
23883}
23884
Mark Dickinson10683072009-04-18 21:18:19 +000023885_ACEOF
23886rm -f conftest$ac_exeext
23887if { (ac_try="$ac_link"
23888case "(($ac_try" in
23889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23890 *) ac_try_echo=$ac_try;;
23891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023893 (eval "$ac_link") 2>&5
23894 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23897 { (case "(($ac_try" in
23898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23899 *) ac_try_echo=$ac_try;;
23900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023902 (eval "$ac_try") 2>&5
23903 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023905 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023906 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023908 echo "$as_me: program exited with status $ac_status" >&5
23909echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023910sed 's/^/| /' conftest.$ac_ext >&5
23911
23912( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023913ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023914fi
23915rm -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 +000023916fi
23917
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023918
23919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023920fi
23921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023922{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23923echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023924if test $ac_cv_broken_sem_getvalue = yes
23925then
23926
23927cat >>confdefs.h <<\_ACEOF
23928#define HAVE_BROKEN_SEM_GETVALUE 1
23929_ACEOF
23930
23931fi
23932
Mark Dickinsonbd792642009-03-18 20:06:12 +000023933# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023934{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23935echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023936# Check whether --enable-big-digits was given.
23937if test "${enable_big_digits+set}" = set; then
23938 enableval=$enable_big_digits; case $enable_big_digits in
23939yes)
23940 enable_big_digits=30 ;;
23941no)
23942 enable_big_digits=15 ;;
2394315|30)
23944 ;;
23945*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023946 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23947echo "$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 +000023948 { (exit 1); exit 1; }; } ;;
23949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023950{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23951echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023952
23953cat >>confdefs.h <<_ACEOF
23954#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23955_ACEOF
23956
23957
23958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023959 { echo "$as_me:$LINENO: result: no value specified" >&5
23960echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023961fi
23962
23963
Guido van Rossumef2255b2000-03-10 22:30:29 +000023964# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023965if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023966 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23967echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023968if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023970fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023971{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23972echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023973else
Martin v. Löwis11437992002-04-12 09:54:03 +000023974 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023975{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23976echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023978/* confdefs.h. */
23979_ACEOF
23980cat confdefs.h >>conftest.$ac_ext
23981cat >>conftest.$ac_ext <<_ACEOF
23982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023983$ac_includes_default
23984#include <wchar.h>
23985_ACEOF
23986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023987if { (ac_try="$ac_compile"
23988case "(($ac_try" in
23989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23990 *) ac_try_echo=$ac_try;;
23991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023995 grep -v '^ *+' conftest.er1 >conftest.err
23996 rm -f conftest.er1
23997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023999 (exit $ac_status); } && {
24000 test -z "$ac_c_werror_flag" ||
24001 test ! -s conftest.err
24002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024003 ac_header_compiler=yes
24004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024006sed 's/^/| /' conftest.$ac_ext >&5
24007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024008 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024010
24011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024012{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24013echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024014
24015# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024016{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24017echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024019/* confdefs.h. */
24020_ACEOF
24021cat confdefs.h >>conftest.$ac_ext
24022cat >>conftest.$ac_ext <<_ACEOF
24023/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024024#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024025_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024026if { (ac_try="$ac_cpp conftest.$ac_ext"
24027case "(($ac_try" in
24028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24029 *) ac_try_echo=$ac_try;;
24030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024032 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024033 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024034 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024035 rm -f conftest.er1
24036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038 (exit $ac_status); } >/dev/null && {
24039 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24040 test ! -s conftest.err
24041 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024042 ac_header_preproc=yes
24043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024045sed 's/^/| /' conftest.$ac_ext >&5
24046
Martin v. Löwis11437992002-04-12 09:54:03 +000024047 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024049
Martin v. Löwis11437992002-04-12 09:54:03 +000024050rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24052echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024053
24054# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024055case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24056 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024057 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24058echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24059 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24060echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024061 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024062 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024063 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024064 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24065echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24066 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24067echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24068 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24069echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24070 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24071echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24072 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24073echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24074 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24075echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024076 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024077## -------------------------------------- ##
24078## Report this to http://bugs.python.org/ ##
24079## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024080_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024081 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024082 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024084{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24085echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024086if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024087 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024088else
24089 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024090fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024091{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24092echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024093
24094fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024095if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024096
24097
24098cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024099#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024100_ACEOF
24101
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024102 wchar_h="yes"
24103
Guido van Rossumef2255b2000-03-10 22:30:29 +000024104else
Martin v. Löwis11437992002-04-12 09:54:03 +000024105 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024106
24107fi
24108
Michael W. Hudson54241132001-12-07 15:38:26 +000024109
Martin v. Löwis11437992002-04-12 09:54:03 +000024110
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024111# determine wchar_t size
24112if test "$wchar_h" = yes
24113then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024114 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24115echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24116if test "${ac_cv_type_wchar_t+set}" = set; then
24117 echo $ECHO_N "(cached) $ECHO_C" >&6
24118else
24119 cat >conftest.$ac_ext <<_ACEOF
24120/* confdefs.h. */
24121_ACEOF
24122cat confdefs.h >>conftest.$ac_ext
24123cat >>conftest.$ac_ext <<_ACEOF
24124/* end confdefs.h. */
24125#include <wchar.h>
24126
24127typedef wchar_t ac__type_new_;
24128int
24129main ()
24130{
24131if ((ac__type_new_ *) 0)
24132 return 0;
24133if (sizeof (ac__type_new_))
24134 return 0;
24135 ;
24136 return 0;
24137}
24138_ACEOF
24139rm -f conftest.$ac_objext
24140if { (ac_try="$ac_compile"
24141case "(($ac_try" in
24142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24143 *) ac_try_echo=$ac_try;;
24144esac
24145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24146 (eval "$ac_compile") 2>conftest.er1
24147 ac_status=$?
24148 grep -v '^ *+' conftest.er1 >conftest.err
24149 rm -f conftest.er1
24150 cat conftest.err >&5
24151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24152 (exit $ac_status); } && {
24153 test -z "$ac_c_werror_flag" ||
24154 test ! -s conftest.err
24155 } && test -s conftest.$ac_objext; then
24156 ac_cv_type_wchar_t=yes
24157else
24158 echo "$as_me: failed program was:" >&5
24159sed 's/^/| /' conftest.$ac_ext >&5
24160
24161 ac_cv_type_wchar_t=no
24162fi
24163
24164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24165fi
24166{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24167echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24168
24169# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24172# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024173{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24174echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024175if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024177else
Martin v. Löwis11437992002-04-12 09:54:03 +000024178 if test "$cross_compiling" = yes; then
24179 # Depending upon the size, compute the lo and hi bounds.
24180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024181/* confdefs.h. */
24182_ACEOF
24183cat confdefs.h >>conftest.$ac_ext
24184cat >>conftest.$ac_ext <<_ACEOF
24185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024186#include <wchar.h>
24187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024188 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024189int
24190main ()
24191{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024192static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024193test_array [0] = 0
24194
24195 ;
24196 return 0;
24197}
24198_ACEOF
24199rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024200if { (ac_try="$ac_compile"
24201case "(($ac_try" in
24202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24203 *) ac_try_echo=$ac_try;;
24204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024208 grep -v '^ *+' conftest.er1 >conftest.err
24209 rm -f conftest.er1
24210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024212 (exit $ac_status); } && {
24213 test -z "$ac_c_werror_flag" ||
24214 test ! -s conftest.err
24215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024216 ac_lo=0 ac_mid=0
24217 while :; do
24218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024219/* confdefs.h. */
24220_ACEOF
24221cat confdefs.h >>conftest.$ac_ext
24222cat >>conftest.$ac_ext <<_ACEOF
24223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024224#include <wchar.h>
24225
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024226 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024227int
24228main ()
24229{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024230static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024231test_array [0] = 0
24232
24233 ;
24234 return 0;
24235}
24236_ACEOF
24237rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024238if { (ac_try="$ac_compile"
24239case "(($ac_try" in
24240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24241 *) ac_try_echo=$ac_try;;
24242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024246 grep -v '^ *+' conftest.er1 >conftest.err
24247 rm -f conftest.er1
24248 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024250 (exit $ac_status); } && {
24251 test -z "$ac_c_werror_flag" ||
24252 test ! -s conftest.err
24253 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024254 ac_hi=$ac_mid; break
24255else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024257sed 's/^/| /' conftest.$ac_ext >&5
24258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024259 ac_lo=`expr $ac_mid + 1`
24260 if test $ac_lo -le $ac_mid; then
24261 ac_lo= ac_hi=
24262 break
24263 fi
24264 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024266
24267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024268 done
24269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024271sed 's/^/| /' conftest.$ac_ext >&5
24272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024274/* confdefs.h. */
24275_ACEOF
24276cat confdefs.h >>conftest.$ac_ext
24277cat >>conftest.$ac_ext <<_ACEOF
24278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024279#include <wchar.h>
24280
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024281 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024282int
24283main ()
24284{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024286test_array [0] = 0
24287
24288 ;
24289 return 0;
24290}
24291_ACEOF
24292rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024293if { (ac_try="$ac_compile"
24294case "(($ac_try" in
24295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24296 *) ac_try_echo=$ac_try;;
24297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024301 grep -v '^ *+' conftest.er1 >conftest.err
24302 rm -f conftest.er1
24303 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024305 (exit $ac_status); } && {
24306 test -z "$ac_c_werror_flag" ||
24307 test ! -s conftest.err
24308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024309 ac_hi=-1 ac_mid=-1
24310 while :; do
24311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024312/* confdefs.h. */
24313_ACEOF
24314cat confdefs.h >>conftest.$ac_ext
24315cat >>conftest.$ac_ext <<_ACEOF
24316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024317#include <wchar.h>
24318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024319 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024320int
24321main ()
24322{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024324test_array [0] = 0
24325
24326 ;
24327 return 0;
24328}
24329_ACEOF
24330rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024331if { (ac_try="$ac_compile"
24332case "(($ac_try" in
24333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24334 *) ac_try_echo=$ac_try;;
24335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024339 grep -v '^ *+' conftest.er1 >conftest.err
24340 rm -f conftest.er1
24341 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024343 (exit $ac_status); } && {
24344 test -z "$ac_c_werror_flag" ||
24345 test ! -s conftest.err
24346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024347 ac_lo=$ac_mid; break
24348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024350sed 's/^/| /' conftest.$ac_ext >&5
24351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352 ac_hi=`expr '(' $ac_mid ')' - 1`
24353 if test $ac_mid -le $ac_hi; then
24354 ac_lo= ac_hi=
24355 break
24356 fi
24357 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024359
24360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 done
24362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024364sed 's/^/| /' conftest.$ac_ext >&5
24365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024368
24369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024371
24372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024373# Binary search between lo and hi bounds.
24374while test "x$ac_lo" != "x$ac_hi"; do
24375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024377/* confdefs.h. */
24378_ACEOF
24379cat confdefs.h >>conftest.$ac_ext
24380cat >>conftest.$ac_ext <<_ACEOF
24381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024382#include <wchar.h>
24383
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024384 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024385int
24386main ()
24387{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024388static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024389test_array [0] = 0
24390
24391 ;
24392 return 0;
24393}
24394_ACEOF
24395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024396if { (ac_try="$ac_compile"
24397case "(($ac_try" in
24398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24399 *) ac_try_echo=$ac_try;;
24400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024404 grep -v '^ *+' conftest.er1 >conftest.err
24405 rm -f conftest.er1
24406 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408 (exit $ac_status); } && {
24409 test -z "$ac_c_werror_flag" ||
24410 test ! -s conftest.err
24411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024412 ac_hi=$ac_mid
24413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024415sed 's/^/| /' conftest.$ac_ext >&5
24416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024419
24420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024421done
24422case $ac_lo in
24423?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024424'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024425 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024426See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024427echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024428See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024429 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024430 else
24431 ac_cv_sizeof_wchar_t=0
24432 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024433esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024434else
Martin v. Löwis11437992002-04-12 09:54:03 +000024435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024436/* confdefs.h. */
24437_ACEOF
24438cat confdefs.h >>conftest.$ac_ext
24439cat >>conftest.$ac_ext <<_ACEOF
24440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024441#include <wchar.h>
24442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024443 typedef wchar_t ac__type_sizeof_;
24444static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24445static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024446#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024447#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024448int
24449main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024450{
Martin v. Löwis11437992002-04-12 09:54:03 +000024451
24452 FILE *f = fopen ("conftest.val", "w");
24453 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024454 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024455 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024456 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024457 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024458 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024459 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024460 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 }
24462 else
24463 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024464 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024465 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024466 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024467 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024468 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024469 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024470
24471 ;
24472 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024473}
Martin v. Löwis11437992002-04-12 09:54:03 +000024474_ACEOF
24475rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476if { (ac_try="$ac_link"
24477case "(($ac_try" in
24478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24479 *) ac_try_echo=$ac_try;;
24480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024482 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024483 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024486 { (case "(($ac_try" in
24487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24488 *) ac_try_echo=$ac_try;;
24489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024492 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024494 (exit $ac_status); }; }; then
24495 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024497 echo "$as_me: program exited with status $ac_status" >&5
24498echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024499sed 's/^/| /' conftest.$ac_ext >&5
24500
Martin v. Löwis11437992002-04-12 09:54:03 +000024501( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024503 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024504See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024505echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024506See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024507 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024508 else
24509 ac_cv_sizeof_wchar_t=0
24510 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024512rm -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 +000024513fi
24514rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024515fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024516{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24517echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518
24519
24520
Martin v. Löwis11437992002-04-12 09:54:03 +000024521cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024522#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024523_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024524
Michael W. Hudson54241132001-12-07 15:38:26 +000024525
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024526fi
24527
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024528{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24529echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024530have_ucs4_tcl=no
24531cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024532/* confdefs.h. */
24533_ACEOF
24534cat confdefs.h >>conftest.$ac_ext
24535cat >>conftest.$ac_ext <<_ACEOF
24536/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024537
24538#include <tcl.h>
24539#if TCL_UTF_MAX != 6
24540# error "NOT UCS4_TCL"
24541#endif
24542int
24543main ()
24544{
24545
24546 ;
24547 return 0;
24548}
24549_ACEOF
24550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551if { (ac_try="$ac_compile"
24552case "(($ac_try" in
24553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24554 *) ac_try_echo=$ac_try;;
24555esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024559 grep -v '^ *+' conftest.er1 >conftest.err
24560 rm -f conftest.er1
24561 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563 (exit $ac_status); } && {
24564 test -z "$ac_c_werror_flag" ||
24565 test ! -s conftest.err
24566 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024567
24568
24569cat >>confdefs.h <<\_ACEOF
24570#define HAVE_UCS4_TCL 1
24571_ACEOF
24572
24573 have_ucs4_tcl=yes
24574
24575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024577sed 's/^/| /' conftest.$ac_ext >&5
24578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024579
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024581
24582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024583{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24584echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024585
Skip Montanaro6dead952003-09-25 14:50:04 +000024586# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024587if test "$wchar_h" = yes
24588then
24589 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024590 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24591echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024592 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024593 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024594else
24595
24596 if test "$cross_compiling" = yes; then
24597 ac_cv_wchar_t_signed=yes
24598else
24599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024600/* confdefs.h. */
24601_ACEOF
24602cat confdefs.h >>conftest.$ac_ext
24603cat >>conftest.$ac_ext <<_ACEOF
24604/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024605
24606 #include <wchar.h>
24607 int main()
24608 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024609 /* Success: exit code 0 */
24610 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024611 }
24612
24613_ACEOF
24614rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024615if { (ac_try="$ac_link"
24616case "(($ac_try" in
24617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24618 *) ac_try_echo=$ac_try;;
24619esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024622 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024625 { (case "(($ac_try" in
24626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24627 *) ac_try_echo=$ac_try;;
24628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024631 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024633 (exit $ac_status); }; }; then
24634 ac_cv_wchar_t_signed=yes
24635else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024636 echo "$as_me: program exited with status $ac_status" >&5
24637echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024638sed 's/^/| /' conftest.$ac_ext >&5
24639
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024640( exit $ac_status )
24641ac_cv_wchar_t_signed=no
24642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024643rm -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 +000024644fi
24645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024646
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024647fi
24648
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024649 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24650echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651fi
24652
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024653{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24654echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024655
24656# Check whether --with-wide-unicode was given.
24657if test "${with_wide_unicode+set}" = set; then
24658 withval=$with_wide_unicode;
24659if test "$withval" != no
24660then unicode_size="4"
24661else unicode_size="2"
24662fi
24663
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024664else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665
Georg Brandl52d168a2008-01-07 18:10:24 +000024666case "$have_ucs4_tcl" in
24667 yes) unicode_size="4" ;;
24668 *) unicode_size="2" ;;
24669esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024670
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024671fi
24672
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024673
24674
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024675
Georg Brandl52d168a2008-01-07 18:10:24 +000024676case "$unicode_size" in
24677 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024678#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024679_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024680 ;;
24681 *) cat >>confdefs.h <<\_ACEOF
24682#define Py_UNICODE_SIZE 2
24683_ACEOF
24684 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024685esac
24686
Michael W. Hudson54241132001-12-07 15:38:26 +000024687
Martin v. Löwis11437992002-04-12 09:54:03 +000024688
24689
Georg Brandl52d168a2008-01-07 18:10:24 +000024690# wchar_t is only usable if it maps to an unsigned type
24691if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024692 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024693then
24694 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024695
Martin v. Löwis11437992002-04-12 09:54:03 +000024696cat >>confdefs.h <<\_ACEOF
24697#define HAVE_USABLE_WCHAR_T 1
24698_ACEOF
24699
Georg Brandl52d168a2008-01-07 18:10:24 +000024700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024701#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024702_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024703
Georg Brandl52d168a2008-01-07 18:10:24 +000024704elif test "$ac_cv_sizeof_short" = "$unicode_size"
24705then
24706 PY_UNICODE_TYPE="unsigned short"
24707 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024708#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024709_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024710
Georg Brandl52d168a2008-01-07 18:10:24 +000024711elif test "$ac_cv_sizeof_long" = "$unicode_size"
24712then
24713 PY_UNICODE_TYPE="unsigned long"
24714 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024715#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024716_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024717
Georg Brandl52d168a2008-01-07 18:10:24 +000024718else
24719 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024720fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024721{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24722echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024723
24724# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024725{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24726echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024727if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730 # See if sys/param.h defines the BYTE_ORDER macro.
24731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024732/* confdefs.h. */
24733_ACEOF
24734cat confdefs.h >>conftest.$ac_ext
24735cat >>conftest.$ac_ext <<_ACEOF
24736/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024737#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024738#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024739
Martin v. Löwis11437992002-04-12 09:54:03 +000024740int
24741main ()
24742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24744 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24745 bogus endian macros
24746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024747
24748 ;
24749 return 0;
24750}
24751_ACEOF
24752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753if { (ac_try="$ac_compile"
24754case "(($ac_try" in
24755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24756 *) ac_try_echo=$ac_try;;
24757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024761 grep -v '^ *+' conftest.er1 >conftest.err
24762 rm -f conftest.er1
24763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765 (exit $ac_status); } && {
24766 test -z "$ac_c_werror_flag" ||
24767 test ! -s conftest.err
24768 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024769 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024771/* confdefs.h. */
24772_ACEOF
24773cat confdefs.h >>conftest.$ac_ext
24774cat >>conftest.$ac_ext <<_ACEOF
24775/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024776#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024777#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024778
Martin v. Löwis11437992002-04-12 09:54:03 +000024779int
24780main ()
24781{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024782#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024783 not big endian
24784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024785
24786 ;
24787 return 0;
24788}
24789_ACEOF
24790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024791if { (ac_try="$ac_compile"
24792case "(($ac_try" in
24793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24794 *) ac_try_echo=$ac_try;;
24795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024799 grep -v '^ *+' conftest.er1 >conftest.err
24800 rm -f conftest.er1
24801 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024803 (exit $ac_status); } && {
24804 test -z "$ac_c_werror_flag" ||
24805 test ! -s conftest.err
24806 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024807 ac_cv_c_bigendian=yes
24808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024810sed 's/^/| /' conftest.$ac_ext >&5
24811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024812 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814
24815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024816else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024818sed 's/^/| /' conftest.$ac_ext >&5
24819
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 # It does not; compile a test program.
24821if test "$cross_compiling" = yes; then
24822 # try to guess the endianness by grepping values into an object file
24823 ac_cv_c_bigendian=unknown
24824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024825/* confdefs.h. */
24826_ACEOF
24827cat confdefs.h >>conftest.$ac_ext
24828cat >>conftest.$ac_ext <<_ACEOF
24829/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024830short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24831short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24832void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24833short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24834short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24835void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024836int
24837main ()
24838{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024839 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024840 ;
24841 return 0;
24842}
24843_ACEOF
24844rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024845if { (ac_try="$ac_compile"
24846case "(($ac_try" in
24847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24848 *) ac_try_echo=$ac_try;;
24849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024853 grep -v '^ *+' conftest.er1 >conftest.err
24854 rm -f conftest.er1
24855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024857 (exit $ac_status); } && {
24858 test -z "$ac_c_werror_flag" ||
24859 test ! -s conftest.err
24860 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024861 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024862 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024863fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024864if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24865 if test "$ac_cv_c_bigendian" = unknown; then
24866 ac_cv_c_bigendian=no
24867 else
24868 # finding both strings is unlikely to happen, but who knows?
24869 ac_cv_c_bigendian=unknown
24870 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024871fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024874sed 's/^/| /' conftest.$ac_ext >&5
24875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024876
Martin v. Löwis11437992002-04-12 09:54:03 +000024877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024878
24879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024880else
24881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024882/* confdefs.h. */
24883_ACEOF
24884cat confdefs.h >>conftest.$ac_ext
24885cat >>conftest.$ac_ext <<_ACEOF
24886/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024887$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024888int
24889main ()
24890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024892 /* Are we little or big endian? From Harbison&Steele. */
24893 union
24894 {
24895 long int l;
24896 char c[sizeof (long int)];
24897 } u;
24898 u.l = 1;
24899 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024900
24901 ;
24902 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024903}
Martin v. Löwis11437992002-04-12 09:54:03 +000024904_ACEOF
24905rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906if { (ac_try="$ac_link"
24907case "(($ac_try" in
24908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24909 *) ac_try_echo=$ac_try;;
24910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916 { (case "(($ac_try" in
24917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24918 *) ac_try_echo=$ac_try;;
24919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024922 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024924 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024925 ac_cv_c_bigendian=no
24926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024927 echo "$as_me: program exited with status $ac_status" >&5
24928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024929sed 's/^/| /' conftest.$ac_ext >&5
24930
Martin v. Löwis11437992002-04-12 09:54:03 +000024931( exit $ac_status )
24932ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024934rm -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 +000024935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936
24937
Martin v. Löwis11437992002-04-12 09:54:03 +000024938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024939
24940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24941fi
24942{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24943echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24944case $ac_cv_c_bigendian in
24945 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024946
24947cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024948#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024949_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024950 ;;
24951 no)
24952 ;;
24953 *)
24954 { { echo "$as_me:$LINENO: error: unknown endianness
24955presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24956echo "$as_me: error: unknown endianness
24957presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024958 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024959esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024960
Michael W. Hudson54241132001-12-07 15:38:26 +000024961
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024962# Check whether right shifting a negative integer extends the sign bit
24963# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024964{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24965echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024966if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024967 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024968else
Martin v. Löwis11437992002-04-12 09:54:03 +000024969
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024970if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024971 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024972else
Martin v. Löwis11437992002-04-12 09:54:03 +000024973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024974/* confdefs.h. */
24975_ACEOF
24976cat confdefs.h >>conftest.$ac_ext
24977cat >>conftest.$ac_ext <<_ACEOF
24978/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024979
24980int main()
24981{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024982 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024983}
24984
Martin v. Löwis11437992002-04-12 09:54:03 +000024985_ACEOF
24986rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024987if { (ac_try="$ac_link"
24988case "(($ac_try" in
24989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24990 *) ac_try_echo=$ac_try;;
24991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024993 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024994 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024997 { (case "(($ac_try" in
24998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24999 *) ac_try_echo=$ac_try;;
25000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025003 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025005 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025006 ac_cv_rshift_extends_sign=yes
25007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008 echo "$as_me: program exited with status $ac_status" >&5
25009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025010sed 's/^/| /' conftest.$ac_ext >&5
25011
Martin v. Löwis11437992002-04-12 09:54:03 +000025012( exit $ac_status )
25013ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025015rm -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 +000025016fi
25017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025018
25019fi
25020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025021{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25022echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025023if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025024then
Martin v. Löwis11437992002-04-12 09:54:03 +000025025
25026cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025027#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025028_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025029
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025030fi
25031
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025032# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025033{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25034echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025035if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025037else
Martin v. Löwis11437992002-04-12 09:54:03 +000025038
25039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025040/* confdefs.h. */
25041_ACEOF
25042cat confdefs.h >>conftest.$ac_ext
25043cat >>conftest.$ac_ext <<_ACEOF
25044/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025045#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025046int
25047main ()
25048{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025049
25050 FILE *f = fopen("/dev/null", "r");
25051 flockfile(f);
25052 getc_unlocked(f);
25053 funlockfile(f);
25054
Martin v. Löwis11437992002-04-12 09:54:03 +000025055 ;
25056 return 0;
25057}
25058_ACEOF
25059rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025060if { (ac_try="$ac_link"
25061case "(($ac_try" in
25062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25063 *) ac_try_echo=$ac_try;;
25064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025068 grep -v '^ *+' conftest.er1 >conftest.err
25069 rm -f conftest.er1
25070 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025072 (exit $ac_status); } && {
25073 test -z "$ac_c_werror_flag" ||
25074 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025075 } && test -s conftest$ac_exeext &&
25076 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025077 ac_cv_have_getc_unlocked=yes
25078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025080sed 's/^/| /' conftest.$ac_ext >&5
25081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025082 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025084
25085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025086 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025087fi
25088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025089{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25090echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025091if test "$ac_cv_have_getc_unlocked" = yes
25092then
Martin v. Löwis11437992002-04-12 09:54:03 +000025093
25094cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025095#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025096_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025097
25098fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025099
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025100# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025101# save the value of LIBS so we don't actually link Python with readline
25102LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025103
Gregory P. Smith18820942008-09-07 06:24:49 +000025104# On some systems we need to link readline to a termcap compatible
25105# library. NOTE: Keep the precedence of listed libraries synchronised
25106# with setup.py.
25107py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025108{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25109echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025110for py_libtermcap in "" ncursesw ncurses curses termcap; do
25111 if test -z "$py_libtermcap"; then
25112 READLINE_LIBS="-lreadline"
25113 else
25114 READLINE_LIBS="-lreadline -l$py_libtermcap"
25115 fi
25116 LIBS="$READLINE_LIBS $LIBS_no_readline"
25117 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025118/* confdefs.h. */
25119_ACEOF
25120cat confdefs.h >>conftest.$ac_ext
25121cat >>conftest.$ac_ext <<_ACEOF
25122/* end confdefs.h. */
25123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025124/* Override any GCC internal prototype to avoid an error.
25125 Use char because int might match the return type of a GCC
25126 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025127#ifdef __cplusplus
25128extern "C"
25129#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025130char readline ();
25131int
25132main ()
25133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025134return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025135 ;
25136 return 0;
25137}
25138_ACEOF
25139rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025140if { (ac_try="$ac_link"
25141case "(($ac_try" in
25142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25143 *) ac_try_echo=$ac_try;;
25144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025146 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025147 ac_status=$?
25148 grep -v '^ *+' conftest.er1 >conftest.err
25149 rm -f conftest.er1
25150 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025152 (exit $ac_status); } && {
25153 test -z "$ac_c_werror_flag" ||
25154 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025155 } && test -s conftest$ac_exeext &&
25156 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025157 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025159 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025160sed 's/^/| /' conftest.$ac_ext >&5
25161
Gregory P. Smith18820942008-09-07 06:24:49 +000025162
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025164
25165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025166 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025167 if test $py_cv_lib_readline = yes; then
25168 break
25169 fi
25170done
25171# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25172#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025173if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025174 { echo "$as_me:$LINENO: result: none" >&5
25175echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25178echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025179
25180cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025181#define HAVE_LIBREADLINE 1
25182_ACEOF
25183
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025184fi
25185
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025186# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025187{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25188echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025189if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025190 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025191else
25192 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025193LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025194cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025195/* confdefs.h. */
25196_ACEOF
25197cat confdefs.h >>conftest.$ac_ext
25198cat >>conftest.$ac_ext <<_ACEOF
25199/* end confdefs.h. */
25200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201/* Override any GCC internal prototype to avoid an error.
25202 Use char because int might match the return type of a GCC
25203 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025204#ifdef __cplusplus
25205extern "C"
25206#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025207char rl_callback_handler_install ();
25208int
25209main ()
25210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025212 ;
25213 return 0;
25214}
25215_ACEOF
25216rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217if { (ac_try="$ac_link"
25218case "(($ac_try" in
25219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25220 *) ac_try_echo=$ac_try;;
25221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025223 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025225 grep -v '^ *+' conftest.er1 >conftest.err
25226 rm -f conftest.er1
25227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025229 (exit $ac_status); } && {
25230 test -z "$ac_c_werror_flag" ||
25231 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025232 } && test -s conftest$ac_exeext &&
25233 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025234 ac_cv_lib_readline_rl_callback_handler_install=yes
25235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025236 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025237sed 's/^/| /' conftest.$ac_ext >&5
25238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025239 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025241
25242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025243 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025244LIBS=$ac_check_lib_save_LIBS
25245fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025246{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25247echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25248if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025249
25250cat >>confdefs.h <<\_ACEOF
25251#define HAVE_RL_CALLBACK 1
25252_ACEOF
25253
25254fi
25255
25256
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025257# check for readline 2.2
25258cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025259/* confdefs.h. */
25260_ACEOF
25261cat confdefs.h >>conftest.$ac_ext
25262cat >>conftest.$ac_ext <<_ACEOF
25263/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025264#include <readline/readline.h>
25265_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266if { (ac_try="$ac_cpp conftest.$ac_ext"
25267case "(($ac_try" in
25268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25269 *) ac_try_echo=$ac_try;;
25270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025272 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025273 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025274 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025275 rm -f conftest.er1
25276 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025278 (exit $ac_status); } >/dev/null && {
25279 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25280 test ! -s conftest.err
25281 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025282 have_readline=yes
25283else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025285sed 's/^/| /' conftest.$ac_ext >&5
25286
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025287 have_readline=no
25288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025289
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025290rm -f conftest.err conftest.$ac_ext
25291if test $have_readline = yes
25292then
25293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025294/* confdefs.h. */
25295_ACEOF
25296cat confdefs.h >>conftest.$ac_ext
25297cat >>conftest.$ac_ext <<_ACEOF
25298/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025299#include <readline/readline.h>
25300
25301_ACEOF
25302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025303 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025304
25305cat >>confdefs.h <<\_ACEOF
25306#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25307_ACEOF
25308
25309fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025310rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025311
Antoine Pitroud5131772009-10-26 19:22:14 +000025312 cat >conftest.$ac_ext <<_ACEOF
25313/* confdefs.h. */
25314_ACEOF
25315cat confdefs.h >>conftest.$ac_ext
25316cat >>conftest.$ac_ext <<_ACEOF
25317/* end confdefs.h. */
25318#include <readline/readline.h>
25319
25320_ACEOF
25321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25322 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25323
25324cat >>confdefs.h <<\_ACEOF
25325#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25326_ACEOF
25327
25328fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025329rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025330
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025331fi
25332
Martin v. Löwis0daad592001-09-30 21:09:59 +000025333# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025334{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25335echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025336if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025338else
Martin v. Löwis11437992002-04-12 09:54:03 +000025339 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025340LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025342/* confdefs.h. */
25343_ACEOF
25344cat confdefs.h >>conftest.$ac_ext
25345cat >>conftest.$ac_ext <<_ACEOF
25346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025348/* Override any GCC internal prototype to avoid an error.
25349 Use char because int might match the return type of a GCC
25350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025351#ifdef __cplusplus
25352extern "C"
25353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025354char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025355int
25356main ()
25357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025358return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 ;
25360 return 0;
25361}
25362_ACEOF
25363rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025364if { (ac_try="$ac_link"
25365case "(($ac_try" in
25366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25367 *) ac_try_echo=$ac_try;;
25368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025372 grep -v '^ *+' conftest.er1 >conftest.err
25373 rm -f conftest.er1
25374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025376 (exit $ac_status); } && {
25377 test -z "$ac_c_werror_flag" ||
25378 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025379 } && test -s conftest$ac_exeext &&
25380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025384sed 's/^/| /' conftest.$ac_ext >&5
25385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025386 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025388
25389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025391LIBS=$ac_check_lib_save_LIBS
25392fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25394echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25395if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025396
Martin v. Löwis11437992002-04-12 09:54:03 +000025397cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025398#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025399_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025400
Martin v. Löwis0daad592001-09-30 21:09:59 +000025401fi
25402
Michael W. Hudson54241132001-12-07 15:38:26 +000025403
Thomas Wouters89d996e2007-09-08 17:39:28 +000025404# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025405{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25406echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025407if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025408 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025409else
25410 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025411LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025412cat >conftest.$ac_ext <<_ACEOF
25413/* confdefs.h. */
25414_ACEOF
25415cat confdefs.h >>conftest.$ac_ext
25416cat >>conftest.$ac_ext <<_ACEOF
25417/* end confdefs.h. */
25418
25419/* Override any GCC internal prototype to avoid an error.
25420 Use char because int might match the return type of a GCC
25421 builtin and then its argument prototype would still apply. */
25422#ifdef __cplusplus
25423extern "C"
25424#endif
25425char rl_completion_display_matches_hook ();
25426int
25427main ()
25428{
25429return rl_completion_display_matches_hook ();
25430 ;
25431 return 0;
25432}
25433_ACEOF
25434rm -f conftest.$ac_objext conftest$ac_exeext
25435if { (ac_try="$ac_link"
25436case "(($ac_try" in
25437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25438 *) ac_try_echo=$ac_try;;
25439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025441 (eval "$ac_link") 2>conftest.er1
25442 ac_status=$?
25443 grep -v '^ *+' conftest.er1 >conftest.err
25444 rm -f conftest.er1
25445 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025447 (exit $ac_status); } && {
25448 test -z "$ac_c_werror_flag" ||
25449 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025450 } && test -s conftest$ac_exeext &&
25451 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025452 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025454 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025455sed 's/^/| /' conftest.$ac_ext >&5
25456
25457 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25458fi
25459
25460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25461 conftest$ac_exeext conftest.$ac_ext
25462LIBS=$ac_check_lib_save_LIBS
25463fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025464{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25465echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25466if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025467
25468cat >>confdefs.h <<\_ACEOF
25469#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25470_ACEOF
25471
25472fi
25473
25474
Martin v. Löwis0daad592001-09-30 21:09:59 +000025475# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025476{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25477echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025478if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025480else
Martin v. Löwis11437992002-04-12 09:54:03 +000025481 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025482LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025484/* confdefs.h. */
25485_ACEOF
25486cat confdefs.h >>conftest.$ac_ext
25487cat >>conftest.$ac_ext <<_ACEOF
25488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025490/* Override any GCC internal prototype to avoid an error.
25491 Use char because int might match the return type of a GCC
25492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025493#ifdef __cplusplus
25494extern "C"
25495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025496char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025497int
25498main ()
25499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025500return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025501 ;
25502 return 0;
25503}
25504_ACEOF
25505rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025506if { (ac_try="$ac_link"
25507case "(($ac_try" in
25508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25509 *) ac_try_echo=$ac_try;;
25510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025512 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025514 grep -v '^ *+' conftest.er1 >conftest.err
25515 rm -f conftest.er1
25516 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025518 (exit $ac_status); } && {
25519 test -z "$ac_c_werror_flag" ||
25520 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025521 } && test -s conftest$ac_exeext &&
25522 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025523 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025526sed 's/^/| /' conftest.$ac_ext >&5
25527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025528 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025530
25531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025533LIBS=$ac_check_lib_save_LIBS
25534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025535{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25536echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25537if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025538
Martin v. Löwis11437992002-04-12 09:54:03 +000025539cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025540#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025541_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025542
Guido van Rossum353ae582001-07-10 16:45:32 +000025543fi
25544
Jack Jansendd19cf82001-12-06 22:36:17 +000025545
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025546# also in readline 4.2
25547cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548/* confdefs.h. */
25549_ACEOF
25550cat confdefs.h >>conftest.$ac_ext
25551cat >>conftest.$ac_ext <<_ACEOF
25552/* end confdefs.h. */
25553#include <readline/readline.h>
25554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025555if { (ac_try="$ac_cpp conftest.$ac_ext"
25556case "(($ac_try" in
25557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25558 *) ac_try_echo=$ac_try;;
25559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025561 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025562 ac_status=$?
25563 grep -v '^ *+' conftest.er1 >conftest.err
25564 rm -f conftest.er1
25565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025567 (exit $ac_status); } >/dev/null && {
25568 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25569 test ! -s conftest.err
25570 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025571 have_readline=yes
25572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025573 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025574sed 's/^/| /' conftest.$ac_ext >&5
25575
25576 have_readline=no
25577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025578
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025579rm -f conftest.err conftest.$ac_ext
25580if test $have_readline = yes
25581then
25582 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025583/* confdefs.h. */
25584_ACEOF
25585cat confdefs.h >>conftest.$ac_ext
25586cat >>conftest.$ac_ext <<_ACEOF
25587/* end confdefs.h. */
25588#include <readline/readline.h>
25589
25590_ACEOF
25591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25592 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25593
25594cat >>confdefs.h <<\_ACEOF
25595#define HAVE_RL_CATCH_SIGNAL 1
25596_ACEOF
25597
25598fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025599rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025600
25601fi
25602
Martin v. Löwis82bca632006-02-10 20:49:30 +000025603# End of readline checks: restore LIBS
25604LIBS=$LIBS_no_readline
25605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025606{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25607echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025608if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025609 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025610else
Martin v. Löwis11437992002-04-12 09:54:03 +000025611
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025612if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025613 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025614else
Martin v. Löwis11437992002-04-12 09:54:03 +000025615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025616/* confdefs.h. */
25617_ACEOF
25618cat confdefs.h >>conftest.$ac_ext
25619cat >>conftest.$ac_ext <<_ACEOF
25620/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025621
25622int main()
25623{
25624 int val1 = nice(1);
25625 if (val1 != -1 && val1 == nice(2))
25626 exit(0);
25627 exit(1);
25628}
25629
Martin v. Löwis11437992002-04-12 09:54:03 +000025630_ACEOF
25631rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632if { (ac_try="$ac_link"
25633case "(($ac_try" in
25634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25635 *) ac_try_echo=$ac_try;;
25636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025638 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025639 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025642 { (case "(($ac_try" in
25643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25644 *) ac_try_echo=$ac_try;;
25645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025648 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025650 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025651 ac_cv_broken_nice=yes
25652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025653 echo "$as_me: program exited with status $ac_status" >&5
25654echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025655sed 's/^/| /' conftest.$ac_ext >&5
25656
Martin v. Löwis11437992002-04-12 09:54:03 +000025657( exit $ac_status )
25658ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025660rm -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 +000025661fi
25662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025663
25664fi
25665
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025666{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25667echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025668if test "$ac_cv_broken_nice" = yes
25669then
Martin v. Löwis11437992002-04-12 09:54:03 +000025670
25671cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025672#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025673_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025674
25675fi
25676
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025677{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25678echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025679if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025680 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025681else
25682 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025683 ac_cv_broken_poll=no
25684else
25685 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025686/* confdefs.h. */
25687_ACEOF
25688cat confdefs.h >>conftest.$ac_ext
25689cat >>conftest.$ac_ext <<_ACEOF
25690/* end confdefs.h. */
25691
25692#include <poll.h>
25693
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025694int main()
25695{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025696 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025697 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025698
25699 close (42);
25700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025701 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025702 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025703 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025704 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025705 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025706 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025707 return 1;
25708}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025709
25710_ACEOF
25711rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025712if { (ac_try="$ac_link"
25713case "(($ac_try" in
25714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25715 *) ac_try_echo=$ac_try;;
25716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025718 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722 { (case "(($ac_try" in
25723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25724 *) ac_try_echo=$ac_try;;
25725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025730 (exit $ac_status); }; }; then
25731 ac_cv_broken_poll=yes
25732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025733 echo "$as_me: program exited with status $ac_status" >&5
25734echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025735sed 's/^/| /' conftest.$ac_ext >&5
25736
25737( exit $ac_status )
25738ac_cv_broken_poll=no
25739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025740rm -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 +000025741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025742
25743
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025744fi
25745
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025746{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25747echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025748if test "$ac_cv_broken_poll" = yes
25749then
25750
25751cat >>confdefs.h <<\_ACEOF
25752#define HAVE_BROKEN_POLL 1
25753_ACEOF
25754
25755fi
25756
Brett Cannon43802422005-02-10 20:48:03 +000025757# 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 +000025758# (which is not required by ISO C or UNIX spec) and/or if we support
25759# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025760{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25761echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025762if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025763 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025764else
25765 cat >conftest.$ac_ext <<_ACEOF
25766/* confdefs.h. */
25767_ACEOF
25768cat confdefs.h >>conftest.$ac_ext
25769cat >>conftest.$ac_ext <<_ACEOF
25770/* end confdefs.h. */
25771#include <sys/types.h>
25772#include <$ac_cv_struct_tm>
25773
25774
25775int
25776main ()
25777{
25778static struct tm ac_aggr;
25779if (ac_aggr.tm_zone)
25780return 0;
25781 ;
25782 return 0;
25783}
25784_ACEOF
25785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025786if { (ac_try="$ac_compile"
25787case "(($ac_try" in
25788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25789 *) ac_try_echo=$ac_try;;
25790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025792 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025793 ac_status=$?
25794 grep -v '^ *+' conftest.er1 >conftest.err
25795 rm -f conftest.er1
25796 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025798 (exit $ac_status); } && {
25799 test -z "$ac_c_werror_flag" ||
25800 test ! -s conftest.err
25801 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025802 ac_cv_member_struct_tm_tm_zone=yes
25803else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025804 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025805sed 's/^/| /' conftest.$ac_ext >&5
25806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025807 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025808/* confdefs.h. */
25809_ACEOF
25810cat confdefs.h >>conftest.$ac_ext
25811cat >>conftest.$ac_ext <<_ACEOF
25812/* end confdefs.h. */
25813#include <sys/types.h>
25814#include <$ac_cv_struct_tm>
25815
25816
25817int
25818main ()
25819{
25820static struct tm ac_aggr;
25821if (sizeof ac_aggr.tm_zone)
25822return 0;
25823 ;
25824 return 0;
25825}
25826_ACEOF
25827rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025828if { (ac_try="$ac_compile"
25829case "(($ac_try" in
25830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25831 *) ac_try_echo=$ac_try;;
25832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025834 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025835 ac_status=$?
25836 grep -v '^ *+' conftest.er1 >conftest.err
25837 rm -f conftest.er1
25838 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025840 (exit $ac_status); } && {
25841 test -z "$ac_c_werror_flag" ||
25842 test ! -s conftest.err
25843 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025844 ac_cv_member_struct_tm_tm_zone=yes
25845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025846 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025847sed 's/^/| /' conftest.$ac_ext >&5
25848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025849 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025851
25852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025854
25855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025857{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25858echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25859if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025860
25861cat >>confdefs.h <<_ACEOF
25862#define HAVE_STRUCT_TM_TM_ZONE 1
25863_ACEOF
25864
25865
25866fi
25867
25868if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25869
25870cat >>confdefs.h <<\_ACEOF
25871#define HAVE_TM_ZONE 1
25872_ACEOF
25873
25874else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025875 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25876echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025877if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025878 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025879else
25880 cat >conftest.$ac_ext <<_ACEOF
25881/* confdefs.h. */
25882_ACEOF
25883cat confdefs.h >>conftest.$ac_ext
25884cat >>conftest.$ac_ext <<_ACEOF
25885/* end confdefs.h. */
25886#include <time.h>
25887
25888int
25889main ()
25890{
25891#ifndef tzname
25892 (void) tzname;
25893#endif
25894
25895 ;
25896 return 0;
25897}
25898_ACEOF
25899rm -f conftest.$ac_objext
25900if { (ac_try="$ac_compile"
25901case "(($ac_try" in
25902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25903 *) ac_try_echo=$ac_try;;
25904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025906 (eval "$ac_compile") 2>conftest.er1
25907 ac_status=$?
25908 grep -v '^ *+' conftest.er1 >conftest.err
25909 rm -f conftest.er1
25910 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912 (exit $ac_status); } && {
25913 test -z "$ac_c_werror_flag" ||
25914 test ! -s conftest.err
25915 } && test -s conftest.$ac_objext; then
25916 ac_cv_have_decl_tzname=yes
25917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025918 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919sed 's/^/| /' conftest.$ac_ext >&5
25920
25921 ac_cv_have_decl_tzname=no
25922fi
25923
25924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25925fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025926{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25927echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25928if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025929
25930cat >>confdefs.h <<_ACEOF
25931#define HAVE_DECL_TZNAME 1
25932_ACEOF
25933
25934
25935else
25936 cat >>confdefs.h <<_ACEOF
25937#define HAVE_DECL_TZNAME 0
25938_ACEOF
25939
25940
25941fi
25942
25943
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025944 { echo "$as_me:$LINENO: checking for tzname" >&5
25945echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025946if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025947 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025948else
25949 cat >conftest.$ac_ext <<_ACEOF
25950/* confdefs.h. */
25951_ACEOF
25952cat confdefs.h >>conftest.$ac_ext
25953cat >>conftest.$ac_ext <<_ACEOF
25954/* end confdefs.h. */
25955#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025956#if !HAVE_DECL_TZNAME
25957extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025958#endif
25959
25960int
25961main ()
25962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025963return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025964 ;
25965 return 0;
25966}
25967_ACEOF
25968rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969if { (ac_try="$ac_link"
25970case "(($ac_try" in
25971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25972 *) ac_try_echo=$ac_try;;
25973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025975 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025976 ac_status=$?
25977 grep -v '^ *+' conftest.er1 >conftest.err
25978 rm -f conftest.er1
25979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025981 (exit $ac_status); } && {
25982 test -z "$ac_c_werror_flag" ||
25983 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025984 } && test -s conftest$ac_exeext &&
25985 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025986 ac_cv_var_tzname=yes
25987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025988 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025989sed 's/^/| /' conftest.$ac_ext >&5
25990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025991 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993
25994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025995 conftest$ac_exeext conftest.$ac_ext
25996fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025997{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25998echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025999 if test $ac_cv_var_tzname = yes; then
26000
26001cat >>confdefs.h <<\_ACEOF
26002#define HAVE_TZNAME 1
26003_ACEOF
26004
26005 fi
26006fi
26007
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026008
Martin v. Löwis1d459062005-03-14 21:23:33 +000026009# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026010{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26011echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026012if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026014else
26015
26016if test "$cross_compiling" = yes; then
26017 ac_cv_working_tzset=no
26018else
26019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026020/* confdefs.h. */
26021_ACEOF
26022cat confdefs.h >>conftest.$ac_ext
26023cat >>conftest.$ac_ext <<_ACEOF
26024/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026025
26026#include <stdlib.h>
26027#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026028#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026029
26030#if HAVE_TZNAME
26031extern char *tzname[];
26032#endif
26033
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026034int main()
26035{
Brett Cannon18367812003-09-19 00:59:16 +000026036 /* Note that we need to ensure that not only does tzset(3)
26037 do 'something' with localtime, but it works as documented
26038 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026039 This includes making sure that tzname is set properly if
26040 tm->tm_zone does not exist since it is the alternative way
26041 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026042
26043 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026044 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026045 */
26046
Martin v. Löwis1d459062005-03-14 21:23:33 +000026047 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026048 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26049
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026050 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026051 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026052 if (localtime(&groundhogday)->tm_hour != 0)
26053 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026054#if HAVE_TZNAME
26055 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26056 if (strcmp(tzname[0], "UTC") ||
26057 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26058 exit(1);
26059#endif
Brett Cannon18367812003-09-19 00:59:16 +000026060
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026061 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026062 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026063 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026064 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026065#if HAVE_TZNAME
26066 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26067 exit(1);
26068#endif
Brett Cannon18367812003-09-19 00:59:16 +000026069
26070 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26071 tzset();
26072 if (localtime(&groundhogday)->tm_hour != 11)
26073 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026074#if HAVE_TZNAME
26075 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26076 exit(1);
26077#endif
26078
26079#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026080 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26081 exit(1);
26082 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26083 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026084#endif
Brett Cannon18367812003-09-19 00:59:16 +000026085
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026086 exit(0);
26087}
26088
26089_ACEOF
26090rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026091if { (ac_try="$ac_link"
26092case "(($ac_try" in
26093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26094 *) ac_try_echo=$ac_try;;
26095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026098 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026101 { (case "(($ac_try" in
26102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26103 *) ac_try_echo=$ac_try;;
26104esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026106 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026107 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026109 (exit $ac_status); }; }; then
26110 ac_cv_working_tzset=yes
26111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026112 echo "$as_me: program exited with status $ac_status" >&5
26113echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026114sed 's/^/| /' conftest.$ac_ext >&5
26115
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026116( exit $ac_status )
26117ac_cv_working_tzset=no
26118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026119rm -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 +000026120fi
26121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026122
26123fi
26124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026125{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26126echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026127if test "$ac_cv_working_tzset" = yes
26128then
26129
26130cat >>confdefs.h <<\_ACEOF
26131#define HAVE_WORKING_TZSET 1
26132_ACEOF
26133
26134fi
26135
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026136# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026137{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26138echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026139if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026140 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026141else
26142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026143/* confdefs.h. */
26144_ACEOF
26145cat confdefs.h >>conftest.$ac_ext
26146cat >>conftest.$ac_ext <<_ACEOF
26147/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026148#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026149int
26150main ()
26151{
26152
26153struct stat st;
26154st.st_mtim.tv_nsec = 1;
26155
26156 ;
26157 return 0;
26158}
26159_ACEOF
26160rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026161if { (ac_try="$ac_compile"
26162case "(($ac_try" in
26163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26164 *) ac_try_echo=$ac_try;;
26165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026169 grep -v '^ *+' conftest.er1 >conftest.err
26170 rm -f conftest.er1
26171 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026173 (exit $ac_status); } && {
26174 test -z "$ac_c_werror_flag" ||
26175 test ! -s conftest.err
26176 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026177 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026178else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026180sed 's/^/| /' conftest.$ac_ext >&5
26181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026182 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026183fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26186fi
26187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026188{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26189echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026190if test "$ac_cv_stat_tv_nsec" = yes
26191then
26192
26193cat >>confdefs.h <<\_ACEOF
26194#define HAVE_STAT_TV_NSEC 1
26195_ACEOF
26196
26197fi
26198
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026199# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026200{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26201echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026202if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026204else
26205 cat >conftest.$ac_ext <<_ACEOF
26206/* confdefs.h. */
26207_ACEOF
26208cat confdefs.h >>conftest.$ac_ext
26209cat >>conftest.$ac_ext <<_ACEOF
26210/* end confdefs.h. */
26211#include <sys/stat.h>
26212int
26213main ()
26214{
26215
26216struct stat st;
26217st.st_mtimespec.tv_nsec = 1;
26218
26219 ;
26220 return 0;
26221}
26222_ACEOF
26223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026224if { (ac_try="$ac_compile"
26225case "(($ac_try" in
26226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26227 *) ac_try_echo=$ac_try;;
26228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026231 ac_status=$?
26232 grep -v '^ *+' conftest.er1 >conftest.err
26233 rm -f conftest.er1
26234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026236 (exit $ac_status); } && {
26237 test -z "$ac_c_werror_flag" ||
26238 test ! -s conftest.err
26239 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026240 ac_cv_stat_tv_nsec2=yes
26241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026242 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026243sed 's/^/| /' conftest.$ac_ext >&5
26244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026246fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26249fi
26250
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026251{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26252echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026253if test "$ac_cv_stat_tv_nsec2" = yes
26254then
26255
26256cat >>confdefs.h <<\_ACEOF
26257#define HAVE_STAT_TV_NSEC2 1
26258_ACEOF
26259
26260fi
26261
Jack Jansen666b1e72001-10-31 12:11:48 +000026262# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026263{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26264echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026265if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026266 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026267else
Martin v. Löwis11437992002-04-12 09:54:03 +000026268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026269/* confdefs.h. */
26270_ACEOF
26271cat confdefs.h >>conftest.$ac_ext
26272cat >>conftest.$ac_ext <<_ACEOF
26273/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026274#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026275int
26276main ()
26277{
Jack Jansen666b1e72001-10-31 12:11:48 +000026278
26279 int rtn;
26280 rtn = mvwdelch(0,0,0);
26281
Martin v. Löwis11437992002-04-12 09:54:03 +000026282 ;
26283 return 0;
26284}
26285_ACEOF
26286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026287if { (ac_try="$ac_compile"
26288case "(($ac_try" in
26289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26290 *) ac_try_echo=$ac_try;;
26291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026295 grep -v '^ *+' conftest.er1 >conftest.err
26296 rm -f conftest.er1
26297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026299 (exit $ac_status); } && {
26300 test -z "$ac_c_werror_flag" ||
26301 test ! -s conftest.err
26302 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026303 ac_cv_mvwdelch_is_expression=yes
26304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026306sed 's/^/| /' conftest.$ac_ext >&5
26307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026308 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026309fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26312fi
26313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026314{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26315echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026316
26317if test "$ac_cv_mvwdelch_is_expression" = yes
26318then
Martin v. Löwis11437992002-04-12 09:54:03 +000026319
26320cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026321#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026322_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026323
26324fi
26325
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026326{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26327echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026328if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026329 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026330else
Martin v. Löwis11437992002-04-12 09:54:03 +000026331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026332/* confdefs.h. */
26333_ACEOF
26334cat confdefs.h >>conftest.$ac_ext
26335cat >>conftest.$ac_ext <<_ACEOF
26336/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026337#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026338int
26339main ()
26340{
Jack Jansen666b1e72001-10-31 12:11:48 +000026341
26342 WINDOW *w;
26343 w->_flags = 0;
26344
Martin v. Löwis11437992002-04-12 09:54:03 +000026345 ;
26346 return 0;
26347}
26348_ACEOF
26349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026350if { (ac_try="$ac_compile"
26351case "(($ac_try" in
26352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26353 *) ac_try_echo=$ac_try;;
26354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026358 grep -v '^ *+' conftest.er1 >conftest.err
26359 rm -f conftest.er1
26360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026362 (exit $ac_status); } && {
26363 test -z "$ac_c_werror_flag" ||
26364 test ! -s conftest.err
26365 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026366 ac_cv_window_has_flags=yes
26367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026369sed 's/^/| /' conftest.$ac_ext >&5
26370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26375fi
26376
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026377{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26378echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026379
Jack Jansen666b1e72001-10-31 12:11:48 +000026380
26381if test "$ac_cv_window_has_flags" = yes
26382then
Martin v. Löwis11437992002-04-12 09:54:03 +000026383
26384cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026385#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026386_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026387
26388fi
26389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026390{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26391echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026392cat >conftest.$ac_ext <<_ACEOF
26393/* confdefs.h. */
26394_ACEOF
26395cat confdefs.h >>conftest.$ac_ext
26396cat >>conftest.$ac_ext <<_ACEOF
26397/* end confdefs.h. */
26398#include <curses.h>
26399int
26400main ()
26401{
26402void *x=is_term_resized
26403 ;
26404 return 0;
26405}
26406_ACEOF
26407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026408if { (ac_try="$ac_compile"
26409case "(($ac_try" in
26410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26411 *) ac_try_echo=$ac_try;;
26412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026414 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026415 ac_status=$?
26416 grep -v '^ *+' conftest.er1 >conftest.err
26417 rm -f conftest.er1
26418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026420 (exit $ac_status); } && {
26421 test -z "$ac_c_werror_flag" ||
26422 test ! -s conftest.err
26423 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026424
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026425cat >>confdefs.h <<\_ACEOF
26426#define HAVE_CURSES_IS_TERM_RESIZED 1
26427_ACEOF
26428
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026429 { echo "$as_me:$LINENO: result: yes" >&5
26430echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026432 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026433sed 's/^/| /' conftest.$ac_ext >&5
26434
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026435 { echo "$as_me:$LINENO: result: no" >&5
26436echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026437
26438fi
26439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026442{ echo "$as_me:$LINENO: checking for resize_term" >&5
26443echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026444cat >conftest.$ac_ext <<_ACEOF
26445/* confdefs.h. */
26446_ACEOF
26447cat confdefs.h >>conftest.$ac_ext
26448cat >>conftest.$ac_ext <<_ACEOF
26449/* end confdefs.h. */
26450#include <curses.h>
26451int
26452main ()
26453{
26454void *x=resize_term
26455 ;
26456 return 0;
26457}
26458_ACEOF
26459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026460if { (ac_try="$ac_compile"
26461case "(($ac_try" in
26462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26463 *) ac_try_echo=$ac_try;;
26464esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026466 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026467 ac_status=$?
26468 grep -v '^ *+' conftest.er1 >conftest.err
26469 rm -f conftest.er1
26470 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472 (exit $ac_status); } && {
26473 test -z "$ac_c_werror_flag" ||
26474 test ! -s conftest.err
26475 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026476
26477cat >>confdefs.h <<\_ACEOF
26478#define HAVE_CURSES_RESIZE_TERM 1
26479_ACEOF
26480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026481 { echo "$as_me:$LINENO: result: yes" >&5
26482echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026484 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026485sed 's/^/| /' conftest.$ac_ext >&5
26486
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026487 { echo "$as_me:$LINENO: result: no" >&5
26488echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026489
26490fi
26491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026494{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26495echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026496cat >conftest.$ac_ext <<_ACEOF
26497/* confdefs.h. */
26498_ACEOF
26499cat confdefs.h >>conftest.$ac_ext
26500cat >>conftest.$ac_ext <<_ACEOF
26501/* end confdefs.h. */
26502#include <curses.h>
26503int
26504main ()
26505{
26506void *x=resizeterm
26507 ;
26508 return 0;
26509}
26510_ACEOF
26511rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026512if { (ac_try="$ac_compile"
26513case "(($ac_try" in
26514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26515 *) ac_try_echo=$ac_try;;
26516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026518 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026519 ac_status=$?
26520 grep -v '^ *+' conftest.er1 >conftest.err
26521 rm -f conftest.er1
26522 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026524 (exit $ac_status); } && {
26525 test -z "$ac_c_werror_flag" ||
26526 test ! -s conftest.err
26527 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026528
26529cat >>confdefs.h <<\_ACEOF
26530#define HAVE_CURSES_RESIZETERM 1
26531_ACEOF
26532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533 { echo "$as_me:$LINENO: result: yes" >&5
26534echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026536 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026537sed 's/^/| /' conftest.$ac_ext >&5
26538
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026539 { echo "$as_me:$LINENO: result: no" >&5
26540echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026541
26542fi
26543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026546{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26547echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026548
26549if test -r /dev/ptmx
26550then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026551 { echo "$as_me:$LINENO: result: yes" >&5
26552echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026553
26554cat >>confdefs.h <<\_ACEOF
26555#define HAVE_DEV_PTMX 1
26556_ACEOF
26557
Thomas Wouters89f507f2006-12-13 04:49:30 +000026558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026559 { echo "$as_me:$LINENO: result: no" >&5
26560echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026561fi
26562
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026563{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26564echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026565
26566if test -r /dev/ptc
26567then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026568 { echo "$as_me:$LINENO: result: yes" >&5
26569echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026570
26571cat >>confdefs.h <<\_ACEOF
26572#define HAVE_DEV_PTC 1
26573_ACEOF
26574
Thomas Wouters89f507f2006-12-13 04:49:30 +000026575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026576 { echo "$as_me:$LINENO: result: no" >&5
26577echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026578fi
26579
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026580if test "$have_long_long" = yes
26581then
26582 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26583echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26584 if test "${ac_cv_have_long_long_format+set}" = set; then
26585 echo $ECHO_N "(cached) $ECHO_C" >&6
26586else
26587 if test "$cross_compiling" = yes; then
26588 ac_cv_have_long_long_format=no
26589else
26590 cat >conftest.$ac_ext <<_ACEOF
26591/* confdefs.h. */
26592_ACEOF
26593cat confdefs.h >>conftest.$ac_ext
26594cat >>conftest.$ac_ext <<_ACEOF
26595/* end confdefs.h. */
26596
26597 #include <stdio.h>
26598 #include <stddef.h>
26599 #include <string.h>
26600
26601 #ifdef HAVE_SYS_TYPES_H
26602 #include <sys/types.h>
26603 #endif
26604
26605 int main()
26606 {
26607 char buffer[256];
26608
26609 if (sprintf(buffer, "%lld", (long long)123) < 0)
26610 return 1;
26611 if (strcmp(buffer, "123"))
26612 return 1;
26613
26614 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26615 return 1;
26616 if (strcmp(buffer, "-123"))
26617 return 1;
26618
26619 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26620 return 1;
26621 if (strcmp(buffer, "123"))
26622 return 1;
26623
26624 return 0;
26625 }
26626
26627_ACEOF
26628rm -f conftest$ac_exeext
26629if { (ac_try="$ac_link"
26630case "(($ac_try" in
26631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26632 *) ac_try_echo=$ac_try;;
26633esac
26634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26635 (eval "$ac_link") 2>&5
26636 ac_status=$?
26637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26639 { (case "(($ac_try" in
26640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26641 *) ac_try_echo=$ac_try;;
26642esac
26643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26644 (eval "$ac_try") 2>&5
26645 ac_status=$?
26646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26647 (exit $ac_status); }; }; then
26648 ac_cv_have_long_long_format=yes
26649else
26650 echo "$as_me: program exited with status $ac_status" >&5
26651echo "$as_me: failed program was:" >&5
26652sed 's/^/| /' conftest.$ac_ext >&5
26653
26654( exit $ac_status )
26655ac_cv_have_long_long_format=no
26656fi
26657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26658fi
26659
26660
26661
26662fi
26663
26664 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26665echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26666fi
26667
Mark Dickinson89d7d412009-12-31 20:50:59 +000026668if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026669then
26670
26671cat >>confdefs.h <<\_ACEOF
26672#define PY_FORMAT_LONG_LONG "ll"
26673_ACEOF
26674
26675fi
26676
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026677if test $ac_sys_system = Darwin
26678then
26679 LIBS="$LIBS -framework CoreFoundation"
26680fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026681
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026682{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26683echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026684if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026685 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026686else
26687 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026688 ac_cv_have_size_t_format="cross -- assuming yes"
26689
Thomas Wouters477c8d52006-05-27 19:21:47 +000026690else
26691 cat >conftest.$ac_ext <<_ACEOF
26692/* confdefs.h. */
26693_ACEOF
26694cat confdefs.h >>conftest.$ac_ext
26695cat >>conftest.$ac_ext <<_ACEOF
26696/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026697
Thomas Wouters477c8d52006-05-27 19:21:47 +000026698#include <stdio.h>
26699#include <stddef.h>
26700#include <string.h>
26701
Christian Heimes2c181612007-12-17 20:04:13 +000026702#ifdef HAVE_SYS_TYPES_H
26703#include <sys/types.h>
26704#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026705
26706#ifdef HAVE_SSIZE_T
26707typedef ssize_t Py_ssize_t;
26708#elif SIZEOF_VOID_P == SIZEOF_LONG
26709typedef long Py_ssize_t;
26710#else
26711typedef int Py_ssize_t;
26712#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026713
Christian Heimes2c181612007-12-17 20:04:13 +000026714int main()
26715{
26716 char buffer[256];
26717
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26719 return 1;
26720
Thomas Wouters89f507f2006-12-13 04:49:30 +000026721 if (strcmp(buffer, "123"))
26722 return 1;
26723
26724 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26725 return 1;
26726
26727 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026728 return 1;
26729
26730 return 0;
26731}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026732
Thomas Wouters477c8d52006-05-27 19:21:47 +000026733_ACEOF
26734rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026735if { (ac_try="$ac_link"
26736case "(($ac_try" in
26737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26738 *) ac_try_echo=$ac_try;;
26739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026741 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026742 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026744 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026745 { (case "(($ac_try" in
26746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26747 *) ac_try_echo=$ac_try;;
26748esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026751 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026753 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026754 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026756 echo "$as_me: program exited with status $ac_status" >&5
26757echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026758sed 's/^/| /' conftest.$ac_ext >&5
26759
26760( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026761ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026762fi
26763rm -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 +000026764fi
26765
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026766
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026767fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026768{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26769echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026770if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026771
26772cat >>confdefs.h <<\_ACEOF
26773#define PY_FORMAT_SIZE_T "z"
26774_ACEOF
26775
26776fi
26777
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026778{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26779echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026780if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026782else
Martin v. Löwis11437992002-04-12 09:54:03 +000026783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026784/* confdefs.h. */
26785_ACEOF
26786cat confdefs.h >>conftest.$ac_ext
26787cat >>conftest.$ac_ext <<_ACEOF
26788/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026789
26790#ifdef HAVE_SYS_TYPES_H
26791#include <sys/types.h>
26792#endif
26793#ifdef HAVE_SYS_SOCKET_H
26794#include <sys/socket.h>
26795#endif
26796
26797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026798typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026799int
26800main ()
26801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026802if ((ac__type_new_ *) 0)
26803 return 0;
26804if (sizeof (ac__type_new_))
26805 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026806 ;
26807 return 0;
26808}
26809_ACEOF
26810rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026811if { (ac_try="$ac_compile"
26812case "(($ac_try" in
26813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26814 *) ac_try_echo=$ac_try;;
26815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026819 grep -v '^ *+' conftest.er1 >conftest.err
26820 rm -f conftest.er1
26821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823 (exit $ac_status); } && {
26824 test -z "$ac_c_werror_flag" ||
26825 test ! -s conftest.err
26826 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026827 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026830sed 's/^/| /' conftest.$ac_ext >&5
26831
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026832 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834
26835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026837{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26838echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26839if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026840 :
26841else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026842
Martin v. Löwis01c04012002-11-11 14:58:44 +000026843cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026844#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026845_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026846
26847fi
26848
Michael W. Hudson54241132001-12-07 15:38:26 +000026849
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026850{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26851echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026852if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026853 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026854else
26855 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026856 ac_cv_broken_mbstowcs=no
26857else
26858 cat >conftest.$ac_ext <<_ACEOF
26859/* confdefs.h. */
26860_ACEOF
26861cat confdefs.h >>conftest.$ac_ext
26862cat >>conftest.$ac_ext <<_ACEOF
26863/* end confdefs.h. */
26864
26865#include<stdlib.h>
26866int main() {
26867 size_t len = -1;
26868 const char *str = "text";
26869 len = mbstowcs(NULL, str, 0);
26870 return (len != 4);
26871}
26872
26873_ACEOF
26874rm -f conftest$ac_exeext
26875if { (ac_try="$ac_link"
26876case "(($ac_try" in
26877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26878 *) ac_try_echo=$ac_try;;
26879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026881 (eval "$ac_link") 2>&5
26882 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26885 { (case "(($ac_try" in
26886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26887 *) ac_try_echo=$ac_try;;
26888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026890 (eval "$ac_try") 2>&5
26891 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026893 (exit $ac_status); }; }; then
26894 ac_cv_broken_mbstowcs=no
26895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026896 echo "$as_me: program exited with status $ac_status" >&5
26897echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026898sed 's/^/| /' conftest.$ac_ext >&5
26899
26900( exit $ac_status )
26901ac_cv_broken_mbstowcs=yes
26902fi
26903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26904fi
26905
26906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026907fi
26908
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026909{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26910echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026911if test "$ac_cv_broken_mbstowcs" = yes
26912then
26913
26914cat >>confdefs.h <<\_ACEOF
26915#define HAVE_BROKEN_MBSTOWCS 1
26916_ACEOF
26917
26918fi
26919
Antoine Pitroub52ec782009-01-25 16:34:23 +000026920# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026921{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26922echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026923
26924# Check whether --with-computed-gotos was given.
26925if test "${with_computed_gotos+set}" = set; then
26926 withval=$with_computed_gotos;
26927if test "$withval" != no
26928then
26929
26930cat >>confdefs.h <<\_ACEOF
26931#define USE_COMPUTED_GOTOS 1
26932_ACEOF
26933
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026934 { echo "$as_me:$LINENO: result: yes" >&5
26935echo "${ECHO_T}yes" >&6; }
26936else { echo "$as_me:$LINENO: result: no" >&5
26937echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026938fi
26939else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026940 { echo "$as_me:$LINENO: result: no" >&5
26941echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026942fi
26943
26944
26945
Michael W. Hudson54241132001-12-07 15:38:26 +000026946
26947
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026948for h in `(cd $srcdir;echo Python/thread_*.h)`
26949do
26950 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26951done
26952
Michael W. Hudson54241132001-12-07 15:38:26 +000026953
Neal Norwitzd24499d2005-12-18 21:36:39 +000026954SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026955{ echo "$as_me:$LINENO: checking for build directories" >&5
26956echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026957for dir in $SRCDIRS; do
26958 if test ! -d $dir; then
26959 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026960 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026961done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026962{ echo "$as_me:$LINENO: result: done" >&5
26963echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026964
Guido van Rossum627b2d71993-12-24 10:39:16 +000026965# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026966ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026967
Martin v. Löwis11437992002-04-12 09:54:03 +000026968cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026969# This file is a shell script that caches the results of configure
26970# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026971# scripts and configure runs, see configure's option --config-cache.
26972# It is not useful on other systems. If it contains results you don't
26973# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026974#
Martin v. Löwis11437992002-04-12 09:54:03 +000026975# config.status only pays attention to the cache file if you give it
26976# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026977#
Skip Montanaro6dead952003-09-25 14:50:04 +000026978# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026979# loading this file, other *unset* `ac_cv_foo' will be assigned the
26980# following values.
26981
26982_ACEOF
26983
Guido van Rossumf78abae1997-01-21 22:02:36 +000026984# The following way of writing the cache mishandles newlines in values,
26985# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026986# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026987# Ultrix sh set writes to stderr and can't be redirected directly,
26988# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026989(
26990 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26991 eval ac_val=\$$ac_var
26992 case $ac_val in #(
26993 *${as_nl}*)
26994 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026995 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26996echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026997 esac
26998 case $ac_var in #(
26999 _ | IFS | as_nl) ;; #(
27000 *) $as_unset $ac_var ;;
27001 esac ;;
27002 esac
27003 done
27004
Martin v. Löwis11437992002-04-12 09:54:03 +000027005 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027006 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27007 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027008 # `set' does not quote correctly, so add quotes (double-quote
27009 # substitution turns \\\\ into \\, and sed turns \\ into \).
27010 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027011 "s/'/'\\\\''/g;
27012 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027013 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027014 *)
27015 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027016 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027017 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018 esac |
27019 sort
27020) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027021 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027022 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027023 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027024 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027025 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27026 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027027 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27028 :end' >>confcache
27029if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27030 if test -w "$cache_file"; then
27031 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027032 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27033echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027034 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027035 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027036 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27037echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027038 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027039fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027040rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027041
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027042test "x$prefix" = xNONE && prefix=$ac_default_prefix
27043# Let make expand exec_prefix.
27044test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027045
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027046DEFS=-DHAVE_CONFIG_H
27047
Skip Montanaro6dead952003-09-25 14:50:04 +000027048ac_libobjs=
27049ac_ltlibobjs=
27050for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27051 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027052 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027053 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027054 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27055 # will be set to the directory where LIBOBJS objects are built.
27056 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27057 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027058done
27059LIBOBJS=$ac_libobjs
27060
27061LTLIBOBJS=$ac_ltlibobjs
27062
27063
Martin v. Löwis11437992002-04-12 09:54:03 +000027064
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027065: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027066ac_clean_files_save=$ac_clean_files
27067ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027068{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27069echo "$as_me: creating $CONFIG_STATUS" >&6;}
27070cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027071#! $SHELL
27072# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027073# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027074# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027075# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027076
Martin v. Löwis11437992002-04-12 09:54:03 +000027077debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027078ac_cs_recheck=false
27079ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027080SHELL=\${CONFIG_SHELL-$SHELL}
27081_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027082
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027083cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027084## --------------------- ##
27085## M4sh Initialization. ##
27086## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027088# Be more Bourne compatible
27089DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027090if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27091 emulate sh
27092 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027093 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027094 # is contrary to our usage. Disable this feature.
27095 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027096 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027097else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027098 case `(set -o) 2>/dev/null` in
27099 *posix*) set -o posix ;;
27100esac
27101
Michael W. Hudson54241132001-12-07 15:38:26 +000027102fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027103
27104
Michael W. Hudson54241132001-12-07 15:38:26 +000027105
Michael W. Hudson54241132001-12-07 15:38:26 +000027106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027107# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027108# Avoid depending upon Character Ranges.
27109as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27110as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27111as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27112as_cr_digits='0123456789'
27113as_cr_alnum=$as_cr_Letters$as_cr_digits
27114
27115# The user is always right.
27116if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027117 echo "#! /bin/sh" >conf$$.sh
27118 echo "exit 0" >>conf$$.sh
27119 chmod +x conf$$.sh
27120 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27121 PATH_SEPARATOR=';'
27122 else
27123 PATH_SEPARATOR=:
27124 fi
27125 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027126fi
27127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027128# Support unset when possible.
27129if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27130 as_unset=unset
27131else
27132 as_unset=false
27133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027135
27136# IFS
27137# We need space, tab and new line, in precisely that order. Quoting is
27138# there to prevent editors from complaining about space-tab.
27139# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27140# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027141as_nl='
27142'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027143IFS=" "" $as_nl"
27144
27145# Find who we are. Look in the path if we contain no directory separator.
27146case $0 in
27147 *[\\/]* ) as_myself=$0 ;;
27148 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027149for as_dir in $PATH
27150do
27151 IFS=$as_save_IFS
27152 test -z "$as_dir" && as_dir=.
27153 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27154done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027155IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027157 ;;
27158esac
27159# We did not find ourselves, most probably we were run as `sh COMMAND'
27160# in which case we are not to be found in the path.
27161if test "x$as_myself" = x; then
27162 as_myself=$0
27163fi
27164if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027165 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027166 { (exit 1); exit 1; }
27167fi
27168
27169# Work around bugs in pre-3.0 UWIN ksh.
27170for as_var in ENV MAIL MAILPATH
27171do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27172done
27173PS1='$ '
27174PS2='> '
27175PS4='+ '
27176
27177# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027178for as_var in \
27179 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27180 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27181 LC_TELEPHONE LC_TIME
27182do
27183 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27184 eval $as_var=C; export $as_var
27185 else
27186 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27187 fi
27188done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027189
27190# Required to use basename.
27191if expr a : '\(a\)' >/dev/null 2>&1 &&
27192 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27193 as_expr=expr
27194else
27195 as_expr=false
27196fi
27197
27198if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27199 as_basename=basename
27200else
27201 as_basename=false
27202fi
27203
27204
27205# Name of the executable.
27206as_me=`$as_basename -- "$0" ||
27207$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27208 X"$0" : 'X\(//\)$' \| \
27209 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027210echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027211 sed '/^.*\/\([^/][^/]*\)\/*$/{
27212 s//\1/
27213 q
27214 }
27215 /^X\/\(\/\/\)$/{
27216 s//\1/
27217 q
27218 }
27219 /^X\/\(\/\).*/{
27220 s//\1/
27221 q
27222 }
27223 s/.*/./; q'`
27224
27225# CDPATH.
27226$as_unset CDPATH
27227
27228
27229
Martin v. Löwis11437992002-04-12 09:54:03 +000027230 as_lineno_1=$LINENO
27231 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027232 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027233 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027234
Martin v. Löwis11437992002-04-12 09:54:03 +000027235 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27236 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027237 # line-number line after each line using $LINENO; the second 'sed'
27238 # does the real work. The second script uses 'N' to pair each
27239 # line-number line with the line containing $LINENO, and appends
27240 # trailing '-' during substitution so that $LINENO is not a special
27241 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027242 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027243 # scripts with optimization help from Paolo Bonzini. Blame Lee
27244 # E. McMahon (1931-1989) for sed's syntax. :-)
27245 sed -n '
27246 p
27247 /[$]LINENO/=
27248 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027249 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027250 s/[$]LINENO.*/&-/
27251 t lineno
27252 b
27253 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027254 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255 :loop
27256 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027259 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027261 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027262 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027263
Martin v. Löwis11437992002-04-12 09:54:03 +000027264 # Don't try to exec as it changes $[0], causing all sort of problems
27265 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027266 # original and so on. Autoconf is especially sensitive to this).
27267 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027268 # Exit status is that of the last command.
27269 exit
27270}
27271
27272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027273if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27274 as_dirname=dirname
27275else
27276 as_dirname=false
27277fi
27278
27279ECHO_C= ECHO_N= ECHO_T=
27280case `echo -n x` in
27281-n*)
27282 case `echo 'x\c'` in
27283 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27284 *) ECHO_C='\c';;
27285 esac;;
27286*)
27287 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027290if expr a : '\(a\)' >/dev/null 2>&1 &&
27291 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027292 as_expr=expr
27293else
27294 as_expr=false
27295fi
27296
27297rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027298if test -d conf$$.dir; then
27299 rm -f conf$$.dir/conf$$.file
27300else
27301 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027302 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027304echo >conf$$.file
27305if ln -s conf$$.file conf$$ 2>/dev/null; then
27306 as_ln_s='ln -s'
27307 # ... but there are two gotchas:
27308 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27309 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27310 # In both cases, we have to default to `cp -p'.
27311 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027312 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027313elif ln conf$$.file conf$$ 2>/dev/null; then
27314 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027315else
27316 as_ln_s='cp -p'
27317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027318rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27319rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027320
Skip Montanaro6dead952003-09-25 14:50:04 +000027321if mkdir -p . 2>/dev/null; then
27322 as_mkdir_p=:
27323else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027324 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027325 as_mkdir_p=false
27326fi
27327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027328if test -x / >/dev/null 2>&1; then
27329 as_test_x='test -x'
27330else
27331 if ls -dL / >/dev/null 2>&1; then
27332 as_ls_L_option=L
27333 else
27334 as_ls_L_option=
27335 fi
27336 as_test_x='
27337 eval sh -c '\''
27338 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027339 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027340 else
27341 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027342 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027343 esac;
27344 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27345 ???[sx]*):;;*)false;;esac;fi
27346 '\'' sh
27347 '
27348fi
27349as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027350
27351# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027352as_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 +000027353
27354# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027355as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027356
27357
Martin v. Löwis11437992002-04-12 09:54:03 +000027358exec 6>&1
27359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027360# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027361# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027362# values after options handling.
27363ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027364This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027365generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027366
27367 CONFIG_FILES = $CONFIG_FILES
27368 CONFIG_HEADERS = $CONFIG_HEADERS
27369 CONFIG_LINKS = $CONFIG_LINKS
27370 CONFIG_COMMANDS = $CONFIG_COMMANDS
27371 $ $0 $@
27372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027373on `(hostname || uname -n) 2>/dev/null | sed 1q`
27374"
27375
Martin v. Löwis11437992002-04-12 09:54:03 +000027376_ACEOF
27377
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027378cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027379# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027380config_files="$ac_config_files"
27381config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027383_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027384
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027385cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027386ac_cs_usage="\
27387\`$as_me' instantiates files from templates according to the
27388current configuration.
27389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027390Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027391
27392 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027393 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027394 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027395 -d, --debug don't remove temporary files
27396 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027397 --file=FILE[:TEMPLATE]
27398 instantiate the configuration file FILE
27399 --header=FILE[:TEMPLATE]
27400 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027401
27402Configuration files:
27403$config_files
27404
27405Configuration headers:
27406$config_headers
27407
27408Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027410_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027411cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027412ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027413python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027414configured by $0, generated by GNU Autoconf 2.61,
27415 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027416
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027417Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027418This config.status script is free software; the Free Software Foundation
27419gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027420
27421ac_pwd='$ac_pwd'
27422srcdir='$srcdir'
27423INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027424_ACEOF
27425
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027426cat >>$CONFIG_STATUS <<\_ACEOF
27427# If no file are specified by the user, then we need to provide default
27428# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027429ac_need_defaults=:
27430while test $# != 0
27431do
27432 case $1 in
27433 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27435 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027436 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027437 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027438 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027439 ac_option=$1
27440 ac_optarg=$2
27441 ac_shift=shift
27442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027443 esac
27444
Skip Montanaro6dead952003-09-25 14:50:04 +000027445 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027446 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027447 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27448 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027449 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027450 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027451 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027452 debug=: ;;
27453 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027454 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027456 ac_need_defaults=false;;
27457 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027458 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027459 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027460 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027461 --he | --h)
27462 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027463 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027464Try \`$0 --help' for more information." >&2
27465 { (exit 1); exit 1; }; };;
27466 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027467 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27469 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27470 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027471
27472 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027473 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027474Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027475 { (exit 1); exit 1; }; } ;;
27476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027477 *) ac_config_targets="$ac_config_targets $1"
27478 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027479
27480 esac
27481 shift
27482done
27483
Skip Montanaro6dead952003-09-25 14:50:04 +000027484ac_configure_extra_args=
27485
27486if $ac_cs_silent; then
27487 exec 6>/dev/null
27488 ac_configure_extra_args="$ac_configure_extra_args --silent"
27489fi
27490
27491_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027492cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027493if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027494 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27495 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027496 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027497 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027498fi
27499
Martin v. Löwis11437992002-04-12 09:54:03 +000027500_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027502exec 5>>config.log
27503{
27504 echo
27505 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27506## Running $as_me. ##
27507_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027508 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027509} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027511_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027512cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027513_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027515cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516
27517# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027518for ac_config_target in $ac_config_targets
27519do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027520 case $ac_config_target in
27521 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27522 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27523 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027524 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27525 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027526 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27527 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027528 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027530 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27531echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027532 { (exit 1); exit 1; }; };;
27533 esac
27534done
27535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027536
Martin v. Löwis11437992002-04-12 09:54:03 +000027537# If the user did not use the arguments to specify the items to instantiate,
27538# then the envvar interface is used. Set only those that are not.
27539# We use the long form for the default assignment because of an extremely
27540# bizarre bug on SunOS 4.1.3.
27541if $ac_need_defaults; then
27542 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27543 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27544fi
27545
Skip Montanaro6dead952003-09-25 14:50:04 +000027546# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027547# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027548# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027549# Hook for its removal unless debugging.
27550# Note that there is a small window in which the directory will not be cleaned:
27551# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027552$debug ||
27553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554 tmp=
27555 trap 'exit_status=$?
27556 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27557' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027558 trap '{ (exit 1); exit 1; }' 1 2 13 15
27559}
Martin v. Löwis11437992002-04-12 09:54:03 +000027560# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027561
Martin v. Löwis11437992002-04-12 09:54:03 +000027562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027563 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027564 test -n "$tmp" && test -d "$tmp"
27565} ||
27566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027567 tmp=./conf$$-$RANDOM
27568 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027569} ||
27570{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027571 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027572 { (exit 1); exit 1; }
27573}
27574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027575#
27576# Set up the sed scripts for CONFIG_FILES section.
27577#
27578
27579# No need to generate the scripts if there are no CONFIG_FILES.
27580# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027581if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027582
27583_ACEOF
27584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027585
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027587ac_delim='%!_!# '
27588for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027589 cat >conf$$subs.sed <<_ACEOF
27590SHELL!$SHELL$ac_delim
27591PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27592PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27593PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27594PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27595PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27596PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27597exec_prefix!$exec_prefix$ac_delim
27598prefix!$prefix$ac_delim
27599program_transform_name!$program_transform_name$ac_delim
27600bindir!$bindir$ac_delim
27601sbindir!$sbindir$ac_delim
27602libexecdir!$libexecdir$ac_delim
27603datarootdir!$datarootdir$ac_delim
27604datadir!$datadir$ac_delim
27605sysconfdir!$sysconfdir$ac_delim
27606sharedstatedir!$sharedstatedir$ac_delim
27607localstatedir!$localstatedir$ac_delim
27608includedir!$includedir$ac_delim
27609oldincludedir!$oldincludedir$ac_delim
27610docdir!$docdir$ac_delim
27611infodir!$infodir$ac_delim
27612htmldir!$htmldir$ac_delim
27613dvidir!$dvidir$ac_delim
27614pdfdir!$pdfdir$ac_delim
27615psdir!$psdir$ac_delim
27616libdir!$libdir$ac_delim
27617localedir!$localedir$ac_delim
27618mandir!$mandir$ac_delim
27619DEFS!$DEFS$ac_delim
27620ECHO_C!$ECHO_C$ac_delim
27621ECHO_N!$ECHO_N$ac_delim
27622ECHO_T!$ECHO_T$ac_delim
27623LIBS!$LIBS$ac_delim
27624build_alias!$build_alias$ac_delim
27625host_alias!$host_alias$ac_delim
27626target_alias!$target_alias$ac_delim
27627VERSION!$VERSION$ac_delim
27628SOVERSION!$SOVERSION$ac_delim
27629CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27630UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27631ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027632LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027633PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27634PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27635PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27636PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27637PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27638FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27639FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27640FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27641FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27642FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27643MACHDEP!$MACHDEP$ac_delim
27644SGI_ABI!$SGI_ABI$ac_delim
27645CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27646EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27647CC!$CC$ac_delim
27648CFLAGS!$CFLAGS$ac_delim
27649LDFLAGS!$LDFLAGS$ac_delim
27650CPPFLAGS!$CPPFLAGS$ac_delim
27651ac_ct_CC!$ac_ct_CC$ac_delim
27652EXEEXT!$EXEEXT$ac_delim
27653OBJEXT!$OBJEXT$ac_delim
27654CXX!$CXX$ac_delim
27655MAINCC!$MAINCC$ac_delim
27656CPP!$CPP$ac_delim
27657GREP!$GREP$ac_delim
27658EGREP!$EGREP$ac_delim
27659BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27660LIBRARY!$LIBRARY$ac_delim
27661LDLIBRARY!$LDLIBRARY$ac_delim
27662DLLLIBRARY!$DLLLIBRARY$ac_delim
27663BLDLIBRARY!$BLDLIBRARY$ac_delim
27664LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27665INSTSONAME!$INSTSONAME$ac_delim
27666RUNSHARED!$RUNSHARED$ac_delim
27667LINKCC!$LINKCC$ac_delim
27668GNULD!$GNULD$ac_delim
27669RANLIB!$RANLIB$ac_delim
27670AR!$AR$ac_delim
27671ARFLAGS!$ARFLAGS$ac_delim
27672SVNVERSION!$SVNVERSION$ac_delim
27673INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27674INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27675INSTALL_DATA!$INSTALL_DATA$ac_delim
27676LN!$LN$ac_delim
27677OPT!$OPT$ac_delim
27678BASECFLAGS!$BASECFLAGS$ac_delim
27679UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27680OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27681LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27682SO!$SO$ac_delim
27683LDSHARED!$LDSHARED$ac_delim
27684BLDSHARED!$BLDSHARED$ac_delim
27685CCSHARED!$CCSHARED$ac_delim
27686LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027689 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027690 break
27691 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027692 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27693echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694 { (exit 1); exit 1; }; }
27695 else
27696 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027697 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027698done
27699
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027700ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27701if test -n "$ac_eof"; then
27702 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27703 ac_eof=`expr $ac_eof + 1`
27704fi
27705
27706cat >>$CONFIG_STATUS <<_ACEOF
27707cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27708/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027709_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027710sed '
27711s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27712s/^/s,@/; s/!/@,|#_!!_#|/
27713:n
27714t n
27715s/'"$ac_delim"'$/,g/; t
27716s/$/\\/; p
27717N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27718' >>$CONFIG_STATUS <conf$$subs.sed
27719rm -f conf$$subs.sed
27720cat >>$CONFIG_STATUS <<_ACEOF
27721CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027722_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027723
27724
27725ac_delim='%!_!# '
27726for ac_last_try in false false false false false :; do
27727 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027728CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027729SHLIBS!$SHLIBS$ac_delim
27730USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27731SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27732USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27733LDLAST!$LDLAST$ac_delim
27734THREADOBJ!$THREADOBJ$ac_delim
27735DLINCLDIR!$DLINCLDIR$ac_delim
27736DYNLOADFILE!$DYNLOADFILE$ac_delim
27737MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27738TRUE!$TRUE$ac_delim
27739LIBOBJS!$LIBOBJS$ac_delim
27740HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27741HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27742HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27743HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27744HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27745LIBM!$LIBM$ac_delim
27746LIBC!$LIBC$ac_delim
27747THREADHEADERS!$THREADHEADERS$ac_delim
27748SRCDIRS!$SRCDIRS$ac_delim
27749LTLIBOBJS!$LTLIBOBJS$ac_delim
27750_ACEOF
27751
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027752 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027753 break
27754 elif $ac_last_try; then
27755 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27756echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027757 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027758 else
27759 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27760 fi
27761done
27762
27763ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27764if test -n "$ac_eof"; then
27765 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27766 ac_eof=`expr $ac_eof + 1`
27767fi
27768
27769cat >>$CONFIG_STATUS <<_ACEOF
27770cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027772_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027773sed '
27774s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27775s/^/s,@/; s/!/@,|#_!!_#|/
27776:n
27777t n
27778s/'"$ac_delim"'$/,g/; t
27779s/$/\\/; p
27780N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27781' >>$CONFIG_STATUS <conf$$subs.sed
27782rm -f conf$$subs.sed
27783cat >>$CONFIG_STATUS <<_ACEOF
27784:end
27785s/|#_!!_#|//g
27786CEOF$ac_eof
27787_ACEOF
27788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027789
27790# VPATH may cause trouble with some makes, so we remove $(srcdir),
27791# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27792# trailing colons and then remove the whole line if VPATH becomes empty
27793# (actually we leave an empty line to preserve line numbers).
27794if test "x$srcdir" = x.; then
27795 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27796s/:*\$(srcdir):*/:/
27797s/:*\${srcdir}:*/:/
27798s/:*@srcdir@:*/:/
27799s/^\([^=]*=[ ]*\):*/\1/
27800s/:*$//
27801s/^[^=]*=[ ]*$//
27802}'
27803fi
27804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027806fi # test -n "$CONFIG_FILES"
27807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027809for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810do
27811 case $ac_tag in
27812 :[FHLC]) ac_mode=$ac_tag; continue;;
27813 esac
27814 case $ac_mode$ac_tag in
27815 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027816 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27817echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027818 { (exit 1); exit 1; }; };;
27819 :[FH]-) ac_tag=-:-;;
27820 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27821 esac
27822 ac_save_IFS=$IFS
27823 IFS=:
27824 set x $ac_tag
27825 IFS=$ac_save_IFS
27826 shift
27827 ac_file=$1
27828 shift
27829
27830 case $ac_mode in
27831 :L) ac_source=$1;;
27832 :[FH])
27833 ac_file_inputs=
27834 for ac_f
27835 do
27836 case $ac_f in
27837 -) ac_f="$tmp/stdin";;
27838 *) # Look for the file first in the build tree, then in the source tree
27839 # (if the path is not absolute). The absolute path cannot be DOS-style,
27840 # because $ac_f cannot contain `:'.
27841 test -f "$ac_f" ||
27842 case $ac_f in
27843 [\\/$]*) false;;
27844 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27845 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027846 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27847echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027848 { (exit 1); exit 1; }; };;
27849 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027850 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851 done
27852
27853 # Let's still pretend it is `configure' which instantiates (i.e., don't
27854 # use $as_me), people would be surprised to read:
27855 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027856 configure_input="Generated from "`IFS=:
27857 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 if test x"$ac_file" != x-; then
27859 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027860 { echo "$as_me:$LINENO: creating $ac_file" >&5
27861echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027862 fi
27863
27864 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027865 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027866 esac
27867 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027868 esac
27869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027870 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027871$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027872 X"$ac_file" : 'X\(//\)[^/]' \| \
27873 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027874 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027875echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027876 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27877 s//\1/
27878 q
27879 }
27880 /^X\(\/\/\)[^/].*/{
27881 s//\1/
27882 q
27883 }
27884 /^X\(\/\/\)$/{
27885 s//\1/
27886 q
27887 }
27888 /^X\(\/\).*/{
27889 s//\1/
27890 q
27891 }
27892 s/.*/./; q'`
27893 { as_dir="$ac_dir"
27894 case $as_dir in #(
27895 -*) as_dir=./$as_dir;;
27896 esac
27897 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027898 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027899 while :; do
27900 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027901 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027902 *) as_qdir=$as_dir;;
27903 esac
27904 as_dirs="'$as_qdir' $as_dirs"
27905 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027906$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027907 X"$as_dir" : 'X\(//\)[^/]' \| \
27908 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027910echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027911 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27912 s//\1/
27913 q
27914 }
27915 /^X\(\/\/\)[^/].*/{
27916 s//\1/
27917 q
27918 }
27919 /^X\(\/\/\)$/{
27920 s//\1/
27921 q
27922 }
27923 /^X\(\/\).*/{
27924 s//\1/
27925 q
27926 }
27927 s/.*/./; q'`
27928 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027929 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027930 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027931 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27932echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027933 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027934 ac_builddir=.
27935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027936case "$ac_dir" in
27937.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27938*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027939 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027940 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027941 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027942 case $ac_top_builddir_sub in
27943 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27944 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27945 esac ;;
27946esac
27947ac_abs_top_builddir=$ac_pwd
27948ac_abs_builddir=$ac_pwd$ac_dir_suffix
27949# for backward compatibility:
27950ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027951
27952case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027953 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027954 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027955 ac_top_srcdir=$ac_top_builddir_sub
27956 ac_abs_top_srcdir=$ac_pwd ;;
27957 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027958 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027959 ac_top_srcdir=$srcdir
27960 ac_abs_top_srcdir=$srcdir ;;
27961 *) # Relative name.
27962 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27963 ac_top_srcdir=$ac_top_build_prefix$srcdir
27964 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027965esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027966ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027967
Martin v. Löwis11437992002-04-12 09:54:03 +000027968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027969 case $ac_mode in
27970 :F)
27971 #
27972 # CONFIG_FILE
27973 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027974
27975 case $INSTALL in
27976 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027977 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027978 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027979_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027980
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027981cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027982# If the template does not know about datarootdir, expand it.
27983# FIXME: This hack should be removed a few years after 2.60.
27984ac_datarootdir_hack=; ac_datarootdir_seen=
27985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027986case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027987 p
27988 q
27989}
27990/@datadir@/p
27991/@docdir@/p
27992/@infodir@/p
27993/@localedir@/p
27994/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027995' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027996*datarootdir*) ac_datarootdir_seen=yes;;
27997*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027998 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27999echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028000_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028001cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028002 ac_datarootdir_hack='
28003 s&@datadir@&$datadir&g
28004 s&@docdir@&$docdir&g
28005 s&@infodir@&$infodir&g
28006 s&@localedir@&$localedir&g
28007 s&@mandir@&$mandir&g
28008 s&\\\${datarootdir}&$datarootdir&g' ;;
28009esac
28010_ACEOF
28011
28012# Neutralize VPATH when `$srcdir' = `.'.
28013# Shell code in configure.ac might set extrasub.
28014# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028015cat >>$CONFIG_STATUS <<_ACEOF
28016 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028017$extrasub
28018_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028019cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028020:t
28021/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028022s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028023s&@top_builddir@&$ac_top_builddir_sub&;t t
28024s&@srcdir@&$ac_srcdir&;t t
28025s&@abs_srcdir@&$ac_abs_srcdir&;t t
28026s&@top_srcdir@&$ac_top_srcdir&;t t
28027s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28028s&@builddir@&$ac_builddir&;t t
28029s&@abs_builddir@&$ac_abs_builddir&;t t
28030s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28031s&@INSTALL@&$ac_INSTALL&;t t
28032$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028033" $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 +000028034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028035test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28036 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28037 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028038 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028039which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028040echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028041which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028043 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028044 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028045 -) cat "$tmp/out"; rm -f "$tmp/out";;
28046 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28047 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028048 ;;
28049 :H)
28050 #
28051 # CONFIG_HEADER
28052 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028053_ACEOF
28054
28055# Transform confdefs.h into a sed script `conftest.defines', that
28056# substitutes the proper values into config.h.in to produce config.h.
28057rm -f conftest.defines conftest.tail
28058# First, append a space to every undef/define line, to ease matching.
28059echo 's/$/ /' >conftest.defines
28060# Then, protect against being on the right side of a sed subst, or in
28061# an unquoted here document, in config.status. If some macros were
28062# called several times there might be several #defines for the same
28063# symbol, which is useless. But do not sort them, since the last
28064# AC_DEFINE must be honored.
28065ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28066# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28067# NAME is the cpp macro being defined, VALUE is the value it is being given.
28068# PARAMS is the parameter list in the macro definition--in most cases, it's
28069# just an empty string.
28070ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28071ac_dB='\\)[ (].*,\\1define\\2'
28072ac_dC=' '
28073ac_dD=' ,'
28074
28075uniq confdefs.h |
28076 sed -n '
28077 t rset
28078 :rset
28079 s/^[ ]*#[ ]*define[ ][ ]*//
28080 t ok
28081 d
28082 :ok
28083 s/[\\&,]/\\&/g
28084 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28085 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28086 ' >>conftest.defines
28087
28088# Remove the space that was appended to ease matching.
28089# Then replace #undef with comments. This is necessary, for
28090# example, in the case of _POSIX_SOURCE, which is predefined and required
28091# on some systems where configure will not decide to define it.
28092# (The regexp can be short, since the line contains either #define or #undef.)
28093echo 's/ $//
28094s,^[ #]*u.*,/* & */,' >>conftest.defines
28095
28096# Break up conftest.defines:
28097ac_max_sed_lines=50
28098
28099# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28100# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28101# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28102# et cetera.
28103ac_in='$ac_file_inputs'
28104ac_out='"$tmp/out1"'
28105ac_nxt='"$tmp/out2"'
28106
28107while :
28108do
28109 # Write a here document:
28110 cat >>$CONFIG_STATUS <<_ACEOF
28111 # First, check the format of the line:
28112 cat >"\$tmp/defines.sed" <<\\CEOF
28113/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28114/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28115b
28116:def
28117_ACEOF
28118 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28119 echo 'CEOF
28120 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28121 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28122 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28123 grep . conftest.tail >/dev/null || break
28124 rm -f conftest.defines
28125 mv conftest.tail conftest.defines
28126done
28127rm -f conftest.defines conftest.tail
28128
28129echo "ac_result=$ac_in" >>$CONFIG_STATUS
28130cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028131 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028132 echo "/* $configure_input */" >"$tmp/config.h"
28133 cat "$ac_result" >>"$tmp/config.h"
28134 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28135 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28136echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028137 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028138 rm -f $ac_file
28139 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028140 fi
28141 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028142 echo "/* $configure_input */"
28143 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028144 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028145 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028146 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028148
28149 esac
28150
28151done # for ac_tag
28152
Guido van Rossum627b2d71993-12-24 10:39:16 +000028153
Martin v. Löwis11437992002-04-12 09:54:03 +000028154{ (exit 0); exit 0; }
28155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028156chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028157ac_clean_files=$ac_clean_files_save
28158
28159
28160# configure is writing to config.log, and then calls config.status.
28161# config.status does its own redirection, appending to config.log.
28162# Unfortunately, on DOS this fails, as config.log is still kept open
28163# by configure, so config.status won't be able to write to it; its
28164# output is simply discarded. So we exec the FD to /dev/null,
28165# effectively closing config.log, so it can be properly (re)opened and
28166# appended to by config.status. When coming back to configure, we
28167# need to make the FD available again.
28168if test "$no_create" != yes; then
28169 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028170 ac_config_status_args=
28171 test "$silent" = yes &&
28172 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028173 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028174 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028175 exec 5>>config.log
28176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28177 # would make configure fail if this is the last instruction.
28178 $ac_cs_success || { (exit 1); exit 1; }
28179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028180
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028181
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028182echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028183if test ! -f Modules/Setup
28184then
28185 cp $srcdir/Modules/Setup.dist Modules/Setup
28186fi
28187
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028188echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028189if test ! -f Modules/Setup.local
28190then
28191 echo "# Edit this file for local setup changes" >Modules/Setup.local
28192fi
28193
28194echo "creating Makefile"
28195$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28196 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028197 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028198mv config.c Modules