blob: e4c88f4b368327f9490205c4576319458dc3f3b0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson05159c42009-12-03 03:01:27 +00002# From configure.in Revision: 76637 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001356 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001358 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001441python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001455It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$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 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# 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 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$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 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001829VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002069 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002070 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002071 esac
2072fi
Guido van Rossum91922671997-10-09 20:24:13 +00002073
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002074# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2075# disable features if it is defined, without any means to access these
2076# features as extensions. For these systems, we skip the definition of
2077# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2078# some feature, make sure there is no alternative way to access this
2079# feature. Also, when using wildcards, make sure you have verified the
2080# need for not defining _XOPEN_SOURCE on all systems matching the
2081# wildcard, and that the wildcard does not include future systems
2082# (which may remove their limitations).
2083case $ac_sys_system/$ac_sys_release in
2084 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2085 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002086 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002087 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002088 define_xopen_source=no
2089 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2090 # also defined. This can be overridden by defining _BSD_SOURCE
2091 # As this has a different meaning on Linux, only define it on OpenBSD
2092
2093cat >>confdefs.h <<\_ACEOF
2094#define _BSD_SOURCE 1
2095_ACEOF
2096
2097 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002098 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2099 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2100 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002101 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 +00002102 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002103 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2104 # of union __?sigval. Reported by Stuart Bishop.
2105 SunOS/5.6)
2106 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2108 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002109 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002110 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002111 define_xopen_source=no;;
2112 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002113 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002114 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002115 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002116 # On FreeBSD 4, the math functions C89 does not cover are never defined
2117 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2118 FreeBSD/4.*)
2119 define_xopen_source=no;;
2120 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2121 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2122 # identifies itself as Darwin/7.*
2123 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2124 # disables platform specific features beyond repair.
2125 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2126 # has no effect, don't bother defining them
2127 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002128 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002129 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2130 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2131 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002132 AIX/4)
2133 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002134 AIX/5)
2135 if test `uname -r` -eq 1; then
2136 define_xopen_source=no
2137 fi
2138 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002139 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2140 # defining NI_NUMERICHOST.
2141 QNX/6.3.2)
2142 define_xopen_source=no
2143 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002144
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002145esac
2146
2147if test $define_xopen_source = yes
2148then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002149 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2150 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002151 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2152 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002153 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002154 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155
2156cat >>confdefs.h <<\_ACEOF
2157#define _XOPEN_SOURCE 500
2158_ACEOF
2159
2160 ;;
2161 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002162
2163cat >>confdefs.h <<\_ACEOF
2164#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165_ACEOF
2166
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167 ;;
2168 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002169
2170 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2171 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2172 # several APIs are not declared. Since this is also needed in some
2173 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 # except for Solaris 10, where it must not be defined,
2175 # as it implies XPG4.2
2176 case $ac_sys_system/$ac_sys_release in
2177 SunOS/5.10)
2178 ;;
2179 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
2181cat >>confdefs.h <<\_ACEOF
2182#define _XOPEN_SOURCE_EXTENDED 1
2183_ACEOF
2184
Martin v. Löwis7dece662005-11-26 11:38:24 +00002185 ;;
2186 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002188
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189cat >>confdefs.h <<\_ACEOF
2190#define _POSIX_C_SOURCE 200112L
2191_ACEOF
2192
2193
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002194fi
2195
Guido van Rossum91922671997-10-09 20:24:13 +00002196#
2197# SGI compilers allow the specification of the both the ABI and the
2198# ISA on the command line. Depending on the values of these switches,
2199# different and often incompatable code will be generated.
2200#
2201# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2202# thus supply support for various ABI/ISA combinations. The MACHDEP
2203# variable is also adjusted.
2204#
2205
2206if test ! -z "$SGI_ABI"
2207then
2208 CC="cc $SGI_ABI"
2209 LDFLAGS="$SGI_ABI $LDFLAGS"
2210 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2211fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002212{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2213echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002214
Jack Jansen6b08a402004-06-03 12:41:45 +00002215# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2216# it may influence the way we can build extensions, so distutils
2217# needs to check it
2218
Thomas Wouters477c8d52006-05-27 19:21:47 +00002219
Jack Jansen6b08a402004-06-03 12:41:45 +00002220CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002221EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002223{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2224echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002225ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002226{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2227echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002228
Guido van Rossum627b2d71993-12-24 10:39:16 +00002229# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002230
2231# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2232# for debug/optimization stuff. BASECFLAGS is for flags that are required
2233# just to get things to compile and link. Users are free to override OPT
2234# when running configure or make. The build should not break if they do.
2235# BASECFLAGS should generally not be messed with, however.
2236
2237# XXX shouldn't some/most/all of this code be merged with the stuff later
2238# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002239{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2240echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002242# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002243if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002244 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002246 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002247 without_gcc=yes;;
2248 yes) CC=gcc
2249 without_gcc=no;;
2250 *) CC=$withval
2251 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002252 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002253else
Martin v. Löwis11437992002-04-12 09:54:03 +00002254
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002255 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002256 AIX*) CC=cc_r
2257 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002258 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002260fi
2261
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002262{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2263echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264
Guido van Rossum8b131c51995-03-09 14:10:13 +00002265# If the user switches compilers, we can't believe the cache
2266if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2267then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002268 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002269(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002270echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002271(it is also a good idea to do 'make clean' before compiling)" >&2;}
2272 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002273fi
2274
Martin v. Löwis11437992002-04-12 09:54:03 +00002275ac_ext=c
2276ac_cpp='$CPP $CPPFLAGS'
2277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2279ac_compiler_gnu=$ac_cv_c_compiler_gnu
2280if test -n "$ac_tool_prefix"; then
2281 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2282set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002283{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002285if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002287else
2288 if test -n "$CC"; then
2289 ac_cv_prog_CC="$CC" # Let the user override the test.
2290else
Martin v. Löwis11437992002-04-12 09:54:03 +00002291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2292for as_dir in $PATH
2293do
2294 IFS=$as_save_IFS
2295 test -z "$as_dir" && as_dir=.
2296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002297 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 +00002298 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002300 break 2
2301 fi
2302done
2303done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002305
Jack Jansendd19cf82001-12-06 22:36:17 +00002306fi
2307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002309if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002310 { echo "$as_me:$LINENO: result: $CC" >&5
2311echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002313 { echo "$as_me:$LINENO: result: no" >&5
2314echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002315fi
2316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002317
Martin v. Löwis11437992002-04-12 09:54:03 +00002318fi
2319if test -z "$ac_cv_prog_CC"; then
2320 ac_ct_CC=$CC
2321 # Extract the first word of "gcc", so it can be a program name with args.
2322set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002325if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 if test -n "$ac_ct_CC"; then
2329 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2330else
2331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2332for as_dir in $PATH
2333do
2334 IFS=$as_save_IFS
2335 test -z "$as_dir" && as_dir=.
2336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337 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 +00002338 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 break 2
2341 fi
2342done
2343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346fi
2347fi
2348ac_ct_CC=$ac_cv_prog_ac_ct_CC
2349if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002350 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2351echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002353 { echo "$as_me:$LINENO: result: no" >&5
2354echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355fi
2356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357 if test "x$ac_ct_CC" = x; then
2358 CC=""
2359 else
2360 case $cross_compiling:$ac_tool_warned in
2361yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002362{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2363whose name does not start with the host triplet. If you think this
2364configuration is useful to you, please write to autoconf@gnu.org." >&5
2365echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2366whose name does not start with the host triplet. If you think this
2367configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368ac_tool_warned=yes ;;
2369esac
2370 CC=$ac_ct_CC
2371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372else
2373 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002374fi
2375
Jack Jansendd19cf82001-12-06 22:36:17 +00002376if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377 if test -n "$ac_tool_prefix"; then
2378 # 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 +00002379set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002383 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 break 2
2398 fi
2399done
2400done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403fi
2404fi
2405CC=$ac_cv_prog_CC
2406if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002416fi
2417if test -z "$CC"; then
2418 # Extract the first word of "cc", so it can be a program name with args.
2419set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 if test -n "$CC"; then
2426 ac_cv_prog_CC="$CC" # Let the user override the test.
2427else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002428 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435 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 +00002436 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2437 ac_prog_rejected=yes
2438 continue
2439 fi
2440 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 break 2
2443 fi
2444done
2445done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448if test $ac_prog_rejected = yes; then
2449 # We found a bogon in the path, so make sure we never use it.
2450 set dummy $ac_cv_prog_CC
2451 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 # We chose a different compiler from the bogus one.
2454 # However, it has the same basename, so the bogon will be chosen
2455 # first if we set CC to just the basename; use the full file name.
2456 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 fi
2459fi
2460fi
2461fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002462CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002464 { echo "$as_me:$LINENO: result: $CC" >&5
2465echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002467 { echo "$as_me:$LINENO: result: no" >&5
2468echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469fi
2470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471
Martin v. Löwis11437992002-04-12 09:54:03 +00002472fi
2473if test -z "$CC"; then
2474 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 do
2477 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2478set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002479{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2480echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002481if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002483else
2484 if test -n "$CC"; then
2485 ac_cv_prog_CC="$CC" # Let the user override the test.
2486else
Martin v. Löwis11437992002-04-12 09:54:03 +00002487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
2492 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 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 +00002494 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002498done
2499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502fi
2503fi
2504CC=$ac_cv_prog_CC
2505if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002508else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002511fi
2512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 test -n "$CC" && break
2515 done
2516fi
2517if test -z "$CC"; then
2518 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002520do
2521 # Extract the first word of "$ac_prog", so it can be a program name with args.
2522set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002523{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2524echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002525if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002526 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002527else
2528 if test -n "$ac_ct_CC"; then
2529 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2530else
2531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2532for as_dir in $PATH
2533do
2534 IFS=$as_save_IFS
2535 test -z "$as_dir" && as_dir=.
2536 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 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 +00002538 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 break 2
2541 fi
2542done
2543done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546fi
2547fi
2548ac_ct_CC=$ac_cv_prog_ac_ct_CC
2549if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002550 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2551echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002553 { echo "$as_me:$LINENO: result: no" >&5
2554echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 test -n "$ac_ct_CC" && break
2559done
Michael W. Hudson54241132001-12-07 15:38:26 +00002560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 if test "x$ac_ct_CC" = x; then
2562 CC=""
2563 else
2564 case $cross_compiling:$ac_tool_warned in
2565yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002566{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2567whose name does not start with the host triplet. If you think this
2568configuration is useful to you, please write to autoconf@gnu.org." >&5
2569echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2570whose name does not start with the host triplet. If you think this
2571configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572ac_tool_warned=yes ;;
2573esac
2574 CC=$ac_ct_CC
2575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577
2578fi
2579
2580
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002582See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002584See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002585 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
2587# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002588echo "$as_me:$LINENO: checking for C compiler version" >&5
2589ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590{ (ac_try="$ac_compiler --version >&5"
2591case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600{ (ac_try="$ac_compiler -v >&5"
2601case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610{ (ac_try="$ac_compiler -V >&5"
2611case "(($ac_try" in
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 (exit $ac_status); }
2620
2621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002622/* confdefs.h. */
2623_ACEOF
2624cat confdefs.h >>conftest.$ac_ext
2625cat >>conftest.$ac_ext <<_ACEOF
2626/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628int
2629main ()
2630{
2631
2632 ;
2633 return 0;
2634}
2635_ACEOF
2636ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002637ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002638# Try to create an executable without -o first, disregard a.out.
2639# It will help us diagnose broken compilers, and finding out an intuition
2640# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002641{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2642echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2643ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2644#
2645# List of possible output files, starting from the most likely.
2646# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2647# only as a last resort. b.out is created by i960 compilers.
2648ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2649#
2650# The IRIX 6 linker writes into existing files which may not be
2651# executable, retaining their permissions. Remove them first so a
2652# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653ac_rmfiles=
2654for ac_file in $ac_files
2655do
2656 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002657 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2659 esac
2660done
2661rm -f $ac_rmfiles
2662
2663if { (ac_try="$ac_link_default"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2674# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2675# in a Makefile. We should not override ac_cv_exeext if it was cached,
2676# so that the user can short-circuit this test for compilers unknown to
2677# Autoconf.
2678for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002679do
2680 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002682 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002683 ;;
2684 [ab].out )
2685 # We found the default executable, but exeext='' is most
2686 # certainly right.
2687 break;;
2688 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2690 then :; else
2691 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2692 fi
2693 # We set ac_cv_exeext here because the later test for it is not
2694 # safe: cross compilers may not add the suffix if given an `-o'
2695 # argument, so we may need to know it at that point already.
2696 # Even if this section looks crufty: it has the advantage of
2697 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002698 break;;
2699 * )
2700 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 esac
2702done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703test "$ac_cv_exeext" = no && ac_cv_exeext=
2704
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002705else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706 ac_file=''
2707fi
2708
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002709{ echo "$as_me:$LINENO: result: $ac_file" >&5
2710echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002715{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002716See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002717echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002718See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002719 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002720fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002721
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002725# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002726{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2727echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002728# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2729# If not cross compiling, check that we can run a simple program.
2730if test "$cross_compiling" != yes; then
2731 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 { (case "(($ac_try" in
2733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2734 *) ac_try_echo=$ac_try;;
2735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 (exit $ac_status); }; }; then
2741 cross_compiling=no
2742 else
2743 if test "$cross_compiling" = maybe; then
2744 cross_compiling=yes
2745 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002746 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002747If you meant to cross compile, use \`--host'.
2748See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002750If you meant to cross compile, use \`--host'.
2751See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 fi
2754 fi
2755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: result: yes" >&5
2757echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002759rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002760ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002762# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002763{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2764echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2765{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2766echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2769echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770if { (ac_try="$ac_link"
2771case "(($ac_try" in
2772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773 *) ac_try_echo=$ac_try;;
2774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002780 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2781# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2782# work properly (i.e., refer to `conftest.exe'), while it won't with
2783# `rm'.
2784for ac_file in conftest.exe conftest conftest.*; do
2785 test -f "$ac_file" || continue
2786 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002788 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789 break;;
2790 * ) break;;
2791 esac
2792done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002795See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002796echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002797See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002798 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002799fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002800
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002801rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002802{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2803echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804
2805rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002806EXEEXT=$ac_cv_exeext
2807ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002808{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2809echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002810if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002811 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002812else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002813 cat >conftest.$ac_ext <<_ACEOF
2814/* confdefs.h. */
2815_ACEOF
2816cat confdefs.h >>conftest.$ac_ext
2817cat >>conftest.$ac_ext <<_ACEOF
2818/* end confdefs.h. */
2819
2820int
2821main ()
2822{
2823
2824 ;
2825 return 0;
2826}
2827_ACEOF
2828rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829if { (ac_try="$ac_compile"
2830case "(($ac_try" in
2831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2832 *) ac_try_echo=$ac_try;;
2833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002835 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 for ac_file in conftest.o conftest.obj conftest.*; do
2840 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002842 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2844 break;;
2845 esac
2846done
2847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002849sed 's/^/| /' conftest.$ac_ext >&5
2850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002851{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002852See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002854See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002855 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002856fi
2857
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002858rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002860{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2861echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862OBJEXT=$ac_cv_objext
2863ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2865echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002868else
2869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002870/* confdefs.h. */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002875
Martin v. Löwis11437992002-04-12 09:54:03 +00002876int
2877main ()
2878{
2879#ifndef __GNUC__
2880 choke me
2881#endif
2882
2883 ;
2884 return 0;
2885}
2886_ACEOF
2887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002888if { (ac_try="$ac_compile"
2889case "(($ac_try" in
2890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2891 *) ac_try_echo=$ac_try;;
2892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002896 grep -v '^ *+' conftest.er1 >conftest.err
2897 rm -f conftest.er1
2898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002900 (exit $ac_status); } && {
2901 test -z "$ac_c_werror_flag" ||
2902 test ! -s conftest.err
2903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 ac_compiler_gnu=yes
2905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002907sed 's/^/| /' conftest.$ac_ext >&5
2908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002909 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911
2912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002913ac_cv_c_compiler_gnu=$ac_compiler_gnu
2914
2915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002916{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2917echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2918GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002919ac_test_CFLAGS=${CFLAGS+set}
2920ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002921{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2922echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002923if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002925else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 ac_save_c_werror_flag=$ac_c_werror_flag
2927 ac_c_werror_flag=yes
2928 ac_cv_prog_cc_g=no
2929 CFLAGS="-g"
2930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002931/* confdefs.h. */
2932_ACEOF
2933cat confdefs.h >>conftest.$ac_ext
2934cat >>conftest.$ac_ext <<_ACEOF
2935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937int
2938main ()
2939{
2940
2941 ;
2942 return 0;
2943}
2944_ACEOF
2945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946if { (ac_try="$ac_compile"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 (exit $ac_status); } && {
2959 test -z "$ac_c_werror_flag" ||
2960 test ! -s conftest.err
2961 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002962 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002967 CFLAGS=""
2968 cat >conftest.$ac_ext <<_ACEOF
2969/* confdefs.h. */
2970_ACEOF
2971cat confdefs.h >>conftest.$ac_ext
2972cat >>conftest.$ac_ext <<_ACEOF
2973/* end confdefs.h. */
2974
2975int
2976main ()
2977{
2978
2979 ;
2980 return 0;
2981}
2982_ACEOF
2983rm -f conftest.$ac_objext
2984if { (ac_try="$ac_compile"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 (eval "$ac_compile") 2>conftest.er1
2991 ac_status=$?
2992 grep -v '^ *+' conftest.er1 >conftest.err
2993 rm -f conftest.er1
2994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996 (exit $ac_status); } && {
2997 test -z "$ac_c_werror_flag" ||
2998 test ! -s conftest.err
2999 } && test -s conftest.$ac_objext; then
3000 :
3001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003002 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003sed 's/^/| /' conftest.$ac_ext >&5
3004
3005 ac_c_werror_flag=$ac_save_c_werror_flag
3006 CFLAGS="-g"
3007 cat >conftest.$ac_ext <<_ACEOF
3008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013
3014int
3015main ()
3016{
3017
3018 ;
3019 return 0;
3020}
3021_ACEOF
3022rm -f conftest.$ac_objext
3023if { (ac_try="$ac_compile"
3024case "(($ac_try" in
3025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026 *) ac_try_echo=$ac_try;;
3027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003029 (eval "$ac_compile") 2>conftest.er1
3030 ac_status=$?
3031 grep -v '^ *+' conftest.er1 >conftest.err
3032 rm -f conftest.er1
3033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035 (exit $ac_status); } && {
3036 test -z "$ac_c_werror_flag" ||
3037 test ! -s conftest.err
3038 } && test -s conftest.$ac_objext; then
3039 ac_cv_prog_cc_g=yes
3040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003041 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042sed 's/^/| /' conftest.$ac_ext >&5
3043
3044
Guido van Rossum627b2d71993-12-24 10:39:16 +00003045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046
3047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
3050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3051fi
3052
3053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3054 ac_c_werror_flag=$ac_save_c_werror_flag
3055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003056{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3057echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003058if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003060elif test $ac_cv_prog_cc_g = yes; then
3061 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062 CFLAGS="-g -O2"
3063 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003064 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065 fi
3066else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003067 if test "$GCC" = yes; then
3068 CFLAGS="-O2"
3069 else
3070 CFLAGS=
3071 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003072fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003073{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3074echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003075if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003076 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003077else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003079ac_save_CC=$CC
3080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003081/* confdefs.h. */
3082_ACEOF
3083cat confdefs.h >>conftest.$ac_ext
3084cat >>conftest.$ac_ext <<_ACEOF
3085/* end confdefs.h. */
3086#include <stdarg.h>
3087#include <stdio.h>
3088#include <sys/types.h>
3089#include <sys/stat.h>
3090/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3091struct buf { int x; };
3092FILE * (*rcsopen) (struct buf *, struct stat *, int);
3093static char *e (p, i)
3094 char **p;
3095 int i;
3096{
3097 return p[i];
3098}
3099static char *f (char * (*g) (char **, int), char **p, ...)
3100{
3101 char *s;
3102 va_list v;
3103 va_start (v,p);
3104 s = g (p, va_arg (v,int));
3105 va_end (v);
3106 return s;
3107}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108
3109/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3110 function prototypes and stuff, but not '\xHH' hex character constants.
3111 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003113 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3114 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003116int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3119 inside strings and character constants. */
3120#define FOO(x) 'x'
3121int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3122
Skip Montanaro6dead952003-09-25 14:50:04 +00003123int test (int i, double x);
3124struct s1 {int (*f) (int a);};
3125struct s2 {int (*f) (double a);};
3126int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3127int argc;
3128char **argv;
3129int
3130main ()
3131{
3132return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3133 ;
3134 return 0;
3135}
3136_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3138 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003139do
3140 CC="$ac_save_CC $ac_arg"
3141 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142if { (ac_try="$ac_compile"
3143case "(($ac_try" in
3144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3145 *) ac_try_echo=$ac_try;;
3146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150 grep -v '^ *+' conftest.er1 >conftest.err
3151 rm -f conftest.er1
3152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 (exit $ac_status); } && {
3155 test -z "$ac_c_werror_flag" ||
3156 test ! -s conftest.err
3157 } && test -s conftest.$ac_objext; then
3158 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003161sed 's/^/| /' conftest.$ac_ext >&5
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165
3166rm -f core conftest.err conftest.$ac_objext
3167 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003168done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003170CC=$ac_save_CC
3171
3172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173# AC_CACHE_VAL
3174case "x$ac_cv_prog_cc_c89" in
3175 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 { echo "$as_me:$LINENO: result: none needed" >&5
3177echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003179 { echo "$as_me:$LINENO: result: unsupported" >&5
3180echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003183 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3184echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185esac
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003194
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003195
3196
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003197{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3198echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003201if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003203
3204 case $withval in
3205 no) with_cxx_main=no
3206 MAINCC='$(CC)';;
3207 yes) with_cxx_main=yes
3208 MAINCC='$(CXX)';;
3209 *) with_cxx_main=yes
3210 MAINCC=$withval
3211 if test -z "$CXX"
3212 then
3213 CXX=$withval
3214 fi;;
3215 esac
3216else
3217
3218 with_cxx_main=no
3219 MAINCC='$(CC)'
3220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003223{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3224echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226preset_cxx="$CXX"
3227if test -z "$CXX"
3228then
3229 case "$CC" in
3230 gcc) # Extract the first word of "g++", so it can be a program name with args.
3231set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003234if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003235 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003236else
3237 case $CXX in
3238 [\\/]* | ?:[\\/]*)
3239 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3240 ;;
3241 *)
3242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in notfound
3244do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
3247 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248 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 +00003249 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003251 break 2
3252 fi
3253done
3254done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003256
3257 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3258 ;;
3259esac
3260fi
3261CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003262if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003263 { echo "$as_me:$LINENO: result: $CXX" >&5
3264echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266 { echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270 ;;
3271 cc) # Extract the first word of "c++", so it can be a program name with args.
3272set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003275if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003276 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 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 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292 break 2
3293 fi
3294done
3295done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003296IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003303if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311 ;;
3312 esac
3313 if test "$CXX" = "notfound"
3314 then
3315 CXX=""
3316 fi
3317fi
3318if test -z "$CXX"
3319then
3320 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3321do
3322 # Extract the first word of "$ac_prog", so it can be a program name with args.
3323set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003326if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003327 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003328else
3329 if test -n "$CXX"; then
3330 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3331else
3332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
3337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338 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 +00003339 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341 break 2
3342 fi
3343done
3344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003345IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346
3347fi
3348fi
3349CXX=$ac_cv_prog_CXX
3350if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003351 { echo "$as_me:$LINENO: result: $CXX" >&5
3352echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003354 { echo "$as_me:$LINENO: result: no" >&5
3355echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356fi
3357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003358
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003359 test -n "$CXX" && break
3360done
3361test -n "$CXX" || CXX="notfound"
3362
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test "$preset_cxx" != "$CXX"
3369then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003375echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&2;}
3380fi
3381
3382
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003384
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003390{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392# On Suns, sometimes $CPP names a directory.
3393if test -n "$CPP" && test -d "$CPP"; then
3394 CPP=
3395fi
3396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # Double quotes because CPP needs to be expanded
3401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3402 do
3403 ac_preproc_ok=false
3404for ac_c_preproc_warn_flag in '' yes
3405do
3406 # Use a header file that comes with gcc, so configuring glibc
3407 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3409 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003410 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 # not just through cpp. "Syntax error" is here to catch this case.
3412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003413/* confdefs.h. */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h. */
3418#ifdef __STDC__
3419# include <limits.h>
3420#else
3421# include <assert.h>
3422#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003423 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003424_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003425if { (ac_try="$ac_cpp conftest.$ac_ext"
3426case "(($ac_try" in
3427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3428 *) ac_try_echo=$ac_try;;
3429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 rm -f conftest.er1
3435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 (exit $ac_status); } >/dev/null && {
3438 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3439 test ! -s conftest.err
3440 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441 :
3442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003444sed 's/^/| /' conftest.$ac_ext >&5
3445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # Broken: fails on valid input.
3447continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # can be detected and how.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003460#include <ac_nonexistent.h>
3461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462if { (ac_try="$ac_cpp conftest.$ac_ext"
3463case "(($ac_try" in
3464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3465 *) ac_try_echo=$ac_try;;
3466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003470 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 rm -f conftest.er1
3472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474 (exit $ac_status); } >/dev/null && {
3475 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3476 test ! -s conftest.err
3477 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: success on invalid input.
3479continue
3480else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003482sed 's/^/| /' conftest.$ac_ext >&5
3483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 # Passes both tests.
3485ac_preproc_ok=:
3486break
3487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489rm -f conftest.err conftest.$ac_ext
3490
3491done
3492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3493rm -f conftest.err conftest.$ac_ext
3494if $ac_preproc_ok; then
3495 break
3496fi
3497
3498 done
3499 ac_cv_prog_CPP=$CPP
3500
3501fi
3502 CPP=$ac_cv_prog_CPP
3503else
3504 ac_cv_prog_CPP=$CPP
3505fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003506{ echo "$as_me:$LINENO: result: $CPP" >&5
3507echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003508ac_preproc_ok=false
3509for ac_c_preproc_warn_flag in '' yes
3510do
3511 # Use a header file that comes with gcc, so configuring glibc
3512 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003513 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3514 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 # On the NeXT, cc -E runs the code through the compiler's parser,
3516 # not just through cpp. "Syntax error" is here to catch this case.
3517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003518/* confdefs.h. */
3519_ACEOF
3520cat confdefs.h >>conftest.$ac_ext
3521cat >>conftest.$ac_ext <<_ACEOF
3522/* end confdefs.h. */
3523#ifdef __STDC__
3524# include <limits.h>
3525#else
3526# include <assert.h>
3527#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003528 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003529_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530if { (ac_try="$ac_cpp conftest.$ac_ext"
3531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003538 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 rm -f conftest.er1
3540 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542 (exit $ac_status); } >/dev/null && {
3543 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3544 test ! -s conftest.err
3545 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 :
3547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003549sed 's/^/| /' conftest.$ac_ext >&5
3550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # Broken: fails on valid input.
3552continue
3553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555rm -f conftest.err conftest.$ac_ext
3556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 # can be detected and how.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003565#include <ac_nonexistent.h>
3566_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567if { (ac_try="$ac_cpp conftest.$ac_ext"
3568case "(($ac_try" in
3569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570 *) ac_try_echo=$ac_try;;
3571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 rm -f conftest.er1
3577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 (exit $ac_status); } >/dev/null && {
3580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3581 test ! -s conftest.err
3582 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: success on invalid input.
3584continue
3585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 # Passes both tests.
3590ac_preproc_ok=:
3591break
3592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594rm -f conftest.err conftest.$ac_ext
3595
3596done
3597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3598rm -f conftest.err conftest.$ac_ext
3599if $ac_preproc_ok; then
3600 :
3601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003603See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003604echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003605See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003606 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003607fi
3608
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
3614
3615
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3617echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003619 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003621 # Extract the first word of "grep ggrep" to use in msg output
3622if test -z "$GREP"; then
3623set dummy grep ggrep; ac_prog_name=$2
3624if test "${ac_cv_path_GREP+set}" = set; then
3625 echo $ECHO_N "(cached) $ECHO_C" >&6
3626else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003628# Loop through the user's path and test for each of PROGNAME-LIST
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
3634 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
3636 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3637 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3638 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 # Check for GNU $ac_path_GREP
3640case `"$ac_path_GREP" --version 2>&1` in
3641*GNU*)
3642 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3643*)
3644 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003645 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646 while :
3647 do
3648 cat "conftest.in" "conftest.in" >"conftest.tmp"
3649 mv "conftest.tmp" "conftest.in"
3650 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3653 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3654 ac_count=`expr $ac_count + 1`
3655 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3656 # Best one so far, save it but keep looking for a better one
3657 ac_cv_path_GREP="$ac_path_GREP"
3658 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003659 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 # 10*(2^10) chars as input seems more than enough
3661 test $ac_count -gt 10 && break
3662 done
3663 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3664esac
3665
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003666
3667 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 done
3669done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003670
3671done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003673
3674
3675fi
3676
3677GREP="$ac_cv_path_GREP"
3678if test -z "$GREP"; then
3679 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3680echo "$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 +00003681 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003682fi
3683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684else
3685 ac_cv_path_GREP=$GREP
3686fi
3687
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003690{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3691echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 GREP="$ac_cv_path_GREP"
3693
3694
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003695{ echo "$as_me:$LINENO: checking for egrep" >&5
3696echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699else
3700 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3701 then ac_cv_path_EGREP="$GREP -E"
3702 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703 # Extract the first word of "egrep" to use in msg output
3704if test -z "$EGREP"; then
3705set dummy egrep; ac_prog_name=$2
3706if test "${ac_cv_path_EGREP+set}" = set; then
3707 echo $ECHO_N "(cached) $ECHO_C" >&6
3708else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003710# Loop through the user's path and test for each of PROGNAME-LIST
3711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
3716 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
3718 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3719 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3720 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 # Check for GNU $ac_path_EGREP
3722case `"$ac_path_EGREP" --version 2>&1` in
3723*GNU*)
3724 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3725*)
3726 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003727 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728 while :
3729 do
3730 cat "conftest.in" "conftest.in" >"conftest.tmp"
3731 mv "conftest.tmp" "conftest.in"
3732 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3735 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3736 ac_count=`expr $ac_count + 1`
3737 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3738 # Best one so far, save it but keep looking for a better one
3739 ac_cv_path_EGREP="$ac_path_EGREP"
3740 ac_path_EGREP_max=$ac_count
3741 fi
3742 # 10*(2^10) chars as input seems more than enough
3743 test $ac_count -gt 10 && break
3744 done
3745 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3746esac
3747
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003748
3749 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 done
3751done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003752
3753done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003755
3756
3757fi
3758
3759EGREP="$ac_cv_path_EGREP"
3760if test -z "$EGREP"; then
3761 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3762echo "$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 +00003763 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766else
3767 ac_cv_path_EGREP=$EGREP
3768fi
3769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 fi
3772fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003773{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3774echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003776
3777
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778
3779{ echo "$as_me:$LINENO: checking for AIX" >&5
3780echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3781cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003782/* confdefs.h. */
3783_ACEOF
3784cat confdefs.h >>conftest.$ac_ext
3785cat >>conftest.$ac_ext <<_ACEOF
3786/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787#ifdef _AIX
3788 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003789#endif
3790
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003791_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3793 $EGREP "yes" >/dev/null 2>&1; then
3794 { echo "$as_me:$LINENO: result: yes" >&5
3795echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003796cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003797#define _ALL_SOURCE 1
3798_ACEOF
3799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003800else
3801 { echo "$as_me:$LINENO: result: no" >&5
3802echo "${ECHO_T}no" >&6; }
3803fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00003804rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003805
3806
3807
3808# Check for unsupported systems
3809case $ac_sys_system/$ac_sys_release in
3810atheos*|Linux*/1*)
3811 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3812 echo See README for details.
3813 exit 1;;
3814esac
3815
3816
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003817{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3818echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003819
3820# Check whether --with-suffix was given.
3821if test "${with_suffix+set}" = set; then
3822 withval=$with_suffix;
3823 case $withval in
3824 no) EXEEXT=;;
3825 yes) EXEEXT=.exe;;
3826 *) EXEEXT=$withval;;
3827 esac
3828fi
3829
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003830{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3831echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003832
3833# Test whether we're running on a non-case-sensitive system, in which
3834# case we give a warning if no ext is given
3835
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003836{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3837echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003838if test ! -d CaseSensitiveTestDir; then
3839mkdir CaseSensitiveTestDir
3840fi
3841
3842if test -d casesensitivetestdir
3843then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003846 BUILDEXEEXT=.exe
3847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003848 { echo "$as_me:$LINENO: result: no" >&5
3849echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003850 BUILDEXEEXT=$EXEEXT
3851fi
3852rmdir CaseSensitiveTestDir
3853
3854case $MACHDEP in
3855bsdos*)
3856 case $CC in
3857 gcc) CC="$CC -D_HAVE_BSDI";;
3858 esac;;
3859esac
3860
3861case $ac_sys_system in
3862hp*|HP*)
3863 case $CC in
3864 cc|*/cc) CC="$CC -Ae";;
3865 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003866SunOS*)
3867 # Some functions have a prototype only with that define, e.g. confstr
3868
3869cat >>confdefs.h <<\_ACEOF
3870#define __EXTENSIONS__ 1
3871_ACEOF
3872
3873 ;;
3874esac
3875
3876
3877
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003878{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3879echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003880if test -z "$LIBRARY"
3881then
3882 LIBRARY='libpython$(VERSION).a'
3883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003884{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3885echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003886
3887# LDLIBRARY is the name of the library to link against (as opposed to the
3888# name of the library into which to insert object files). BLDLIBRARY is also
3889# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3890# is blank as the main program is not linked directly against LDLIBRARY.
3891# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3892# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3893# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3894# DLLLIBRARY is the shared (i.e., DLL) library.
3895#
3896# RUNSHARED is used to run shared python without installed libraries
3897#
3898# INSTSONAME is the name of the shared library that will be use to install
3899# on the system - some systems like version suffix, others don't
3900
3901
3902
3903
3904
3905
3906LDLIBRARY="$LIBRARY"
3907BLDLIBRARY='$(LDLIBRARY)'
3908INSTSONAME='$(LDLIBRARY)'
3909DLLLIBRARY=''
3910LDLIBRARYDIR=''
3911RUNSHARED=''
3912
3913# LINKCC is the command that links the python executable -- default is $(CC).
3914# If CXX is set, and if it is needed to link a main function that was
3915# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3916# python might then depend on the C++ runtime
3917# This is altered for AIX in order to build the export list before
3918# linking.
3919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003920{ echo "$as_me:$LINENO: checking LINKCC" >&5
3921echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003922if test -z "$LINKCC"
3923then
3924 LINKCC='$(PURIFY) $(MAINCC)'
3925 case $ac_sys_system in
3926 AIX*)
3927 exp_extra="\"\""
3928 if test $ac_sys_release -ge 5 -o \
3929 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3930 exp_extra="."
3931 fi
3932 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003933 QNX*)
3934 # qcc must be used because the other compilers do not
3935 # support -N.
3936 LINKCC=qcc;;
3937 esac
3938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003939{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3940echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003941
3942# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3943# make sure we default having it set to "no": this is used by
3944# distutils.unixccompiler to know if it should add --enable-new-dtags
3945# to linker command lines, and failing to detect GNU ld simply results
3946# in the same bahaviour as before.
3947
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003948{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3949echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003950ac_prog=ld
3951if test "$GCC" = yes; then
3952 ac_prog=`$CC -print-prog-name=ld`
3953fi
3954case `"$ac_prog" -V 2>&1 < /dev/null` in
3955 *GNU*)
3956 GNULD=yes;;
3957 *)
3958 GNULD=no;;
3959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003960{ echo "$as_me:$LINENO: result: $GNULD" >&5
3961echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003962
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003963{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3964echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003965# Check whether --enable-shared was given.
3966if test "${enable_shared+set}" = set; then
3967 enableval=$enable_shared;
3968fi
3969
3970
3971if test -z "$enable_shared"
3972then
3973 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003974 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975 enable_shared="yes";;
3976 *)
3977 enable_shared="no";;
3978 esac
3979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003980{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3981echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003982
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003983{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3984echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003985# Check whether --enable-profiling was given.
3986if test "${enable_profiling+set}" = set; then
3987 enableval=$enable_profiling; ac_save_cc="$CC"
3988 CC="$CC -pg"
3989 if test "$cross_compiling" = yes; then
3990 ac_enable_profiling="no"
3991else
3992 cat >conftest.$ac_ext <<_ACEOF
3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3998int main() { return 0; }
3999_ACEOF
4000rm -f conftest$ac_exeext
4001if { (ac_try="$ac_link"
4002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004007 (eval "$ac_link") 2>&5
4008 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4011 { (case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004016 (eval "$ac_try") 2>&5
4017 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004019 (exit $ac_status); }; }; then
4020 ac_enable_profiling="yes"
4021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004022 echo "$as_me: program exited with status $ac_status" >&5
4023echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004024sed 's/^/| /' conftest.$ac_ext >&5
4025
4026( exit $ac_status )
4027ac_enable_profiling="no"
4028fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4030fi
4031
4032
4033 CC="$ac_save_cc"
4034fi
4035
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004036{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4037echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004038
4039case "$ac_enable_profiling" in
4040 "yes")
4041 BASECFLAGS="-pg $BASECFLAGS"
4042 LDFLAGS="-pg $LDFLAGS"
4043 ;;
4044esac
4045
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004046{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4047echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048
4049# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4050# library that we build, but we do not want to link against it (we
4051# will find it with a -framework option). For this reason there is an
4052# extra variable BLDLIBRARY against which Python and the extension
4053# modules are linked, BLDLIBRARY. This is normally the same as
4054# LDLIBRARY, but empty for MacOSX framework builds.
4055if test "$enable_framework"
4056then
4057 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4058 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4059 BLDLIBRARY=''
4060else
4061 BLDLIBRARY='$(LDLIBRARY)'
4062fi
4063
4064# Other platforms follow
4065if test $enable_shared = "yes"; then
4066
4067cat >>confdefs.h <<\_ACEOF
4068#define Py_ENABLE_SHARED 1
4069_ACEOF
4070
4071 case $ac_sys_system in
4072 CYGWIN*)
4073 LDLIBRARY='libpython$(VERSION).dll.a'
4074 DLLLIBRARY='libpython$(VERSION).dll'
4075 ;;
4076 SunOS*)
4077 LDLIBRARY='libpython$(VERSION).so'
4078 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4079 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4080 INSTSONAME="$LDLIBRARY".$SOVERSION
4081 ;;
4082 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4083 LDLIBRARY='libpython$(VERSION).so'
4084 BLDLIBRARY='-L. -lpython$(VERSION)'
4085 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4086 case $ac_sys_system in
4087 FreeBSD*)
4088 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4089 ;;
4090 esac
4091 INSTSONAME="$LDLIBRARY".$SOVERSION
4092 ;;
4093 hp*|HP*)
4094 case `uname -m` in
4095 ia64)
4096 LDLIBRARY='libpython$(VERSION).so'
4097 ;;
4098 *)
4099 LDLIBRARY='libpython$(VERSION).sl'
4100 ;;
4101 esac
4102 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4103 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4104 ;;
4105 OSF*)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4109 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004110 Darwin*)
4111 LDLIBRARY='libpython$(VERSION).dylib'
4112 BLDLIBRARY='-L. -lpython$(VERSION)'
4113 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4114 ;;
4115
4116 esac
4117else # shared is disabled
4118 case $ac_sys_system in
4119 CYGWIN*)
4120 BLDLIBRARY='$(LIBRARY)'
4121 LDLIBRARY='libpython$(VERSION).dll.a'
4122 ;;
4123 esac
4124fi
4125
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004126{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4127echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004128
4129if test -n "$ac_tool_prefix"; then
4130 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4131set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004132{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004134if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004135 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004136else
4137 if test -n "$RANLIB"; then
4138 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4139else
4140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4141for as_dir in $PATH
4142do
4143 IFS=$as_save_IFS
4144 test -z "$as_dir" && as_dir=.
4145 for ac_exec_ext in '' $ac_executable_extensions; do
4146 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4147 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004149 break 2
4150 fi
4151done
4152done
4153IFS=$as_save_IFS
4154
4155fi
4156fi
4157RANLIB=$ac_cv_prog_RANLIB
4158if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004159 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4160echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004162 { echo "$as_me:$LINENO: result: no" >&5
4163echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164fi
4165
4166
4167fi
4168if test -z "$ac_cv_prog_RANLIB"; then
4169 ac_ct_RANLIB=$RANLIB
4170 # Extract the first word of "ranlib", so it can be a program name with args.
4171set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004172{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004174if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004175 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004176else
4177 if test -n "$ac_ct_RANLIB"; then
4178 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4179else
4180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4181for as_dir in $PATH
4182do
4183 IFS=$as_save_IFS
4184 test -z "$as_dir" && as_dir=.
4185 for ac_exec_ext in '' $ac_executable_extensions; do
4186 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4187 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004188 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004189 break 2
4190 fi
4191done
4192done
4193IFS=$as_save_IFS
4194
4195fi
4196fi
4197ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4198if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004199 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4200echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004202 { echo "$as_me:$LINENO: result: no" >&5
4203echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204fi
4205
4206 if test "x$ac_ct_RANLIB" = x; then
4207 RANLIB=":"
4208 else
4209 case $cross_compiling:$ac_tool_warned in
4210yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004211{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4212whose name does not start with the host triplet. If you think this
4213configuration is useful to you, please write to autoconf@gnu.org." >&5
4214echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4215whose name does not start with the host triplet. If you think this
4216configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217ac_tool_warned=yes ;;
4218esac
4219 RANLIB=$ac_ct_RANLIB
4220 fi
4221else
4222 RANLIB="$ac_cv_prog_RANLIB"
4223fi
4224
4225
4226for ac_prog in ar aal
4227do
4228 # Extract the first word of "$ac_prog", so it can be a program name with args.
4229set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004230{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004232if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234else
4235 if test -n "$AR"; then
4236 ac_cv_prog_AR="$AR" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247 break 2
4248 fi
4249done
4250done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255AR=$ac_cv_prog_AR
4256if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004257 { echo "$as_me:$LINENO: result: $AR" >&5
4258echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004259else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004260 { echo "$as_me:$LINENO: result: no" >&5
4261echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262fi
4263
4264
4265 test -n "$AR" && break
4266done
4267test -n "$AR" || AR="ar"
4268
4269
4270# tweak ARFLAGS only if the user didn't set it on the command line
4271
4272if test -z "$ARFLAGS"
4273then
4274 ARFLAGS="rc"
4275fi
4276
4277
4278# Extract the first word of "svnversion", so it can be a program name with args.
4279set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004280{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004282if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004283 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004284else
4285 if test -n "$SVNVERSION"; then
4286 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4287else
4288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289for as_dir in $PATH
4290do
4291 IFS=$as_save_IFS
4292 test -z "$as_dir" && as_dir=.
4293 for ac_exec_ext in '' $ac_executable_extensions; do
4294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4295 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004297 break 2
4298 fi
4299done
4300done
4301IFS=$as_save_IFS
4302
4303 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4304fi
4305fi
4306SVNVERSION=$ac_cv_prog_SVNVERSION
4307if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004308 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4309echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004311 { echo "$as_me:$LINENO: result: no" >&5
4312echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004313fi
4314
4315
4316if test $SVNVERSION = found
4317then
4318 SVNVERSION="svnversion \$(srcdir)"
4319else
4320 SVNVERSION="echo Unversioned directory"
4321fi
4322
4323case $MACHDEP in
4324bsdos*|hp*|HP*)
4325 # install -d does not work on BSDI or HP-UX
4326 if test -z "$INSTALL"
4327 then
4328 INSTALL="${srcdir}/install-sh -c"
4329 fi
4330esac
4331ac_aux_dir=
4332for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4333 if test -f "$ac_dir/install-sh"; then
4334 ac_aux_dir=$ac_dir
4335 ac_install_sh="$ac_aux_dir/install-sh -c"
4336 break
4337 elif test -f "$ac_dir/install.sh"; then
4338 ac_aux_dir=$ac_dir
4339 ac_install_sh="$ac_aux_dir/install.sh -c"
4340 break
4341 elif test -f "$ac_dir/shtool"; then
4342 ac_aux_dir=$ac_dir
4343 ac_install_sh="$ac_aux_dir/shtool install -c"
4344 break
4345 fi
4346done
4347if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004348 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4349echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004350 { (exit 1); exit 1; }; }
4351fi
4352
4353# These three variables are undocumented and unsupported,
4354# and are intended to be withdrawn in a future Autoconf release.
4355# They can cause serious problems if a builder's source tree is in a directory
4356# whose full name contains unusual characters.
4357ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4358ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4359ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4360
4361
4362# Find a good install program. We prefer a C program (faster),
4363# so one script is as good as another. But avoid the broken or
4364# incompatible versions:
4365# SysV /etc/install, /usr/sbin/install
4366# SunOS /usr/etc/install
4367# IRIX /sbin/install
4368# AIX /bin/install
4369# AmigaOS /C/install, which installs bootblocks on floppy discs
4370# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4371# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4372# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4373# OS/2's system install, which has a completely different semantic
4374# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004375{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4376echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004377if test -z "$INSTALL"; then
4378if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004379 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004380else
4381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4382for as_dir in $PATH
4383do
4384 IFS=$as_save_IFS
4385 test -z "$as_dir" && as_dir=.
4386 # Account for people who put trailing slashes in PATH elements.
4387case $as_dir/ in
4388 ./ | .// | /cC/* | \
4389 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4390 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4391 /usr/ucb/* ) ;;
4392 *)
4393 # OSF1 and SCO ODT 3.0 have their own names for install.
4394 # Don't use installbsd from OSF since it installs stuff as root
4395 # by default.
4396 for ac_prog in ginstall scoinst install; do
4397 for ac_exec_ext in '' $ac_executable_extensions; do
4398 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4399 if test $ac_prog = install &&
4400 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4401 # AIX install. It has an incompatible calling convention.
4402 :
4403 elif test $ac_prog = install &&
4404 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4405 # program-specific install script used by HP pwplus--don't use.
4406 :
4407 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004408 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4409 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410 fi
4411 fi
4412 done
4413 done
4414 ;;
4415esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004416done
4417IFS=$as_save_IFS
4418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004419
4420fi
4421 if test "${ac_cv_path_install+set}" = set; then
4422 INSTALL=$ac_cv_path_install
4423 else
4424 # As a last resort, use the slow shell script. Don't cache a
4425 # value for INSTALL within a source directory, because that will
4426 # break other packages using the cache if that directory is
4427 # removed, or if the value is a relative name.
4428 INSTALL=$ac_install_sh
4429 fi
4430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004431{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4432echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004433
4434# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4435# It thinks the first close brace ends the variable substitution.
4436test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4437
4438test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4439
4440test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4441
4442
4443# Not every filesystem supports hard links
4444
4445if test -z "$LN" ; then
4446 case $ac_sys_system in
4447 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448 *) LN=ln;;
4449 esac
4450fi
4451
4452# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4454echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
4456# Check whether --with-pydebug was given.
4457if test "${with_pydebug+set}" = set; then
4458 withval=$with_pydebug;
4459if test "$withval" != no
4460then
4461
4462cat >>confdefs.h <<\_ACEOF
4463#define Py_DEBUG 1
4464_ACEOF
4465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004466 { echo "$as_me:$LINENO: result: yes" >&5
4467echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004468 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004469else { echo "$as_me:$LINENO: result: no" >&5
4470echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471fi
4472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004473 { echo "$as_me:$LINENO: result: no" >&5
4474echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004475fi
4476
4477
4478# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4479# merged with this chunk of code?
4480
4481# Optimizer/debugger flags
4482# ------------------------
4483# (The following bit of code is complicated enough - please keep things
4484# indented properly. Just pretend you're editing Python code. ;-)
4485
4486# There are two parallel sets of case statements below, one that checks to
4487# see if OPT was set and one that does BASECFLAGS setting based upon
4488# compiler and platform. BASECFLAGS tweaks need to be made even if the
4489# user set OPT.
4490
4491# tweak OPT based on compiler and platform, only if the user didn't set
4492# it on the command line
4493
4494if test -z "$OPT"
4495then
4496 case $GCC in
4497 yes)
4498 if test "$CC" != 'g++' ; then
4499 STRICT_PROTO="-Wstrict-prototypes"
4500 fi
4501 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4502 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4503 WRAP="-fwrapv"
4504 fi
4505 case $ac_cv_prog_cc_g in
4506 yes)
4507 if test "$Py_DEBUG" = 'true' ; then
4508 # Optimization messes up debuggers, so turn it off for
4509 # debug builds.
4510 OPT="-g -Wall $STRICT_PROTO"
4511 else
4512 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4513 fi
4514 ;;
4515 *)
4516 OPT="-O3 -Wall $STRICT_PROTO"
4517 ;;
4518 esac
4519 case $ac_sys_system in
4520 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4521 ;;
4522 esac
4523 ;;
4524
4525 *)
4526 OPT="-O"
4527 ;;
4528 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004529fi
4530
4531
4532
4533# The -arch flags for universal builds on OSX
4534UNIVERSAL_ARCH_FLAGS=
4535
4536
4537# tweak BASECFLAGS based on compiler and platform
4538case $GCC in
4539yes)
4540 # Python violates C99 rules, by casting between incompatible
4541 # pointer types. GCC may generate bad code as a result of that,
4542 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004543 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4544echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545 ac_save_cc="$CC"
4546 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004547 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004548 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004549else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004550 cat >conftest.$ac_ext <<_ACEOF
4551/* confdefs.h. */
4552_ACEOF
4553cat confdefs.h >>conftest.$ac_ext
4554cat >>conftest.$ac_ext <<_ACEOF
4555/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004556
4557int
4558main ()
4559{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004560int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004561 ;
4562 return 0;
4563}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004564_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004565rm -f conftest.$ac_objext
4566if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004567case "(($ac_try" in
4568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4569 *) ac_try_echo=$ac_try;;
4570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004572 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004573 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004574 grep -v '^ *+' conftest.er1 >conftest.err
4575 rm -f conftest.er1
4576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004578 (exit $ac_status); } && {
4579 test -z "$ac_c_werror_flag" ||
4580 test ! -s conftest.err
4581 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004582 ac_cv_no_strict_aliasing_ok=yes
4583else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004584 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004585sed 's/^/| /' conftest.$ac_ext >&5
4586
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004587 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004588fi
4589
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004591fi
4592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004593 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004594 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4595echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596 if test $ac_cv_no_strict_aliasing_ok = yes
4597 then
4598 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4599 fi
4600
4601 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4602 # support. Without this, treatment of subnormals doesn't follow
4603 # the standard.
4604 case $ac_sys_machine in
4605 alpha*)
4606 BASECFLAGS="$BASECFLAGS -mieee"
4607 ;;
4608 esac
4609
4610 case $ac_sys_system in
4611 SCO_SV*)
4612 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4613 ;;
4614 # is there any other compiler on Darwin besides gcc?
4615 Darwin*)
4616 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4617 # used to be here, but non-Apple gcc doesn't accept them.
4618
4619
4620 if test "${enable_universalsdk}"; then
4621 UNIVERSAL_ARCH_FLAGS=""
4622 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4623 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4624 ARCH_RUN_32BIT=""
4625
4626 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4627 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004628 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004629
4630 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4631 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4632 ARCH_RUN_32BIT="arch -i386 -ppc"
4633
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004634 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4635 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4636 ARCH_RUN_32BIT="arch -i386"
4637
4638 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4639 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4640 ARCH_RUN_32BIT="arch -i386 -ppc"
4641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004643 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4644echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004645 { (exit 1); exit 1; }; }
4646
4647 fi
4648
4649
4650 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4651 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4652 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4653 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4654 fi
4655 fi
4656
4657 # Calculate the right deployment target for this build.
4658 #
4659 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4660 if test ${cur_target} '>' 10.2; then
4661 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004662 if test ${enable_universalsdk}; then
4663 if test "${UNIVERSAL_ARCHS}" = "all"; then
4664 # Ensure that the default platform for a
4665 # 4-way universal build is OSX 10.5,
4666 # that's the first OS release where
4667 # 4-way builds make sense.
4668 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004669
4670 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4671 cur_target='10.5'
4672
4673 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4674 cur_target='10.5'
4675
4676 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4677 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004678 fi
4679 else
4680 if test `arch` = "i386"; then
4681 # On Intel macs default to a deployment
4682 # target of 10.4, that's the first OSX
4683 # release with Intel support.
4684 cur_target="10.4"
4685 fi
4686 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687 fi
4688 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4689
4690 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4691 # environment with a value that is the same as what we'll use
4692 # in the Makefile to ensure that we'll get the same compiler
4693 # environment during configure and build time.
4694 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4695 export MACOSX_DEPLOYMENT_TARGET
4696 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4697
4698 ;;
4699 OSF*)
4700 BASECFLAGS="$BASECFLAGS -mieee"
4701 ;;
4702 esac
4703 ;;
4704
4705*)
4706 case $ac_sys_system in
4707 OpenUNIX*|UnixWare*)
4708 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4709 ;;
4710 OSF*)
4711 BASECFLAGS="$BASECFLAGS -ieee -std"
4712 ;;
4713 SCO_SV*)
4714 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4715 ;;
4716 esac
4717 ;;
4718esac
4719
4720if test "$Py_DEBUG" = 'true'; then
4721 :
4722else
4723 OPT="-DNDEBUG $OPT"
4724fi
4725
4726if test "$ac_arch_flags"
4727then
4728 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4729fi
4730
4731# disable check for icc since it seems to pass, but generates a warning
4732if test "$CC" = icc
4733then
4734 ac_cv_opt_olimit_ok=no
4735fi
4736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004737{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4738echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004740 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741else
4742 ac_save_cc="$CC"
4743CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004744cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745/* confdefs.h. */
4746_ACEOF
4747cat confdefs.h >>conftest.$ac_ext
4748cat >>conftest.$ac_ext <<_ACEOF
4749/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004750
4751int
4752main ()
4753{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004755 ;
4756 return 0;
4757}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004759rm -f conftest.$ac_objext
4760if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761case "(($ac_try" in
4762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4763 *) ac_try_echo=$ac_try;;
4764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004766 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004768 grep -v '^ *+' conftest.er1 >conftest.err
4769 rm -f conftest.er1
4770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004772 (exit $ac_status); } && {
4773 test -z "$ac_c_werror_flag" ||
4774 test ! -s conftest.err
4775 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776 ac_cv_opt_olimit_ok=yes
4777else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004778 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779sed 's/^/| /' conftest.$ac_ext >&5
4780
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004781 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782fi
4783
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785CC="$ac_save_cc"
4786fi
4787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004788{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4789echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790if test $ac_cv_opt_olimit_ok = yes; then
4791 case $ac_sys_system in
4792 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4793 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4794 # environment?
4795 Darwin*)
4796 ;;
4797 *)
4798 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4799 ;;
4800 esac
4801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004802 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4803echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004805 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806else
4807 ac_save_cc="$CC"
4808 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809 cat >conftest.$ac_ext <<_ACEOF
4810/* confdefs.h. */
4811_ACEOF
4812cat confdefs.h >>conftest.$ac_ext
4813cat >>conftest.$ac_ext <<_ACEOF
4814/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004815
4816int
4817main ()
4818{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004819int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004820 ;
4821 return 0;
4822}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004824rm -f conftest.$ac_objext
4825if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826case "(($ac_try" in
4827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4828 *) ac_try_echo=$ac_try;;
4829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 grep -v '^ *+' conftest.er1 >conftest.err
4834 rm -f conftest.er1
4835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 (exit $ac_status); } && {
4838 test -z "$ac_c_werror_flag" ||
4839 test ! -s conftest.err
4840 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 ac_cv_olimit_ok=yes
4842else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004843 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844sed 's/^/| /' conftest.$ac_ext >&5
4845
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004846 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
4848
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004853 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4854echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 if test $ac_cv_olimit_ok = yes; then
4856 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4857 fi
4858fi
4859
4860# Check whether GCC supports PyArg_ParseTuple format
4861if test "$GCC" = "yes"
4862then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004863 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4864echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 save_CFLAGS=$CFLAGS
4866 CFLAGS="$CFLAGS -Werror"
4867 cat >conftest.$ac_ext <<_ACEOF
4868/* confdefs.h. */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h. */
4873
4874 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4875
4876int
4877main ()
4878{
4879
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884rm -f conftest.$ac_objext
4885if { (ac_try="$ac_compile"
4886case "(($ac_try" in
4887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4888 *) ac_try_echo=$ac_try;;
4889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891 (eval "$ac_compile") 2>conftest.er1
4892 ac_status=$?
4893 grep -v '^ *+' conftest.er1 >conftest.err
4894 rm -f conftest.er1
4895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 (exit $ac_status); } && {
4898 test -z "$ac_c_werror_flag" ||
4899 test ! -s conftest.err
4900 } && test -s conftest.$ac_objext; then
4901
4902cat >>confdefs.h <<\_ACEOF
4903#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4904_ACEOF
4905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004906 { echo "$as_me:$LINENO: result: yes" >&5
4907echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004909 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004912 { echo "$as_me:$LINENO: result: no" >&5
4913echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914
4915fi
4916
4917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918 CFLAGS=$save_CFLAGS
4919fi
4920
4921# On some compilers, pthreads are available without further options
4922# (e.g. MacOS X). On some of these systems, the compiler will not
4923# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4924# So we have to see first whether pthreads are available without
4925# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004926{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4927echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004929 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930else
4931 if test "$cross_compiling" = yes; then
4932 ac_cv_pthread_is_default=no
4933else
4934 cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940
4941#include <pthread.h>
4942
4943void* routine(void* p){return NULL;}
4944
4945int main(){
4946 pthread_t p;
4947 if(pthread_create(&p,NULL,routine,NULL)!=0)
4948 return 1;
4949 (void)pthread_detach(p);
4950 return 0;
4951}
4952
4953_ACEOF
4954rm -f conftest$ac_exeext
4955if { (ac_try="$ac_link"
4956case "(($ac_try" in
4957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4958 *) ac_try_echo=$ac_try;;
4959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 (eval "$ac_link") 2>&5
4962 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4965 { (case "(($ac_try" in
4966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4967 *) ac_try_echo=$ac_try;;
4968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 (eval "$ac_try") 2>&5
4971 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 (exit $ac_status); }; }; then
4974
4975 ac_cv_pthread_is_default=yes
4976 ac_cv_kthread=no
4977 ac_cv_pthread=no
4978
4979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004980 echo "$as_me: program exited with status $ac_status" >&5
4981echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982sed 's/^/| /' conftest.$ac_ext >&5
4983
4984( exit $ac_status )
4985ac_cv_pthread_is_default=no
4986fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4988fi
4989
4990
4991
4992fi
4993
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004994{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4995echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996
4997
4998if test $ac_cv_pthread_is_default = yes
4999then
5000 ac_cv_kpthread=no
5001else
5002# -Kpthread, if available, provides the right #defines
5003# and linker options to make pthread_create available
5004# Some compilers won't report that they do not support -Kpthread,
5005# so we need to run a program to see whether it really made the
5006# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005007{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5008echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005010 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
5012 ac_save_cc="$CC"
5013CC="$CC -Kpthread"
5014if test "$cross_compiling" = yes; then
5015 ac_cv_kpthread=no
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023
5024#include <pthread.h>
5025
5026void* routine(void* p){return NULL;}
5027
5028int main(){
5029 pthread_t p;
5030 if(pthread_create(&p,NULL,routine,NULL)!=0)
5031 return 1;
5032 (void)pthread_detach(p);
5033 return 0;
5034}
5035
5036_ACEOF
5037rm -f conftest$ac_exeext
5038if { (ac_try="$ac_link"
5039case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 (eval "$ac_link") 2>&5
5045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5048 { (case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 (eval "$ac_try") 2>&5
5054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056 (exit $ac_status); }; }; then
5057 ac_cv_kpthread=yes
5058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005059 echo "$as_me: program exited with status $ac_status" >&5
5060echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061sed 's/^/| /' conftest.$ac_ext >&5
5062
5063( exit $ac_status )
5064ac_cv_kpthread=no
5065fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5067fi
5068
5069
5070CC="$ac_save_cc"
5071fi
5072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005073{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5074echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075fi
5076
5077if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5078then
5079# -Kthread, if available, provides the right #defines
5080# and linker options to make pthread_create available
5081# Some compilers won't report that they do not support -Kthread,
5082# so we need to run a program to see whether it really made the
5083# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005084{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5085echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005087 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088else
5089 ac_save_cc="$CC"
5090CC="$CC -Kthread"
5091if test "$cross_compiling" = yes; then
5092 ac_cv_kthread=no
5093else
5094 cat >conftest.$ac_ext <<_ACEOF
5095/* confdefs.h. */
5096_ACEOF
5097cat confdefs.h >>conftest.$ac_ext
5098cat >>conftest.$ac_ext <<_ACEOF
5099/* end confdefs.h. */
5100
5101#include <pthread.h>
5102
5103void* routine(void* p){return NULL;}
5104
5105int main(){
5106 pthread_t p;
5107 if(pthread_create(&p,NULL,routine,NULL)!=0)
5108 return 1;
5109 (void)pthread_detach(p);
5110 return 0;
5111}
5112
5113_ACEOF
5114rm -f conftest$ac_exeext
5115if { (ac_try="$ac_link"
5116case "(($ac_try" in
5117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5118 *) ac_try_echo=$ac_try;;
5119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121 (eval "$ac_link") 2>&5
5122 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5125 { (case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 (eval "$ac_try") 2>&5
5131 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 (exit $ac_status); }; }; then
5134 ac_cv_kthread=yes
5135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005136 echo "$as_me: program exited with status $ac_status" >&5
5137echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138sed 's/^/| /' conftest.$ac_ext >&5
5139
5140( exit $ac_status )
5141ac_cv_kthread=no
5142fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5144fi
5145
5146
5147CC="$ac_save_cc"
5148fi
5149
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5151echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152fi
5153
5154if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5155then
5156# -pthread, if available, provides the right #defines
5157# and linker options to make pthread_create available
5158# Some compilers won't report that they do not support -pthread,
5159# so we need to run a program to see whether it really made the
5160# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005161{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5162echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005164 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165else
5166 ac_save_cc="$CC"
5167CC="$CC -pthread"
5168if test "$cross_compiling" = yes; then
5169 ac_cv_pthread=no
5170else
5171 cat >conftest.$ac_ext <<_ACEOF
5172/* confdefs.h. */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h. */
5177
5178#include <pthread.h>
5179
5180void* routine(void* p){return NULL;}
5181
5182int main(){
5183 pthread_t p;
5184 if(pthread_create(&p,NULL,routine,NULL)!=0)
5185 return 1;
5186 (void)pthread_detach(p);
5187 return 0;
5188}
5189
5190_ACEOF
5191rm -f conftest$ac_exeext
5192if { (ac_try="$ac_link"
5193case "(($ac_try" in
5194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5195 *) ac_try_echo=$ac_try;;
5196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198 (eval "$ac_link") 2>&5
5199 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5202 { (case "(($ac_try" in
5203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204 *) ac_try_echo=$ac_try;;
5205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 (eval "$ac_try") 2>&5
5208 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 (exit $ac_status); }; }; then
5211 ac_cv_pthread=yes
5212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005213 echo "$as_me: program exited with status $ac_status" >&5
5214echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215sed 's/^/| /' conftest.$ac_ext >&5
5216
5217( exit $ac_status )
5218ac_cv_pthread=no
5219fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5221fi
5222
5223
5224CC="$ac_save_cc"
5225fi
5226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005227{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5228echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229fi
5230
5231# If we have set a CC compiler flag for thread support then
5232# check if it works for CXX, too.
5233ac_cv_cxx_thread=no
5234if test ! -z "$CXX"
5235then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005236{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5237echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238ac_save_cxx="$CXX"
5239
5240if test "$ac_cv_kpthread" = "yes"
5241then
5242 CXX="$CXX -Kpthread"
5243 ac_cv_cxx_thread=yes
5244elif test "$ac_cv_kthread" = "yes"
5245then
5246 CXX="$CXX -Kthread"
5247 ac_cv_cxx_thread=yes
5248elif test "$ac_cv_pthread" = "yes"
5249then
5250 CXX="$CXX -pthread"
5251 ac_cv_cxx_thread=yes
5252fi
5253
5254if test $ac_cv_cxx_thread = yes
5255then
5256 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5257 $CXX -c conftest.$ac_ext 2>&5
5258 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5259 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5260 then
5261 ac_cv_cxx_thread=yes
5262 else
5263 ac_cv_cxx_thread=no
5264 fi
5265 rm -fr conftest*
5266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005267{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5268echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269fi
5270CXX="$ac_save_cxx"
5271
5272
5273# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005274{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5275echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005277 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278else
5279 cat >conftest.$ac_ext <<_ACEOF
5280/* confdefs.h. */
5281_ACEOF
5282cat confdefs.h >>conftest.$ac_ext
5283cat >>conftest.$ac_ext <<_ACEOF
5284/* end confdefs.h. */
5285#include <stdlib.h>
5286#include <stdarg.h>
5287#include <string.h>
5288#include <float.h>
5289
5290int
5291main ()
5292{
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (ac_try="$ac_compile"
5300case "(($ac_try" in
5301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5302 *) ac_try_echo=$ac_try;;
5303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 (eval "$ac_compile") 2>conftest.er1
5306 ac_status=$?
5307 grep -v '^ *+' conftest.er1 >conftest.err
5308 rm -f conftest.er1
5309 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311 (exit $ac_status); } && {
5312 test -z "$ac_c_werror_flag" ||
5313 test ! -s conftest.err
5314 } && test -s conftest.$ac_objext; then
5315 ac_cv_header_stdc=yes
5316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005317 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318sed 's/^/| /' conftest.$ac_ext >&5
5319
5320 ac_cv_header_stdc=no
5321fi
5322
5323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5324
5325if test $ac_cv_header_stdc = yes; then
5326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5327 cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
5333#include <string.h>
5334
5335_ACEOF
5336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5337 $EGREP "memchr" >/dev/null 2>&1; then
5338 :
5339else
5340 ac_cv_header_stdc=no
5341fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005342rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343
5344fi
5345
5346if test $ac_cv_header_stdc = yes; then
5347 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355
5356_ACEOF
5357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5358 $EGREP "free" >/dev/null 2>&1; then
5359 :
5360else
5361 ac_cv_header_stdc=no
5362fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005363rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5369 if test "$cross_compiling" = yes; then
5370 :
5371else
5372 cat >conftest.$ac_ext <<_ACEOF
5373/* confdefs.h. */
5374_ACEOF
5375cat confdefs.h >>conftest.$ac_ext
5376cat >>conftest.$ac_ext <<_ACEOF
5377/* end confdefs.h. */
5378#include <ctype.h>
5379#include <stdlib.h>
5380#if ((' ' & 0x0FF) == 0x020)
5381# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5382# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5383#else
5384# define ISLOWER(c) \
5385 (('a' <= (c) && (c) <= 'i') \
5386 || ('j' <= (c) && (c) <= 'r') \
5387 || ('s' <= (c) && (c) <= 'z'))
5388# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5389#endif
5390
5391#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5392int
5393main ()
5394{
5395 int i;
5396 for (i = 0; i < 256; i++)
5397 if (XOR (islower (i), ISLOWER (i))
5398 || toupper (i) != TOUPPER (i))
5399 return 2;
5400 return 0;
5401}
5402_ACEOF
5403rm -f conftest$ac_exeext
5404if { (ac_try="$ac_link"
5405case "(($ac_try" in
5406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5407 *) ac_try_echo=$ac_try;;
5408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410 (eval "$ac_link") 2>&5
5411 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5414 { (case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 (eval "$ac_try") 2>&5
5420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 (exit $ac_status); }; }; then
5423 :
5424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005425 echo "$as_me: program exited with status $ac_status" >&5
5426echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427sed 's/^/| /' conftest.$ac_ext >&5
5428
5429( exit $ac_status )
5430ac_cv_header_stdc=no
5431fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5433fi
5434
5435
5436fi
5437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005438{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5439echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440if test $ac_cv_header_stdc = yes; then
5441
5442cat >>confdefs.h <<\_ACEOF
5443#define STDC_HEADERS 1
5444_ACEOF
5445
5446fi
5447
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005448# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5459 inttypes.h stdint.h unistd.h
5460do
5461as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5462{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5463echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5464if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
5466else
5467 cat >conftest.$ac_ext <<_ACEOF
5468/* confdefs.h. */
5469_ACEOF
5470cat confdefs.h >>conftest.$ac_ext
5471cat >>conftest.$ac_ext <<_ACEOF
5472/* end confdefs.h. */
5473$ac_includes_default
5474
5475#include <$ac_header>
5476_ACEOF
5477rm -f conftest.$ac_objext
5478if { (ac_try="$ac_compile"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
5483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5484 (eval "$ac_compile") 2>conftest.er1
5485 ac_status=$?
5486 grep -v '^ *+' conftest.er1 >conftest.err
5487 rm -f conftest.er1
5488 cat conftest.err >&5
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); } && {
5491 test -z "$ac_c_werror_flag" ||
5492 test ! -s conftest.err
5493 } && test -s conftest.$ac_objext; then
5494 eval "$as_ac_Header=yes"
5495else
5496 echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499 eval "$as_ac_Header=no"
5500fi
5501
5502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5503fi
5504ac_res=`eval echo '${'$as_ac_Header'}'`
5505 { echo "$as_me:$LINENO: result: $ac_res" >&5
5506echo "${ECHO_T}$ac_res" >&6; }
5507if test `eval echo '${'$as_ac_Header'}'` = yes; then
5508 cat >>confdefs.h <<_ACEOF
5509#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5510_ACEOF
5511
5512fi
5513
5514done
5515
5516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Martin v. Löwis11437992002-04-12 09:54:03 +00005518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
Anthony Baxter8a560de2004-10-13 15:30:56 +00005553
Martin v. Löwisc3001752005-01-23 09:27:24 +00005554
Martin v. Löwis11017b12006-01-14 18:12:57 +00005555
Thomas Wouters477c8d52006-05-27 19:21:47 +00005556
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005557
5558
5559
5560
5561
5562
5563
5564
Thomas Wouters89f507f2006-12-13 04:49:30 +00005565
Christian Heimes043d6f62008-01-07 17:19:16 +00005566
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005567
5568
Christian Heimesbbe741d2008-03-28 10:53:29 +00005569
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005570
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005571for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5572fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005573ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005574shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005575unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005576sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5577sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005579sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005580sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005581sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005582bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005583do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005584as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005586 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005588if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005590fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005591ac_res=`eval echo '${'$as_ac_Header'}'`
5592 { echo "$as_me:$LINENO: result: $ac_res" >&5
5593echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594else
Martin v. Löwis11437992002-04-12 09:54:03 +00005595 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005596{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5597echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005599/* confdefs.h. */
5600_ACEOF
5601cat confdefs.h >>conftest.$ac_ext
5602cat >>conftest.$ac_ext <<_ACEOF
5603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005604$ac_includes_default
5605#include <$ac_header>
5606_ACEOF
5607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005627sed 's/^/| /' conftest.$ac_ext >&5
5628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005633{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5634echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005635
5636# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005637{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5638echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005639cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005645#include <$ac_header>
5646_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005647if { (ac_try="$ac_cpp conftest.$ac_ext"
5648case "(($ac_try" in
5649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5650 *) ac_try_echo=$ac_try;;
5651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005655 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 rm -f conftest.er1
5657 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005659 (exit $ac_status); } >/dev/null && {
5660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5661 test ! -s conftest.err
5662 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 ac_header_preproc=yes
5664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005666sed 's/^/| /' conftest.$ac_ext >&5
5667
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670
Martin v. Löwis11437992002-04-12 09:54:03 +00005671rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005672{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5673echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005674
5675# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005676case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5677 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005678 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5679echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5680 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5681echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005683 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005685 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5686echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5688echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5690echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5692echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5694echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5696echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005697 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005698## -------------------------------------- ##
5699## Report this to http://bugs.python.org/ ##
5700## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005701_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005703 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005705{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5706echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005707if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005708 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005709else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005712ac_res=`eval echo '${'$as_ac_Header'}'`
5713 { echo "$as_me:$LINENO: result: $ac_res" >&5
5714echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715
5716fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005719#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005720_ACEOF
5721
5722fi
5723
Guido van Rossum627b2d71993-12-24 10:39:16 +00005724done
5725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727
5728
5729
5730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005732for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5734{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5735echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005736if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738else
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005740/* confdefs.h. */
5741_ACEOF
5742cat confdefs.h >>conftest.$ac_ext
5743cat >>conftest.$ac_ext <<_ACEOF
5744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745#include <sys/types.h>
5746#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
Martin v. Löwis11437992002-04-12 09:54:03 +00005748int
5749main ()
5750{
5751if ((DIR *) 0)
5752return 0;
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005758if { (ac_try="$ac_compile"
5759case "(($ac_try" in
5760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5761 *) ac_try_echo=$ac_try;;
5762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005766 grep -v '^ *+' conftest.er1 >conftest.err
5767 rm -f conftest.er1
5768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005770 (exit $ac_status); } && {
5771 test -z "$ac_c_werror_flag" ||
5772 test ! -s conftest.err
5773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005774 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005777sed 's/^/| /' conftest.$ac_ext >&5
5778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781
5782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784ac_res=`eval echo '${'$as_ac_Header'}'`
5785 { echo "$as_me:$LINENO: result: $ac_res" >&5
5786echo "${ECHO_T}$ac_res" >&6; }
5787if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005789#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005790_ACEOF
5791
5792ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795done
5796# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5797if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005798 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5799echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005800if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802else
Martin v. Löwis11437992002-04-12 09:54:03 +00005803 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005811/* Override any GCC internal prototype to avoid an error.
5812 Use char because int might match the return type of a GCC
5813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005814#ifdef __cplusplus
5815extern "C"
5816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005817char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005818int
5819main ()
5820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005821return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005822 ;
5823 return 0;
5824}
5825_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005826for ac_lib in '' dir; do
5827 if test -z "$ac_lib"; then
5828 ac_res="none required"
5829 else
5830 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832 fi
5833 rm -f conftest.$ac_objext conftest$ac_exeext
5834if { (ac_try="$ac_link"
5835case "(($ac_try" in
5836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837 *) ac_try_echo=$ac_try;;
5838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005841 ac_status=$?
5842 grep -v '^ *+' conftest.er1 >conftest.err
5843 rm -f conftest.er1
5844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 (exit $ac_status); } && {
5847 test -z "$ac_c_werror_flag" ||
5848 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849 } && test -s conftest$ac_exeext &&
5850 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005854sed 's/^/| /' conftest.$ac_ext >&5
5855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856
Thomas Wouters477c8d52006-05-27 19:21:47 +00005857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858
5859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5860 conftest$ac_exeext
5861 if test "${ac_cv_search_opendir+set}" = set; then
5862 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005864done
5865if test "${ac_cv_search_opendir+set}" = set; then
5866 :
5867else
5868 ac_cv_search_opendir=no
5869fi
5870rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005871LIBS=$ac_func_search_save_LIBS
5872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005873{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5874echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875ac_res=$ac_cv_search_opendir
5876if test "$ac_res" != no; then
5877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005880
Michael W. Hudson54241132001-12-07 15:38:26 +00005881else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005882 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5883echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005884if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005885 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005886else
5887 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005889/* confdefs.h. */
5890_ACEOF
5891cat confdefs.h >>conftest.$ac_ext
5892cat >>conftest.$ac_ext <<_ACEOF
5893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895/* Override any GCC internal prototype to avoid an error.
5896 Use char because int might match the return type of a GCC
5897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005898#ifdef __cplusplus
5899extern "C"
5900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005901char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005905return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 ;
5907 return 0;
5908}
5909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005910for ac_lib in '' x; do
5911 if test -z "$ac_lib"; then
5912 ac_res="none required"
5913 else
5914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918if { (ac_try="$ac_link"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005924 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005925 ac_status=$?
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005933 } && test -s conftest$ac_exeext &&
5934 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
Thomas Wouters477c8d52006-05-27 19:21:47 +00005941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942
5943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5944 conftest$ac_exeext
5945 if test "${ac_cv_search_opendir+set}" = set; then
5946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948done
5949if test "${ac_cv_search_opendir+set}" = set; then
5950 :
5951else
5952 ac_cv_search_opendir=no
5953fi
5954rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005955LIBS=$ac_func_search_save_LIBS
5956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005957{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5958echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959ac_res=$ac_cv_search_opendir
5960if test "$ac_res" != no; then
5961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963fi
5964
5965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005967{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5968echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971else
5972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979int
5980main ()
5981{
5982return makedev(0, 0);
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005988if { (ac_try="$ac_link"
5989case "(($ac_try" in
5990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5991 *) ac_try_echo=$ac_try;;
5992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005996 grep -v '^ *+' conftest.er1 >conftest.err
5997 rm -f conftest.er1
5998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 (exit $ac_status); } && {
6001 test -z "$ac_c_werror_flag" ||
6002 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006003 } && test -s conftest$ac_exeext &&
6004 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005 ac_cv_header_sys_types_h_makedev=yes
6006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006008sed 's/^/| /' conftest.$ac_ext >&5
6009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006012
6013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015
6016fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6018echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019
6020if test $ac_cv_header_sys_types_h_makedev = no; then
6021if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006022 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6023echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006027{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6028echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029else
6030 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006031{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6032echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039$ac_includes_default
6040#include <sys/mkdev.h>
6041_ACEOF
6042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043if { (ac_try="$ac_compile"
6044case "(($ac_try" in
6045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6046 *) ac_try_echo=$ac_try;;
6047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055 (exit $ac_status); } && {
6056 test -z "$ac_c_werror_flag" ||
6057 test ! -s conftest.err
6058 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059 ac_header_compiler=yes
6060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006062sed 's/^/| /' conftest.$ac_ext >&5
6063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066
6067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6069echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070
6071# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6073echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080#include <sys/mkdev.h>
6081_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082if { (ac_try="$ac_cpp conftest.$ac_ext"
6083case "(($ac_try" in
6084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6085 *) ac_try_echo=$ac_try;;
6086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006090 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 rm -f conftest.er1
6092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 (exit $ac_status); } >/dev/null && {
6095 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6096 test ! -s conftest.err
6097 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 ac_header_preproc=yes
6099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006101sed 's/^/| /' conftest.$ac_ext >&5
6102
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_header_preproc=no
6104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006107{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6108echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109
6110# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006111case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6112 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6116echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006118 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006133## -------------------------------------- ##
6134## Report this to http://bugs.python.org/ ##
6135## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006136_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006138 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006140{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6141echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144else
6145 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006147{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6148echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006151if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152
6153cat >>confdefs.h <<\_ACEOF
6154#define MAJOR_IN_MKDEV 1
6155_ACEOF
6156
6157fi
6158
6159
6160
6161 if test $ac_cv_header_sys_mkdev_h = no; then
6162 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006163 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6164echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170else
6171 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6173echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180$ac_includes_default
6181#include <sys/sysmacros.h>
6182_ACEOF
6183rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184if { (ac_try="$ac_compile"
6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 grep -v '^ *+' conftest.er1 >conftest.err
6193 rm -f conftest.er1
6194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 (exit $ac_status); } && {
6197 test -z "$ac_c_werror_flag" ||
6198 test ! -s conftest.err
6199 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200 ac_header_compiler=yes
6201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006203sed 's/^/| /' conftest.$ac_ext >&5
6204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207
6208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6210echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006213{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6214echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221#include <sys/sysmacros.h>
6222_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223if { (ac_try="$ac_cpp conftest.$ac_ext"
6224case "(($ac_try" in
6225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6226 *) ac_try_echo=$ac_try;;
6227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006231 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 rm -f conftest.er1
6233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235 (exit $ac_status); } >/dev/null && {
6236 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6237 test ! -s conftest.err
6238 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239 ac_header_preproc=yes
6240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006242sed 's/^/| /' conftest.$ac_ext >&5
6243
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_header_preproc=no
6245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006248{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6249echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250
6251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6253 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006254 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6255echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6257echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006274## -------------------------------------- ##
6275## Report this to http://bugs.python.org/ ##
6276## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006277_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006279 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006281{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6282echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285else
6286 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006288{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6289echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290
6291fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006292if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293
6294cat >>confdefs.h <<\_ACEOF
6295#define MAJOR_IN_SYSMACROS 1
6296_ACEOF
6297
6298fi
6299
6300
6301 fi
6302fi
6303
Michael W. Hudson54241132001-12-07 15:38:26 +00006304
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006305# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006306
6307for ac_header in term.h
6308do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6310{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006313 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006314else
6315 cat >conftest.$ac_ext <<_ACEOF
6316/* confdefs.h. */
6317_ACEOF
6318cat confdefs.h >>conftest.$ac_ext
6319cat >>conftest.$ac_ext <<_ACEOF
6320/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006322#ifdef HAVE_CURSES_H
6323#include <curses.h>
6324#endif
6325
6326
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006327#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328_ACEOF
6329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006330if { (ac_try="$ac_compile"
6331case "(($ac_try" in
6332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6333 *) ac_try_echo=$ac_try;;
6334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337 ac_status=$?
6338 grep -v '^ *+' conftest.er1 >conftest.err
6339 rm -f conftest.er1
6340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 (exit $ac_status); } && {
6343 test -z "$ac_c_werror_flag" ||
6344 test ! -s conftest.err
6345 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006346 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006348 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353
6354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006356ac_res=`eval echo '${'$as_ac_Header'}'`
6357 { echo "$as_me:$LINENO: result: $ac_res" >&5
6358echo "${ECHO_T}$ac_res" >&6; }
6359if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006361#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364fi
6365
6366done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
6368
Martin v. Löwis11017b12006-01-14 18:12:57 +00006369# On Linux, netlink.h requires asm/types.h
6370
6371for ac_header in linux/netlink.h
6372do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006373as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6374{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378else
6379 cat >conftest.$ac_ext <<_ACEOF
6380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
6385
6386#ifdef HAVE_ASM_TYPES_H
6387#include <asm/types.h>
6388#endif
6389#ifdef HAVE_SYS_SOCKET_H
6390#include <sys/socket.h>
6391#endif
6392
6393
6394#include <$ac_header>
6395_ACEOF
6396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397if { (ac_try="$ac_compile"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413 eval "$as_ac_Header=yes"
6414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006415 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006416sed 's/^/| /' conftest.$ac_ext >&5
6417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006423ac_res=`eval echo '${'$as_ac_Header'}'`
6424 { echo "$as_me:$LINENO: result: $ac_res" >&5
6425echo "${ECHO_T}$ac_res" >&6; }
6426if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429_ACEOF
6430
6431fi
6432
6433done
6434
6435
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006438{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6439echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006441/* confdefs.h. */
6442_ACEOF
6443cat confdefs.h >>conftest.$ac_ext
6444cat >>conftest.$ac_ext <<_ACEOF
6445/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006447
6448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006450 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006451 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452else
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454
6455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006459
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6464echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465
Neal Norwitz11690112002-07-30 01:08:28 +00006466# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006467{ echo "$as_me:$LINENO: checking for makedev" >&5
6468echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006475#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006476int
6477main ()
6478{
6479 makedev(0, 0)
6480 ;
6481 return 0;
6482}
6483_ACEOF
6484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485if { (ac_try="$ac_link"
6486case "(($ac_try" in
6487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6488 *) ac_try_echo=$ac_try;;
6489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006491 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006493 grep -v '^ *+' conftest.er1 >conftest.err
6494 rm -f conftest.er1
6495 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497 (exit $ac_status); } && {
6498 test -z "$ac_c_werror_flag" ||
6499 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006500 } && test -s conftest$ac_exeext &&
6501 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006502 ac_cv_has_makedev=yes
6503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006505sed 's/^/| /' conftest.$ac_ext >&5
6506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509
6510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006511 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006512if test "$ac_cv_has_makedev" = "no"; then
6513 # we didn't link, try if _OSF_SOURCE will allow us to link
6514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006520
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006521#define _OSF_SOURCE 1
6522#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006523
Neal Norwitz11690112002-07-30 01:08:28 +00006524int
6525main ()
6526{
6527 makedev(0, 0)
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006533if { (ac_try="$ac_link"
6534case "(($ac_try" in
6535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6536 *) ac_try_echo=$ac_try;;
6537esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006541 grep -v '^ *+' conftest.er1 >conftest.err
6542 rm -f conftest.er1
6543 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006545 (exit $ac_status); } && {
6546 test -z "$ac_c_werror_flag" ||
6547 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006548 } && test -s conftest$ac_exeext &&
6549 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006550 ac_cv_has_makedev=yes
6551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006553sed 's/^/| /' conftest.$ac_ext >&5
6554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557
6558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006559 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006560 if test "$ac_cv_has_makedev" = "yes"; then
6561
6562cat >>confdefs.h <<\_ACEOF
6563#define _OSF_SOURCE 1
6564_ACEOF
6565
6566 fi
6567fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006568{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6569echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006570if test "$ac_cv_has_makedev" = "yes"; then
6571
6572cat >>confdefs.h <<\_ACEOF
6573#define HAVE_MAKEDEV 1
6574_ACEOF
6575
6576fi
6577
Martin v. Löwis399a6892002-10-04 10:22:02 +00006578# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6579# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6580# defined, but the compiler does not support pragma redefine_extname,
6581# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6582# structures (such as rlimit64) without declaring them. As a
6583# work-around, disable LFS on such configurations
6584
6585use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006586{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6587echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594
6595#define _LARGEFILE_SOURCE 1
6596#define _FILE_OFFSET_BITS 64
6597#include <sys/resource.h>
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599int
6600main ()
6601{
6602struct rlimit foo;
6603 ;
6604 return 0;
6605}
6606_ACEOF
6607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608if { (ac_try="$ac_compile"
6609case "(($ac_try" in
6610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6611 *) ac_try_echo=$ac_try;;
6612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006616 grep -v '^ *+' conftest.er1 >conftest.err
6617 rm -f conftest.er1
6618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620 (exit $ac_status); } && {
6621 test -z "$ac_c_werror_flag" ||
6622 test ! -s conftest.err
6623 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624 sol_lfs_bug=no
6625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006633{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6634echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635if test "$sol_lfs_bug" = "yes"; then
6636 use_lfs=no
6637fi
6638
6639if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006640# Two defines needed to enable largefile support on various platforms
6641# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643cat >>confdefs.h <<\_ACEOF
6644#define _LARGEFILE_SOURCE 1
6645_ACEOF
6646
6647
6648cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006649#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006653
Guido van Rossum84e7b241996-08-19 21:59:00 +00006654# Add some code to confdefs.h so that the test for off_t works on SCO
6655cat >> confdefs.h <<\EOF
6656#if defined(SCO_DS)
6657#undef _OFF_T
6658#endif
6659EOF
6660
Guido van Rossumef2255b2000-03-10 22:30:29 +00006661# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006662{ echo "$as_me:$LINENO: checking for mode_t" >&5
6663echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006664if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006666else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006667 cat >conftest.$ac_ext <<_ACEOF
6668/* confdefs.h. */
6669_ACEOF
6670cat confdefs.h >>conftest.$ac_ext
6671cat >>conftest.$ac_ext <<_ACEOF
6672/* end confdefs.h. */
6673$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006675int
6676main ()
6677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006678if ((ac__type_new_ *) 0)
6679 return 0;
6680if (sizeof (ac__type_new_))
6681 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
6687if { (ac_try="$ac_compile"
6688case "(($ac_try" in
6689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6690 *) ac_try_echo=$ac_try;;
6691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006693 (eval "$ac_compile") 2>conftest.er1
6694 ac_status=$?
6695 grep -v '^ *+' conftest.er1 >conftest.err
6696 rm -f conftest.er1
6697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006699 (exit $ac_status); } && {
6700 test -z "$ac_c_werror_flag" ||
6701 test ! -s conftest.err
6702 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006704else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006706sed 's/^/| /' conftest.$ac_ext >&5
6707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006708 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710
6711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006713{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6714echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6715if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717else
Martin v. Löwis11437992002-04-12 09:54:03 +00006718
6719cat >>confdefs.h <<_ACEOF
6720#define mode_t int
6721_ACEOF
6722
6723fi
6724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006725{ echo "$as_me:$LINENO: checking for off_t" >&5
6726echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006727if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006730 cat >conftest.$ac_ext <<_ACEOF
6731/* confdefs.h. */
6732_ACEOF
6733cat confdefs.h >>conftest.$ac_ext
6734cat >>conftest.$ac_ext <<_ACEOF
6735/* end confdefs.h. */
6736$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006737typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006738int
6739main ()
6740{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006741if ((ac__type_new_ *) 0)
6742 return 0;
6743if (sizeof (ac__type_new_))
6744 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006745 ;
6746 return 0;
6747}
6748_ACEOF
6749rm -f conftest.$ac_objext
6750if { (ac_try="$ac_compile"
6751case "(($ac_try" in
6752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6753 *) ac_try_echo=$ac_try;;
6754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006756 (eval "$ac_compile") 2>conftest.er1
6757 ac_status=$?
6758 grep -v '^ *+' conftest.er1 >conftest.err
6759 rm -f conftest.er1
6760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006762 (exit $ac_status); } && {
6763 test -z "$ac_c_werror_flag" ||
6764 test ! -s conftest.err
6765 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006766 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006769sed 's/^/| /' conftest.$ac_ext >&5
6770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006771 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6777echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6778if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006780else
Martin v. Löwis11437992002-04-12 09:54:03 +00006781
6782cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
6785
6786fi
6787
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006788{ echo "$as_me:$LINENO: checking for pid_t" >&5
6789echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006790if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006793 cat >conftest.$ac_ext <<_ACEOF
6794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
6799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801int
6802main ()
6803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006804if ((ac__type_new_ *) 0)
6805 return 0;
6806if (sizeof (ac__type_new_))
6807 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006808 ;
6809 return 0;
6810}
6811_ACEOF
6812rm -f conftest.$ac_objext
6813if { (ac_try="$ac_compile"
6814case "(($ac_try" in
6815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6816 *) ac_try_echo=$ac_try;;
6817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006819 (eval "$ac_compile") 2>conftest.er1
6820 ac_status=$?
6821 grep -v '^ *+' conftest.er1 >conftest.err
6822 rm -f conftest.er1
6823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006825 (exit $ac_status); } && {
6826 test -z "$ac_c_werror_flag" ||
6827 test ! -s conftest.err
6828 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006832sed 's/^/| /' conftest.$ac_ext >&5
6833
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006834 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836
6837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006838fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6840echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6841if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844
6845cat >>confdefs.h <<_ACEOF
6846#define pid_t int
6847_ACEOF
6848
6849fi
6850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006851{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6852echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006853if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006854 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
6856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006857/* confdefs.h. */
6858_ACEOF
6859cat confdefs.h >>conftest.$ac_ext
6860cat >>conftest.$ac_ext <<_ACEOF
6861/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006862#include <sys/types.h>
6863#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865int
6866main ()
6867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874if { (ac_try="$ac_compile"
6875case "(($ac_try" in
6876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6877 *) ac_try_echo=$ac_try;;
6878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006882 grep -v '^ *+' conftest.er1 >conftest.err
6883 rm -f conftest.er1
6884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 (exit $ac_status); } && {
6887 test -z "$ac_c_werror_flag" ||
6888 test ! -s conftest.err
6889 } && test -s conftest.$ac_objext; then
6890 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006893sed 's/^/| /' conftest.$ac_ext >&5
6894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6901echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006904#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: checking for size_t" >&5
6909echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006910if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006913 cat >conftest.$ac_ext <<_ACEOF
6914/* confdefs.h. */
6915_ACEOF
6916cat confdefs.h >>conftest.$ac_ext
6917cat >>conftest.$ac_ext <<_ACEOF
6918/* end confdefs.h. */
6919$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006921int
6922main ()
6923{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006924if ((ac__type_new_ *) 0)
6925 return 0;
6926if (sizeof (ac__type_new_))
6927 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006928 ;
6929 return 0;
6930}
6931_ACEOF
6932rm -f conftest.$ac_objext
6933if { (ac_try="$ac_compile"
6934case "(($ac_try" in
6935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6936 *) ac_try_echo=$ac_try;;
6937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006939 (eval "$ac_compile") 2>conftest.er1
6940 ac_status=$?
6941 grep -v '^ *+' conftest.er1 >conftest.err
6942 rm -f conftest.er1
6943 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006945 (exit $ac_status); } && {
6946 test -z "$ac_c_werror_flag" ||
6947 test ! -s conftest.err
6948 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006949 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006952sed 's/^/| /' conftest.$ac_ext >&5
6953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956
6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006959{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6960echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6961if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006963else
Martin v. Löwis11437992002-04-12 09:54:03 +00006964
6965cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006967_ACEOF
6968
6969fi
6970
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006971{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6972echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006973if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006975else
6976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006977/* confdefs.h. */
6978_ACEOF
6979cat confdefs.h >>conftest.$ac_ext
6980cat >>conftest.$ac_ext <<_ACEOF
6981/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006983
6984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006986 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987 ac_cv_type_uid_t=yes
6988else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989 ac_cv_type_uid_t=no
6990fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006991rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006994{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6995echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006996if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998cat >>confdefs.h <<\_ACEOF
6999#define uid_t int
7000_ACEOF
7001
7002
7003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006
7007fi
7008
Mark Dickinsonbd792642009-03-18 20:06:12 +00007009
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007010 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7011echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007012if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007014else
7015 ac_cv_c_uint32_t=no
7016 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7017 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7018 cat >conftest.$ac_ext <<_ACEOF
7019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
7024$ac_includes_default
7025int
7026main ()
7027{
7028static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7029test_array [0] = 0
7030
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035rm -f conftest.$ac_objext
7036if { (ac_try="$ac_compile"
7037case "(($ac_try" in
7038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7039 *) ac_try_echo=$ac_try;;
7040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007042 (eval "$ac_compile") 2>conftest.er1
7043 ac_status=$?
7044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007048 (exit $ac_status); } && {
7049 test -z "$ac_c_werror_flag" ||
7050 test ! -s conftest.err
7051 } && test -s conftest.$ac_objext; then
7052 case $ac_type in
7053 uint32_t) ac_cv_c_uint32_t=yes ;;
7054 *) ac_cv_c_uint32_t=$ac_type ;;
7055esac
7056
7057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007058 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059sed 's/^/| /' conftest.$ac_ext >&5
7060
7061
7062fi
7063
7064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7065 test "$ac_cv_c_uint32_t" != no && break
7066 done
7067fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7069echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070 case $ac_cv_c_uint32_t in #(
7071 no|yes) ;; #(
7072 *)
7073
7074cat >>confdefs.h <<\_ACEOF
7075#define _UINT32_T 1
7076_ACEOF
7077
7078
7079cat >>confdefs.h <<_ACEOF
7080#define uint32_t $ac_cv_c_uint32_t
7081_ACEOF
7082;;
7083 esac
7084
7085
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007086 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7087echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007089 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090else
7091 ac_cv_c_uint64_t=no
7092 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7093 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7094 cat >conftest.$ac_ext <<_ACEOF
7095/* confdefs.h. */
7096_ACEOF
7097cat confdefs.h >>conftest.$ac_ext
7098cat >>conftest.$ac_ext <<_ACEOF
7099/* end confdefs.h. */
7100$ac_includes_default
7101int
7102main ()
7103{
7104static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7105test_array [0] = 0
7106
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007118 (eval "$ac_compile") 2>conftest.er1
7119 ac_status=$?
7120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
7128 case $ac_type in
7129 uint64_t) ac_cv_c_uint64_t=yes ;;
7130 *) ac_cv_c_uint64_t=$ac_type ;;
7131esac
7132
7133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007134 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135sed 's/^/| /' conftest.$ac_ext >&5
7136
7137
7138fi
7139
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 test "$ac_cv_c_uint64_t" != no && break
7142 done
7143fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7145echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146 case $ac_cv_c_uint64_t in #(
7147 no|yes) ;; #(
7148 *)
7149
7150cat >>confdefs.h <<\_ACEOF
7151#define _UINT64_T 1
7152_ACEOF
7153
7154
7155cat >>confdefs.h <<_ACEOF
7156#define uint64_t $ac_cv_c_uint64_t
7157_ACEOF
7158;;
7159 esac
7160
7161
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007162 { echo "$as_me:$LINENO: checking for int32_t" >&5
7163echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007165 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166else
7167 ac_cv_c_int32_t=no
7168 for ac_type in 'int32_t' 'int' 'long int' \
7169 'long long int' 'short int' 'signed char'; do
7170 cat >conftest.$ac_ext <<_ACEOF
7171/* confdefs.h. */
7172_ACEOF
7173cat confdefs.h >>conftest.$ac_ext
7174cat >>conftest.$ac_ext <<_ACEOF
7175/* end confdefs.h. */
7176$ac_includes_default
7177int
7178main ()
7179{
7180static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
7188if { (ac_try="$ac_compile"
7189case "(($ac_try" in
7190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7191 *) ac_try_echo=$ac_try;;
7192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007194 (eval "$ac_compile") 2>conftest.er1
7195 ac_status=$?
7196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200 (exit $ac_status); } && {
7201 test -z "$ac_c_werror_flag" ||
7202 test ! -s conftest.err
7203 } && test -s conftest.$ac_objext; then
7204 cat >conftest.$ac_ext <<_ACEOF
7205/* confdefs.h. */
7206_ACEOF
7207cat confdefs.h >>conftest.$ac_ext
7208cat >>conftest.$ac_ext <<_ACEOF
7209/* end confdefs.h. */
7210$ac_includes_default
7211int
7212main ()
7213{
7214static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007215 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007216test_array [0] = 0
7217
7218 ;
7219 return 0;
7220}
7221_ACEOF
7222rm -f conftest.$ac_objext
7223if { (ac_try="$ac_compile"
7224case "(($ac_try" in
7225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7226 *) ac_try_echo=$ac_try;;
7227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007229 (eval "$ac_compile") 2>conftest.er1
7230 ac_status=$?
7231 grep -v '^ *+' conftest.er1 >conftest.err
7232 rm -f conftest.er1
7233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235 (exit $ac_status); } && {
7236 test -z "$ac_c_werror_flag" ||
7237 test ! -s conftest.err
7238 } && test -s conftest.$ac_objext; then
7239 :
7240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007241 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242sed 's/^/| /' conftest.$ac_ext >&5
7243
7244 case $ac_type in
7245 int32_t) ac_cv_c_int32_t=yes ;;
7246 *) ac_cv_c_int32_t=$ac_type ;;
7247esac
7248
7249fi
7250
7251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007253 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
7256
7257fi
7258
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260 test "$ac_cv_c_int32_t" != no && break
7261 done
7262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007263{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7264echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265 case $ac_cv_c_int32_t in #(
7266 no|yes) ;; #(
7267 *)
7268
7269cat >>confdefs.h <<_ACEOF
7270#define int32_t $ac_cv_c_int32_t
7271_ACEOF
7272;;
7273 esac
7274
7275
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007276 { echo "$as_me:$LINENO: checking for int64_t" >&5
7277echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007279 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007280else
7281 ac_cv_c_int64_t=no
7282 for ac_type in 'int64_t' 'int' 'long int' \
7283 'long long int' 'short int' 'signed char'; do
7284 cat >conftest.$ac_ext <<_ACEOF
7285/* confdefs.h. */
7286_ACEOF
7287cat confdefs.h >>conftest.$ac_ext
7288cat >>conftest.$ac_ext <<_ACEOF
7289/* end confdefs.h. */
7290$ac_includes_default
7291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (ac_try="$ac_compile"
7303case "(($ac_try" in
7304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7305 *) ac_try_echo=$ac_try;;
7306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007308 (eval "$ac_compile") 2>conftest.er1
7309 ac_status=$?
7310 grep -v '^ *+' conftest.er1 >conftest.err
7311 rm -f conftest.er1
7312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007314 (exit $ac_status); } && {
7315 test -z "$ac_c_werror_flag" ||
7316 test ! -s conftest.err
7317 } && test -s conftest.$ac_objext; then
7318 cat >conftest.$ac_ext <<_ACEOF
7319/* confdefs.h. */
7320_ACEOF
7321cat confdefs.h >>conftest.$ac_ext
7322cat >>conftest.$ac_ext <<_ACEOF
7323/* end confdefs.h. */
7324$ac_includes_default
7325int
7326main ()
7327{
7328static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007329 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330test_array [0] = 0
7331
7332 ;
7333 return 0;
7334}
7335_ACEOF
7336rm -f conftest.$ac_objext
7337if { (ac_try="$ac_compile"
7338case "(($ac_try" in
7339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7340 *) ac_try_echo=$ac_try;;
7341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007343 (eval "$ac_compile") 2>conftest.er1
7344 ac_status=$?
7345 grep -v '^ *+' conftest.er1 >conftest.err
7346 rm -f conftest.er1
7347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349 (exit $ac_status); } && {
7350 test -z "$ac_c_werror_flag" ||
7351 test ! -s conftest.err
7352 } && test -s conftest.$ac_objext; then
7353 :
7354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007355 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356sed 's/^/| /' conftest.$ac_ext >&5
7357
7358 case $ac_type in
7359 int64_t) ac_cv_c_int64_t=yes ;;
7360 *) ac_cv_c_int64_t=$ac_type ;;
7361esac
7362
7363fi
7364
7365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007367 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007368sed 's/^/| /' conftest.$ac_ext >&5
7369
7370
7371fi
7372
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374 test "$ac_cv_c_int64_t" != no && break
7375 done
7376fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007377{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7378echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379 case $ac_cv_c_int64_t in #(
7380 no|yes) ;; #(
7381 *)
7382
7383cat >>confdefs.h <<_ACEOF
7384#define int64_t $ac_cv_c_int64_t
7385_ACEOF
7386;;
7387 esac
7388
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007389{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7390echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007391if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007393else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007394 cat >conftest.$ac_ext <<_ACEOF
7395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
7400$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007401typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007402int
7403main ()
7404{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007405if ((ac__type_new_ *) 0)
7406 return 0;
7407if (sizeof (ac__type_new_))
7408 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (ac_try="$ac_compile"
7415case "(($ac_try" in
7416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7417 *) ac_try_echo=$ac_try;;
7418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007420 (eval "$ac_compile") 2>conftest.er1
7421 ac_status=$?
7422 grep -v '^ *+' conftest.er1 >conftest.err
7423 rm -f conftest.er1
7424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007426 (exit $ac_status); } && {
7427 test -z "$ac_c_werror_flag" ||
7428 test ! -s conftest.err
7429 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007430 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007435 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007440{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7441echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7442if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007443
7444cat >>confdefs.h <<\_ACEOF
7445#define HAVE_SSIZE_T 1
7446_ACEOF
7447
7448fi
7449
Jack Jansendd19cf82001-12-06 22:36:17 +00007450
Michael W. Hudson54241132001-12-07 15:38:26 +00007451# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007452# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007453{ echo "$as_me:$LINENO: checking for int" >&5
7454echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7455if test "${ac_cv_type_int+set}" = set; then
7456 echo $ECHO_N "(cached) $ECHO_C" >&6
7457else
7458 cat >conftest.$ac_ext <<_ACEOF
7459/* confdefs.h. */
7460_ACEOF
7461cat confdefs.h >>conftest.$ac_ext
7462cat >>conftest.$ac_ext <<_ACEOF
7463/* end confdefs.h. */
7464$ac_includes_default
7465typedef int ac__type_new_;
7466int
7467main ()
7468{
7469if ((ac__type_new_ *) 0)
7470 return 0;
7471if (sizeof (ac__type_new_))
7472 return 0;
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477rm -f conftest.$ac_objext
7478if { (ac_try="$ac_compile"
7479case "(($ac_try" in
7480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7481 *) ac_try_echo=$ac_try;;
7482esac
7483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7484 (eval "$ac_compile") 2>conftest.er1
7485 ac_status=$?
7486 grep -v '^ *+' conftest.er1 >conftest.err
7487 rm -f conftest.er1
7488 cat conftest.err >&5
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); } && {
7491 test -z "$ac_c_werror_flag" ||
7492 test ! -s conftest.err
7493 } && test -s conftest.$ac_objext; then
7494 ac_cv_type_int=yes
7495else
7496 echo "$as_me: failed program was:" >&5
7497sed 's/^/| /' conftest.$ac_ext >&5
7498
7499 ac_cv_type_int=no
7500fi
7501
7502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7503fi
7504{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7505echo "${ECHO_T}$ac_cv_type_int" >&6; }
7506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507# The cast to long int works around a bug in the HP C Compiler
7508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7510# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007511{ echo "$as_me:$LINENO: checking size of int" >&5
7512echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007513if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007515else
Martin v. Löwis11437992002-04-12 09:54:03 +00007516 if test "$cross_compiling" = yes; then
7517 # Depending upon the size, compute the lo and hi bounds.
7518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007519/* confdefs.h. */
7520_ACEOF
7521cat confdefs.h >>conftest.$ac_ext
7522cat >>conftest.$ac_ext <<_ACEOF
7523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007524$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007525 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007526int
7527main ()
7528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007530test_array [0] = 0
7531
7532 ;
7533 return 0;
7534}
7535_ACEOF
7536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537if { (ac_try="$ac_compile"
7538case "(($ac_try" in
7539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7540 *) ac_try_echo=$ac_try;;
7541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549 (exit $ac_status); } && {
7550 test -z "$ac_c_werror_flag" ||
7551 test ! -s conftest.err
7552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_lo=0 ac_mid=0
7554 while :; do
7555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007561$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007562 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007563int
7564main ()
7565{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007567test_array [0] = 0
7568
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574if { (ac_try="$ac_compile"
7575case "(($ac_try" in
7576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7577 *) ac_try_echo=$ac_try;;
7578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007582 grep -v '^ *+' conftest.er1 >conftest.err
7583 rm -f conftest.er1
7584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586 (exit $ac_status); } && {
7587 test -z "$ac_c_werror_flag" ||
7588 test ! -s conftest.err
7589 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_hi=$ac_mid; break
7591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 ac_lo=`expr $ac_mid + 1`
7596 if test $ac_lo -le $ac_mid; then
7597 ac_lo= ac_hi=
7598 break
7599 fi
7600 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602
7603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 done
7605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007607sed 's/^/| /' conftest.$ac_ext >&5
7608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007610/* confdefs.h. */
7611_ACEOF
7612cat confdefs.h >>conftest.$ac_ext
7613cat >>conftest.$ac_ext <<_ACEOF
7614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007616 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007617int
7618main ()
7619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007621test_array [0] = 0
7622
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628if { (ac_try="$ac_compile"
7629case "(($ac_try" in
7630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631 *) ac_try_echo=$ac_try;;
7632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007636 grep -v '^ *+' conftest.er1 >conftest.err
7637 rm -f conftest.er1
7638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640 (exit $ac_status); } && {
7641 test -z "$ac_c_werror_flag" ||
7642 test ! -s conftest.err
7643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_hi=-1 ac_mid=-1
7645 while :; do
7646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007653 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007658test_array [0] = 0
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665if { (ac_try="$ac_compile"
7666case "(($ac_try" in
7667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7668 *) ac_try_echo=$ac_try;;
7669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007673 grep -v '^ *+' conftest.er1 >conftest.err
7674 rm -f conftest.er1
7675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677 (exit $ac_status); } && {
7678 test -z "$ac_c_werror_flag" ||
7679 test ! -s conftest.err
7680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_lo=$ac_mid; break
7682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007684sed 's/^/| /' conftest.$ac_ext >&5
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 ac_hi=`expr '(' $ac_mid ')' - 1`
7687 if test $ac_mid -le $ac_hi; then
7688 ac_lo= ac_hi=
7689 break
7690 fi
7691 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693
7694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 done
7696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007698sed 's/^/| /' conftest.$ac_ext >&5
7699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705
7706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007707# Binary search between lo and hi bounds.
7708while test "x$ac_lo" != "x$ac_hi"; do
7709 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007711/* confdefs.h. */
7712_ACEOF
7713cat confdefs.h >>conftest.$ac_ext
7714cat >>conftest.$ac_ext <<_ACEOF
7715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007716$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007717 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007718int
7719main ()
7720{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007722test_array [0] = 0
7723
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729if { (ac_try="$ac_compile"
7730case "(($ac_try" in
7731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7732 *) ac_try_echo=$ac_try;;
7733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007737 grep -v '^ *+' conftest.er1 >conftest.err
7738 rm -f conftest.er1
7739 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741 (exit $ac_status); } && {
7742 test -z "$ac_c_werror_flag" ||
7743 test ! -s conftest.err
7744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_hi=$ac_mid
7746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007748sed 's/^/| /' conftest.$ac_ext >&5
7749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752
7753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007754done
7755case $ac_lo in
7756?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007761See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007762 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 else
7764 ac_cv_sizeof_int=0
7765 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007766esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007769/* confdefs.h. */
7770_ACEOF
7771cat confdefs.h >>conftest.$ac_ext
7772cat >>conftest.$ac_ext <<_ACEOF
7773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007775 typedef int ac__type_sizeof_;
7776static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7777static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007778#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007780int
7781main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007782{
Martin v. Löwis11437992002-04-12 09:54:03 +00007783
7784 FILE *f = fopen ("conftest.val", "w");
7785 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007787 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007792 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 }
7794 else
7795 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007797 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
7803 ;
7804 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007805}
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
7807rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808if { (ac_try="$ac_link"
7809case "(($ac_try" in
7810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7811 *) ac_try_echo=$ac_try;;
7812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 { (case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 (exit $ac_status); }; }; then
7827 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829 echo "$as_me: program exited with status $ac_status" >&5
7830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007838See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007839 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 else
7841 ac_cv_sizeof_int=0
7842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
7846rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007848{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7849echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850
7851
7852
Martin v. Löwis11437992002-04-12 09:54:03 +00007853cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007855_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856
7857
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007858{ echo "$as_me:$LINENO: checking for long" >&5
7859echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7860if test "${ac_cv_type_long+set}" = set; then
7861 echo $ECHO_N "(cached) $ECHO_C" >&6
7862else
7863 cat >conftest.$ac_ext <<_ACEOF
7864/* confdefs.h. */
7865_ACEOF
7866cat confdefs.h >>conftest.$ac_ext
7867cat >>conftest.$ac_ext <<_ACEOF
7868/* end confdefs.h. */
7869$ac_includes_default
7870typedef long ac__type_new_;
7871int
7872main ()
7873{
7874if ((ac__type_new_ *) 0)
7875 return 0;
7876if (sizeof (ac__type_new_))
7877 return 0;
7878 ;
7879 return 0;
7880}
7881_ACEOF
7882rm -f conftest.$ac_objext
7883if { (ac_try="$ac_compile"
7884case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
7888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7889 (eval "$ac_compile") 2>conftest.er1
7890 ac_status=$?
7891 grep -v '^ *+' conftest.er1 >conftest.err
7892 rm -f conftest.er1
7893 cat conftest.err >&5
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); } && {
7896 test -z "$ac_c_werror_flag" ||
7897 test ! -s conftest.err
7898 } && test -s conftest.$ac_objext; then
7899 ac_cv_type_long=yes
7900else
7901 echo "$as_me: failed program was:" >&5
7902sed 's/^/| /' conftest.$ac_ext >&5
7903
7904 ac_cv_type_long=no
7905fi
7906
7907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7908fi
7909{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7910echo "${ECHO_T}$ac_cv_type_long" >&6; }
7911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912# The cast to long int works around a bug in the HP C Compiler
7913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7915# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007916{ echo "$as_me:$LINENO: checking size of long" >&5
7917echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007918if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 if test "$cross_compiling" = yes; then
7922 # Depending upon the size, compute the lo and hi bounds.
7923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* confdefs.h. */
7925_ACEOF
7926cat confdefs.h >>conftest.$ac_ext
7927cat >>conftest.$ac_ext <<_ACEOF
7928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007930 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007935test_array [0] = 0
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942if { (ac_try="$ac_compile"
7943case "(($ac_try" in
7944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7945 *) ac_try_echo=$ac_try;;
7946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007950 grep -v '^ *+' conftest.er1 >conftest.err
7951 rm -f conftest.er1
7952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954 (exit $ac_status); } && {
7955 test -z "$ac_c_werror_flag" ||
7956 test ! -s conftest.err
7957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_lo=0 ac_mid=0
7959 while :; do
7960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007961/* confdefs.h. */
7962_ACEOF
7963cat confdefs.h >>conftest.$ac_ext
7964cat >>conftest.$ac_ext <<_ACEOF
7965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007966$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007967 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007972test_array [0] = 0
7973
7974 ;
7975 return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979if { (ac_try="$ac_compile"
7980case "(($ac_try" in
7981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7982 *) ac_try_echo=$ac_try;;
7983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007987 grep -v '^ *+' conftest.er1 >conftest.err
7988 rm -f conftest.er1
7989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 (exit $ac_status); } && {
7992 test -z "$ac_c_werror_flag" ||
7993 test ! -s conftest.err
7994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_hi=$ac_mid; break
7996else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007998sed 's/^/| /' conftest.$ac_ext >&5
7999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 ac_lo=`expr $ac_mid + 1`
8001 if test $ac_lo -le $ac_mid; then
8002 ac_lo= ac_hi=
8003 break
8004 fi
8005 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007
8008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 done
8010else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008012sed 's/^/| /' conftest.$ac_ext >&5
8013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* confdefs.h. */
8016_ACEOF
8017cat confdefs.h >>conftest.$ac_ext
8018cat >>conftest.$ac_ext <<_ACEOF
8019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008021 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008022int
8023main ()
8024{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008026test_array [0] = 0
8027
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033if { (ac_try="$ac_compile"
8034case "(($ac_try" in
8035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8036 *) ac_try_echo=$ac_try;;
8037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008041 grep -v '^ *+' conftest.er1 >conftest.err
8042 rm -f conftest.er1
8043 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045 (exit $ac_status); } && {
8046 test -z "$ac_c_werror_flag" ||
8047 test ! -s conftest.err
8048 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_hi=-1 ac_mid=-1
8050 while :; do
8051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008058 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008059int
8060main ()
8061{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008063test_array [0] = 0
8064
8065 ;
8066 return 0;
8067}
8068_ACEOF
8069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070if { (ac_try="$ac_compile"
8071case "(($ac_try" in
8072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8073 *) ac_try_echo=$ac_try;;
8074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008078 grep -v '^ *+' conftest.er1 >conftest.err
8079 rm -f conftest.er1
8080 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082 (exit $ac_status); } && {
8083 test -z "$ac_c_werror_flag" ||
8084 test ! -s conftest.err
8085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_lo=$ac_mid; break
8087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008089sed 's/^/| /' conftest.$ac_ext >&5
8090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091 ac_hi=`expr '(' $ac_mid ')' - 1`
8092 if test $ac_mid -le $ac_hi; then
8093 ac_lo= ac_hi=
8094 break
8095 fi
8096 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098
8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 done
8101else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110
8111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008112# Binary search between lo and hi bounds.
8113while test "x$ac_lo" != "x$ac_hi"; do
8114 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008116/* confdefs.h. */
8117_ACEOF
8118cat confdefs.h >>conftest.$ac_ext
8119cat >>conftest.$ac_ext <<_ACEOF
8120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008122 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008127test_array [0] = 0
8128
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134if { (ac_try="$ac_compile"
8135case "(($ac_try" in
8136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8137 *) ac_try_echo=$ac_try;;
8138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008142 grep -v '^ *+' conftest.er1 >conftest.err
8143 rm -f conftest.er1
8144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146 (exit $ac_status); } && {
8147 test -z "$ac_c_werror_flag" ||
8148 test ! -s conftest.err
8149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_hi=$ac_mid
8151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157
8158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008159done
8160case $ac_lo in
8161?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008166See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008167 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168 else
8169 ac_cv_sizeof_long=0
8170 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008171esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008172else
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* confdefs.h. */
8175_ACEOF
8176cat confdefs.h >>conftest.$ac_ext
8177cat >>conftest.$ac_ext <<_ACEOF
8178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008179$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008180 typedef long ac__type_sizeof_;
8181static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8182static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008185int
8186main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008187{
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
8189 FILE *f = fopen ("conftest.val", "w");
8190 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008192 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008197 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 }
8199 else
8200 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208 ;
8209 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008210}
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
8212rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213if { (ac_try="$ac_link"
8214case "(($ac_try" in
8215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8216 *) ac_try_echo=$ac_try;;
8217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 { (case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 (exit $ac_status); }; }; then
8232 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234 echo "$as_me: program exited with status $ac_status" >&5
8235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008243See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008244 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 else
8246 ac_cv_sizeof_long=0
8247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
8251rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008253{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8254echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255
8256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261
8262
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008263{ echo "$as_me:$LINENO: checking for void *" >&5
8264echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8265if test "${ac_cv_type_void_p+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
8267else
8268 cat >conftest.$ac_ext <<_ACEOF
8269/* confdefs.h. */
8270_ACEOF
8271cat confdefs.h >>conftest.$ac_ext
8272cat >>conftest.$ac_ext <<_ACEOF
8273/* end confdefs.h. */
8274$ac_includes_default
8275typedef void * ac__type_new_;
8276int
8277main ()
8278{
8279if ((ac__type_new_ *) 0)
8280 return 0;
8281if (sizeof (ac__type_new_))
8282 return 0;
8283 ;
8284 return 0;
8285}
8286_ACEOF
8287rm -f conftest.$ac_objext
8288if { (ac_try="$ac_compile"
8289case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
8293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8294 (eval "$ac_compile") 2>conftest.er1
8295 ac_status=$?
8296 grep -v '^ *+' conftest.er1 >conftest.err
8297 rm -f conftest.er1
8298 cat conftest.err >&5
8299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8300 (exit $ac_status); } && {
8301 test -z "$ac_c_werror_flag" ||
8302 test ! -s conftest.err
8303 } && test -s conftest.$ac_objext; then
8304 ac_cv_type_void_p=yes
8305else
8306 echo "$as_me: failed program was:" >&5
8307sed 's/^/| /' conftest.$ac_ext >&5
8308
8309 ac_cv_type_void_p=no
8310fi
8311
8312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8313fi
8314{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8315echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008321{ echo "$as_me:$LINENO: checking size of void *" >&5
8322echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008323if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 if test "$cross_compiling" = yes; then
8327 # Depending upon the size, compute the lo and hi bounds.
8328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* confdefs.h. */
8330_ACEOF
8331cat confdefs.h >>conftest.$ac_ext
8332cat >>conftest.$ac_ext <<_ACEOF
8333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008334$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008335 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008336int
8337main ()
8338{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008340test_array [0] = 0
8341
8342 ;
8343 return 0;
8344}
8345_ACEOF
8346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347if { (ac_try="$ac_compile"
8348case "(($ac_try" in
8349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8350 *) ac_try_echo=$ac_try;;
8351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008355 grep -v '^ *+' conftest.er1 >conftest.err
8356 rm -f conftest.er1
8357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359 (exit $ac_status); } && {
8360 test -z "$ac_c_werror_flag" ||
8361 test ! -s conftest.err
8362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_lo=0 ac_mid=0
8364 while :; do
8365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008371$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008372 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008377test_array [0] = 0
8378
8379 ;
8380 return 0;
8381}
8382_ACEOF
8383rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384if { (ac_try="$ac_compile"
8385case "(($ac_try" in
8386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8387 *) ac_try_echo=$ac_try;;
8388esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008392 grep -v '^ *+' conftest.er1 >conftest.err
8393 rm -f conftest.er1
8394 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 (exit $ac_status); } && {
8397 test -z "$ac_c_werror_flag" ||
8398 test ! -s conftest.err
8399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_hi=$ac_mid; break
8401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008403sed 's/^/| /' conftest.$ac_ext >&5
8404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 ac_lo=`expr $ac_mid + 1`
8406 if test $ac_lo -le $ac_mid; then
8407 ac_lo= ac_hi=
8408 break
8409 fi
8410 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412
8413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 done
8415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008417sed 's/^/| /' conftest.$ac_ext >&5
8418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008420/* confdefs.h. */
8421_ACEOF
8422cat confdefs.h >>conftest.$ac_ext
8423cat >>conftest.$ac_ext <<_ACEOF
8424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008425$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008426 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008427int
8428main ()
8429{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008431test_array [0] = 0
8432
8433 ;
8434 return 0;
8435}
8436_ACEOF
8437rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438if { (ac_try="$ac_compile"
8439case "(($ac_try" in
8440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8441 *) ac_try_echo=$ac_try;;
8442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008446 grep -v '^ *+' conftest.er1 >conftest.err
8447 rm -f conftest.er1
8448 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 (exit $ac_status); } && {
8451 test -z "$ac_c_werror_flag" ||
8452 test ! -s conftest.err
8453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_hi=-1 ac_mid=-1
8455 while :; do
8456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008463 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008483 grep -v '^ *+' conftest.er1 >conftest.err
8484 rm -f conftest.er1
8485 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 (exit $ac_status); } && {
8488 test -z "$ac_c_werror_flag" ||
8489 test ! -s conftest.err
8490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_lo=$ac_mid; break
8492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008494sed 's/^/| /' conftest.$ac_ext >&5
8495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 ac_hi=`expr '(' $ac_mid ')' - 1`
8497 if test $ac_mid -le $ac_hi; then
8498 ac_lo= ac_hi=
8499 break
8500 fi
8501 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 done
8506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008508sed 's/^/| /' conftest.$ac_ext >&5
8509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008517# Binary search between lo and hi bounds.
8518while test "x$ac_lo" != "x$ac_hi"; do
8519 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008521/* confdefs.h. */
8522_ACEOF
8523cat confdefs.h >>conftest.$ac_ext
8524cat >>conftest.$ac_ext <<_ACEOF
8525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008526$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008527 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
8530{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008532test_array [0] = 0
8533
8534 ;
8535 return 0;
8536}
8537_ACEOF
8538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539if { (ac_try="$ac_compile"
8540case "(($ac_try" in
8541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8542 *) ac_try_echo=$ac_try;;
8543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008547 grep -v '^ *+' conftest.er1 >conftest.err
8548 rm -f conftest.er1
8549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 (exit $ac_status); } && {
8552 test -z "$ac_c_werror_flag" ||
8553 test ! -s conftest.err
8554 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_hi=$ac_mid
8556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008558sed 's/^/| /' conftest.$ac_ext >&5
8559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008564done
8565case $ac_lo in
8566?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008571See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008572 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_void_p=0
8575 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008576esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008579/* confdefs.h. */
8580_ACEOF
8581cat confdefs.h >>conftest.$ac_ext
8582cat >>conftest.$ac_ext <<_ACEOF
8583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008584$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008585 typedef void * ac__type_sizeof_;
8586static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8587static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008588#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008590int
8591main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008592{
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
8594 FILE *f = fopen ("conftest.val", "w");
8595 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008597 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008602 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 }
8604 else
8605 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008607 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
8613 ;
8614 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008615}
Martin v. Löwis11437992002-04-12 09:54:03 +00008616_ACEOF
8617rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618if { (ac_try="$ac_link"
8619case "(($ac_try" in
8620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8621 *) ac_try_echo=$ac_try;;
8622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 { (case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 (exit $ac_status); }; }; then
8637 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639 echo "$as_me: program exited with status $ac_status" >&5
8640echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008648See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008649 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_void_p=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
8656rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008657fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008658{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8659echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660
8661
8662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008664#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008666
8667
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008668{ echo "$as_me:$LINENO: checking for short" >&5
8669echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8670if test "${ac_cv_type_short+set}" = set; then
8671 echo $ECHO_N "(cached) $ECHO_C" >&6
8672else
8673 cat >conftest.$ac_ext <<_ACEOF
8674/* confdefs.h. */
8675_ACEOF
8676cat confdefs.h >>conftest.$ac_ext
8677cat >>conftest.$ac_ext <<_ACEOF
8678/* end confdefs.h. */
8679$ac_includes_default
8680typedef short ac__type_new_;
8681int
8682main ()
8683{
8684if ((ac__type_new_ *) 0)
8685 return 0;
8686if (sizeof (ac__type_new_))
8687 return 0;
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
8693if { (ac_try="$ac_compile"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
8698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8699 (eval "$ac_compile") 2>conftest.er1
8700 ac_status=$?
8701 grep -v '^ *+' conftest.er1 >conftest.err
8702 rm -f conftest.er1
8703 cat conftest.err >&5
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); } && {
8706 test -z "$ac_c_werror_flag" ||
8707 test ! -s conftest.err
8708 } && test -s conftest.$ac_objext; then
8709 ac_cv_type_short=yes
8710else
8711 echo "$as_me: failed program was:" >&5
8712sed 's/^/| /' conftest.$ac_ext >&5
8713
8714 ac_cv_type_short=no
8715fi
8716
8717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8718fi
8719{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8720echo "${ECHO_T}$ac_cv_type_short" >&6; }
8721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722# The cast to long int works around a bug in the HP C Compiler
8723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8725# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008726{ echo "$as_me:$LINENO: checking size of short" >&5
8727echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008728if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 if test "$cross_compiling" = yes; then
8732 # Depending upon the size, compute the lo and hi bounds.
8733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* confdefs.h. */
8735_ACEOF
8736cat confdefs.h >>conftest.$ac_ext
8737cat >>conftest.$ac_ext <<_ACEOF
8738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008740 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008745test_array [0] = 0
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752if { (ac_try="$ac_compile"
8753case "(($ac_try" in
8754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8755 *) ac_try_echo=$ac_try;;
8756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008760 grep -v '^ *+' conftest.er1 >conftest.err
8761 rm -f conftest.er1
8762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764 (exit $ac_status); } && {
8765 test -z "$ac_c_werror_flag" ||
8766 test ! -s conftest.err
8767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_lo=0 ac_mid=0
8769 while :; do
8770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* confdefs.h. */
8772_ACEOF
8773cat confdefs.h >>conftest.$ac_ext
8774cat >>conftest.$ac_ext <<_ACEOF
8775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008777 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789if { (ac_try="$ac_compile"
8790case "(($ac_try" in
8791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8792 *) ac_try_echo=$ac_try;;
8793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008797 grep -v '^ *+' conftest.er1 >conftest.err
8798 rm -f conftest.er1
8799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 (exit $ac_status); } && {
8802 test -z "$ac_c_werror_flag" ||
8803 test ! -s conftest.err
8804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_hi=$ac_mid; break
8806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 ac_lo=`expr $ac_mid + 1`
8811 if test $ac_lo -le $ac_mid; then
8812 ac_lo= ac_hi=
8813 break
8814 fi
8815 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
8818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 done
8820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008822sed 's/^/| /' conftest.$ac_ext >&5
8823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008830$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008831 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008836test_array [0] = 0
8837
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843if { (ac_try="$ac_compile"
8844case "(($ac_try" in
8845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8846 *) ac_try_echo=$ac_try;;
8847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008851 grep -v '^ *+' conftest.er1 >conftest.err
8852 rm -f conftest.er1
8853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855 (exit $ac_status); } && {
8856 test -z "$ac_c_werror_flag" ||
8857 test ! -s conftest.err
8858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_hi=-1 ac_mid=-1
8860 while :; do
8861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008868 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008873test_array [0] = 0
8874
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880if { (ac_try="$ac_compile"
8881case "(($ac_try" in
8882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883 *) ac_try_echo=$ac_try;;
8884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008888 grep -v '^ *+' conftest.er1 >conftest.err
8889 rm -f conftest.er1
8890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892 (exit $ac_status); } && {
8893 test -z "$ac_c_werror_flag" ||
8894 test ! -s conftest.err
8895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_lo=$ac_mid; break
8897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008899sed 's/^/| /' conftest.$ac_ext >&5
8900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 ac_hi=`expr '(' $ac_mid ')' - 1`
8902 if test $ac_mid -le $ac_hi; then
8903 ac_lo= ac_hi=
8904 break
8905 fi
8906 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908
8909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 done
8911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920
8921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008922# Binary search between lo and hi bounds.
8923while test "x$ac_lo" != "x$ac_hi"; do
8924 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* confdefs.h. */
8927_ACEOF
8928cat confdefs.h >>conftest.$ac_ext
8929cat >>conftest.$ac_ext <<_ACEOF
8930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008932 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008937test_array [0] = 0
8938
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944if { (ac_try="$ac_compile"
8945case "(($ac_try" in
8946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8947 *) ac_try_echo=$ac_try;;
8948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008952 grep -v '^ *+' conftest.er1 >conftest.err
8953 rm -f conftest.er1
8954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 (exit $ac_status); } && {
8957 test -z "$ac_c_werror_flag" ||
8958 test ! -s conftest.err
8959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_hi=$ac_mid
8961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008963sed 's/^/| /' conftest.$ac_ext >&5
8964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967
8968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008969done
8970case $ac_lo in
8971?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008976See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008977 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978 else
8979 ac_cv_sizeof_short=0
8980 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008990 typedef short ac__type_sizeof_;
8991static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8992static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008995int
8996main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008997{
Martin v. Löwis11437992002-04-12 09:54:03 +00008998
8999 FILE *f = fopen ("conftest.val", "w");
9000 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009002 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009007 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 }
9009 else
9010 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
9018 ;
9019 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009020}
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
9022rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023if { (ac_try="$ac_link"
9024case "(($ac_try" in
9025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9026 *) ac_try_echo=$ac_try;;
9027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 { (case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 (exit $ac_status); }; }; then
9042 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044 echo "$as_me: program exited with status $ac_status" >&5
9045echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009053See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009054 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 else
9056 ac_cv_sizeof_short=0
9057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009060fi
9061rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009063{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9064echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065
9066
9067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071
9072
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009073{ echo "$as_me:$LINENO: checking for float" >&5
9074echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9075if test "${ac_cv_type_float+set}" = set; then
9076 echo $ECHO_N "(cached) $ECHO_C" >&6
9077else
9078 cat >conftest.$ac_ext <<_ACEOF
9079/* confdefs.h. */
9080_ACEOF
9081cat confdefs.h >>conftest.$ac_ext
9082cat >>conftest.$ac_ext <<_ACEOF
9083/* end confdefs.h. */
9084$ac_includes_default
9085typedef float ac__type_new_;
9086int
9087main ()
9088{
9089if ((ac__type_new_ *) 0)
9090 return 0;
9091if (sizeof (ac__type_new_))
9092 return 0;
9093 ;
9094 return 0;
9095}
9096_ACEOF
9097rm -f conftest.$ac_objext
9098if { (ac_try="$ac_compile"
9099case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
9103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9104 (eval "$ac_compile") 2>conftest.er1
9105 ac_status=$?
9106 grep -v '^ *+' conftest.er1 >conftest.err
9107 rm -f conftest.er1
9108 cat conftest.err >&5
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } && {
9111 test -z "$ac_c_werror_flag" ||
9112 test ! -s conftest.err
9113 } && test -s conftest.$ac_objext; then
9114 ac_cv_type_float=yes
9115else
9116 echo "$as_me: failed program was:" >&5
9117sed 's/^/| /' conftest.$ac_ext >&5
9118
9119 ac_cv_type_float=no
9120fi
9121
9122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123fi
9124{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9125echo "${ECHO_T}$ac_cv_type_float" >&6; }
9126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127# The cast to long int works around a bug in the HP C Compiler
9128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9130# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009131{ echo "$as_me:$LINENO: checking size of float" >&5
9132echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009135else
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 if test "$cross_compiling" = yes; then
9137 # Depending upon the size, compute the lo and hi bounds.
9138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009145 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009150test_array [0] = 0
9151
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157if { (ac_try="$ac_compile"
9158case "(($ac_try" in
9159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9160 *) ac_try_echo=$ac_try;;
9161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009165 grep -v '^ *+' conftest.er1 >conftest.err
9166 rm -f conftest.er1
9167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 (exit $ac_status); } && {
9170 test -z "$ac_c_werror_flag" ||
9171 test ! -s conftest.err
9172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_lo=0 ac_mid=0
9174 while :; do
9175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* confdefs.h. */
9177_ACEOF
9178cat confdefs.h >>conftest.$ac_ext
9179cat >>conftest.$ac_ext <<_ACEOF
9180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009182 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009183int
9184main ()
9185{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009187test_array [0] = 0
9188
9189 ;
9190 return 0;
9191}
9192_ACEOF
9193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194if { (ac_try="$ac_compile"
9195case "(($ac_try" in
9196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9197 *) ac_try_echo=$ac_try;;
9198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 (exit $ac_status); } && {
9207 test -z "$ac_c_werror_flag" ||
9208 test ! -s conftest.err
9209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_hi=$ac_mid; break
9211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009213sed 's/^/| /' conftest.$ac_ext >&5
9214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 ac_lo=`expr $ac_mid + 1`
9216 if test $ac_lo -le $ac_mid; then
9217 ac_lo= ac_hi=
9218 break
9219 fi
9220 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222
9223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 done
9225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009230/* confdefs.h. */
9231_ACEOF
9232cat confdefs.h >>conftest.$ac_ext
9233cat >>conftest.$ac_ext <<_ACEOF
9234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009235$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009236 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009237int
9238main ()
9239{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009241test_array [0] = 0
9242
9243 ;
9244 return 0;
9245}
9246_ACEOF
9247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248if { (ac_try="$ac_compile"
9249case "(($ac_try" in
9250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9251 *) ac_try_echo=$ac_try;;
9252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009256 grep -v '^ *+' conftest.er1 >conftest.err
9257 rm -f conftest.er1
9258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 (exit $ac_status); } && {
9261 test -z "$ac_c_werror_flag" ||
9262 test ! -s conftest.err
9263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 ac_hi=-1 ac_mid=-1
9265 while :; do
9266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009273 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009274int
9275main ()
9276{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009278test_array [0] = 0
9279
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285if { (ac_try="$ac_compile"
9286case "(($ac_try" in
9287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288 *) ac_try_echo=$ac_try;;
9289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009293 grep -v '^ *+' conftest.er1 >conftest.err
9294 rm -f conftest.er1
9295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009297 (exit $ac_status); } && {
9298 test -z "$ac_c_werror_flag" ||
9299 test ! -s conftest.err
9300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_lo=$ac_mid; break
9302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009304sed 's/^/| /' conftest.$ac_ext >&5
9305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 ac_hi=`expr '(' $ac_mid ')' - 1`
9307 if test $ac_mid -le $ac_hi; then
9308 ac_lo= ac_hi=
9309 break
9310 fi
9311 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313
9314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 done
9316else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009318sed 's/^/| /' conftest.$ac_ext >&5
9319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325
9326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009327# Binary search between lo and hi bounds.
9328while test "x$ac_lo" != "x$ac_hi"; do
9329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009331/* confdefs.h. */
9332_ACEOF
9333cat confdefs.h >>conftest.$ac_ext
9334cat >>conftest.$ac_ext <<_ACEOF
9335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009337 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009338int
9339main ()
9340{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009342test_array [0] = 0
9343
9344 ;
9345 return 0;
9346}
9347_ACEOF
9348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349if { (ac_try="$ac_compile"
9350case "(($ac_try" in
9351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9352 *) ac_try_echo=$ac_try;;
9353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009357 grep -v '^ *+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361 (exit $ac_status); } && {
9362 test -z "$ac_c_werror_flag" ||
9363 test ! -s conftest.err
9364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_hi=$ac_mid
9366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009368sed 's/^/| /' conftest.$ac_ext >&5
9369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372
9373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009374done
9375case $ac_lo in
9376?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009381See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009382 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383 else
9384 ac_cv_sizeof_float=0
9385 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009387else
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009395 typedef float ac__type_sizeof_;
9396static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9397static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009398#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009402{
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
9404 FILE *f = fopen ("conftest.val", "w");
9405 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009407 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009412 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 }
9414 else
9415 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009417 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
9423 ;
9424 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009425}
Martin v. Löwis11437992002-04-12 09:54:03 +00009426_ACEOF
9427rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428if { (ac_try="$ac_link"
9429case "(($ac_try" in
9430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9431 *) ac_try_echo=$ac_try;;
9432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 { (case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 (exit $ac_status); }; }; then
9447 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009448else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449 echo "$as_me: program exited with status $ac_status" >&5
9450echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009458See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009459 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 else
9461 ac_cv_sizeof_float=0
9462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009465fi
9466rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009468{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9469echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470
9471
9472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476
9477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009478{ echo "$as_me:$LINENO: checking for double" >&5
9479echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9480if test "${ac_cv_type_double+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482else
9483 cat >conftest.$ac_ext <<_ACEOF
9484/* confdefs.h. */
9485_ACEOF
9486cat confdefs.h >>conftest.$ac_ext
9487cat >>conftest.$ac_ext <<_ACEOF
9488/* end confdefs.h. */
9489$ac_includes_default
9490typedef double ac__type_new_;
9491int
9492main ()
9493{
9494if ((ac__type_new_ *) 0)
9495 return 0;
9496if (sizeof (ac__type_new_))
9497 return 0;
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502rm -f conftest.$ac_objext
9503if { (ac_try="$ac_compile"
9504case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
9508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9509 (eval "$ac_compile") 2>conftest.er1
9510 ac_status=$?
9511 grep -v '^ *+' conftest.er1 >conftest.err
9512 rm -f conftest.er1
9513 cat conftest.err >&5
9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9515 (exit $ac_status); } && {
9516 test -z "$ac_c_werror_flag" ||
9517 test ! -s conftest.err
9518 } && test -s conftest.$ac_objext; then
9519 ac_cv_type_double=yes
9520else
9521 echo "$as_me: failed program was:" >&5
9522sed 's/^/| /' conftest.$ac_ext >&5
9523
9524 ac_cv_type_double=no
9525fi
9526
9527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9528fi
9529{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9530echo "${ECHO_T}$ac_cv_type_double" >&6; }
9531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532# The cast to long int works around a bug in the HP C Compiler
9533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9535# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009536{ echo "$as_me:$LINENO: checking size of double" >&5
9537echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009538if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009539 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 if test "$cross_compiling" = yes; then
9542 # Depending upon the size, compute the lo and hi bounds.
9543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009550 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551int
9552main ()
9553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009555test_array [0] = 0
9556
9557 ;
9558 return 0;
9559}
9560_ACEOF
9561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562if { (ac_try="$ac_compile"
9563case "(($ac_try" in
9564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9565 *) ac_try_echo=$ac_try;;
9566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009570 grep -v '^ *+' conftest.er1 >conftest.err
9571 rm -f conftest.er1
9572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 (exit $ac_status); } && {
9575 test -z "$ac_c_werror_flag" ||
9576 test ! -s conftest.err
9577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_lo=0 ac_mid=0
9579 while :; do
9580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* confdefs.h. */
9582_ACEOF
9583cat confdefs.h >>conftest.$ac_ext
9584cat >>conftest.$ac_ext <<_ACEOF
9585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009586$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009587 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009588int
9589main ()
9590{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009592test_array [0] = 0
9593
9594 ;
9595 return 0;
9596}
9597_ACEOF
9598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599if { (ac_try="$ac_compile"
9600case "(($ac_try" in
9601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9602 *) ac_try_echo=$ac_try;;
9603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009607 grep -v '^ *+' conftest.er1 >conftest.err
9608 rm -f conftest.er1
9609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 (exit $ac_status); } && {
9612 test -z "$ac_c_werror_flag" ||
9613 test ! -s conftest.err
9614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_hi=$ac_mid; break
9616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009618sed 's/^/| /' conftest.$ac_ext >&5
9619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 ac_lo=`expr $ac_mid + 1`
9621 if test $ac_lo -le $ac_mid; then
9622 ac_lo= ac_hi=
9623 break
9624 fi
9625 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627
9628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 done
9630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009632sed 's/^/| /' conftest.$ac_ext >&5
9633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009641 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009642int
9643main ()
9644{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009646test_array [0] = 0
9647
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653if { (ac_try="$ac_compile"
9654case "(($ac_try" in
9655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9656 *) ac_try_echo=$ac_try;;
9657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009661 grep -v '^ *+' conftest.er1 >conftest.err
9662 rm -f conftest.er1
9663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665 (exit $ac_status); } && {
9666 test -z "$ac_c_werror_flag" ||
9667 test ! -s conftest.err
9668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_hi=-1 ac_mid=-1
9670 while :; do
9671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009678 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009679int
9680main ()
9681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009683test_array [0] = 0
9684
9685 ;
9686 return 0;
9687}
9688_ACEOF
9689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690if { (ac_try="$ac_compile"
9691case "(($ac_try" in
9692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9693 *) ac_try_echo=$ac_try;;
9694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009698 grep -v '^ *+' conftest.er1 >conftest.err
9699 rm -f conftest.er1
9700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702 (exit $ac_status); } && {
9703 test -z "$ac_c_werror_flag" ||
9704 test ! -s conftest.err
9705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_lo=$ac_mid; break
9707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009709sed 's/^/| /' conftest.$ac_ext >&5
9710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 ac_hi=`expr '(' $ac_mid ')' - 1`
9712 if test $ac_mid -le $ac_hi; then
9713 ac_lo= ac_hi=
9714 break
9715 fi
9716 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718
9719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 done
9721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009723sed 's/^/| /' conftest.$ac_ext >&5
9724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730
9731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009732# Binary search between lo and hi bounds.
9733while test "x$ac_lo" != "x$ac_hi"; do
9734 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* confdefs.h. */
9737_ACEOF
9738cat confdefs.h >>conftest.$ac_ext
9739cat >>conftest.$ac_ext <<_ACEOF
9740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009742 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009747test_array [0] = 0
9748
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754if { (ac_try="$ac_compile"
9755case "(($ac_try" in
9756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9757 *) ac_try_echo=$ac_try;;
9758esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009762 grep -v '^ *+' conftest.er1 >conftest.err
9763 rm -f conftest.er1
9764 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766 (exit $ac_status); } && {
9767 test -z "$ac_c_werror_flag" ||
9768 test ! -s conftest.err
9769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_hi=$ac_mid
9771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009773sed 's/^/| /' conftest.$ac_ext >&5
9774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777
9778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009779done
9780case $ac_lo in
9781?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009786See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009787 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788 else
9789 ac_cv_sizeof_double=0
9790 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009791esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* confdefs.h. */
9795_ACEOF
9796cat confdefs.h >>conftest.$ac_ext
9797cat >>conftest.$ac_ext <<_ACEOF
9798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009800 typedef double ac__type_sizeof_;
9801static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9802static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009807{
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
9809 FILE *f = fopen ("conftest.val", "w");
9810 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009812 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009817 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 }
9819 else
9820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
9828 ;
9829 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009830}
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
9832rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833if { (ac_try="$ac_link"
9834case "(($ac_try" in
9835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9836 *) ac_try_echo=$ac_try;;
9837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 { (case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 (exit $ac_status); }; }; then
9852 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854 echo "$as_me: program exited with status $ac_status" >&5
9855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwis11437992002-04-12 09:54:03 +00009858( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009863See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009864 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 else
9866 ac_cv_sizeof_double=0
9867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009870fi
9871rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009873{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9874echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875
9876
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881
9882
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009883{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9884echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9885if test "${ac_cv_type_fpos_t+set}" = set; then
9886 echo $ECHO_N "(cached) $ECHO_C" >&6
9887else
9888 cat >conftest.$ac_ext <<_ACEOF
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
9894$ac_includes_default
9895typedef fpos_t ac__type_new_;
9896int
9897main ()
9898{
9899if ((ac__type_new_ *) 0)
9900 return 0;
9901if (sizeof (ac__type_new_))
9902 return 0;
9903 ;
9904 return 0;
9905}
9906_ACEOF
9907rm -f conftest.$ac_objext
9908if { (ac_try="$ac_compile"
9909case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
9913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9914 (eval "$ac_compile") 2>conftest.er1
9915 ac_status=$?
9916 grep -v '^ *+' conftest.er1 >conftest.err
9917 rm -f conftest.er1
9918 cat conftest.err >&5
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } && {
9921 test -z "$ac_c_werror_flag" ||
9922 test ! -s conftest.err
9923 } && test -s conftest.$ac_objext; then
9924 ac_cv_type_fpos_t=yes
9925else
9926 echo "$as_me: failed program was:" >&5
9927sed 's/^/| /' conftest.$ac_ext >&5
9928
9929 ac_cv_type_fpos_t=no
9930fi
9931
9932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9933fi
9934{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9935echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937# The cast to long int works around a bug in the HP C Compiler
9938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9940# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009941{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9942echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009943if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009944 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009945else
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 if test "$cross_compiling" = yes; then
9947 # Depending upon the size, compute the lo and hi bounds.
9948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* confdefs.h. */
9950_ACEOF
9951cat confdefs.h >>conftest.$ac_ext
9952cat >>conftest.$ac_ext <<_ACEOF
9953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009955 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009956int
9957main ()
9958{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009960test_array [0] = 0
9961
9962 ;
9963 return 0;
9964}
9965_ACEOF
9966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967if { (ac_try="$ac_compile"
9968case "(($ac_try" in
9969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9970 *) ac_try_echo=$ac_try;;
9971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009975 grep -v '^ *+' conftest.er1 >conftest.err
9976 rm -f conftest.er1
9977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979 (exit $ac_status); } && {
9980 test -z "$ac_c_werror_flag" ||
9981 test ! -s conftest.err
9982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_lo=0 ac_mid=0
9984 while :; do
9985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* confdefs.h. */
9987_ACEOF
9988cat confdefs.h >>conftest.$ac_ext
9989cat >>conftest.$ac_ext <<_ACEOF
9990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009991$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009992 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009993int
9994main ()
9995{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009997test_array [0] = 0
9998
9999 ;
10000 return 0;
10001}
10002_ACEOF
10003rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004if { (ac_try="$ac_compile"
10005case "(($ac_try" in
10006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10007 *) ac_try_echo=$ac_try;;
10008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010012 grep -v '^ *+' conftest.er1 >conftest.err
10013 rm -f conftest.er1
10014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016 (exit $ac_status); } && {
10017 test -z "$ac_c_werror_flag" ||
10018 test ! -s conftest.err
10019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_hi=$ac_mid; break
10021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010023sed 's/^/| /' conftest.$ac_ext >&5
10024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 ac_lo=`expr $ac_mid + 1`
10026 if test $ac_lo -le $ac_mid; then
10027 ac_lo= ac_hi=
10028 break
10029 fi
10030 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032
10033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 done
10035else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010037sed 's/^/| /' conftest.$ac_ext >&5
10038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010045$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010046 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010047int
10048main ()
10049{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010051test_array [0] = 0
10052
10053 ;
10054 return 0;
10055}
10056_ACEOF
10057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058if { (ac_try="$ac_compile"
10059case "(($ac_try" in
10060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10061 *) ac_try_echo=$ac_try;;
10062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010066 grep -v '^ *+' conftest.er1 >conftest.err
10067 rm -f conftest.er1
10068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 (exit $ac_status); } && {
10071 test -z "$ac_c_werror_flag" ||
10072 test ! -s conftest.err
10073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_hi=-1 ac_mid=-1
10075 while :; do
10076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010083 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010084int
10085main ()
10086{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010088test_array [0] = 0
10089
10090 ;
10091 return 0;
10092}
10093_ACEOF
10094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095if { (ac_try="$ac_compile"
10096case "(($ac_try" in
10097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10098 *) ac_try_echo=$ac_try;;
10099esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010103 grep -v '^ *+' conftest.er1 >conftest.err
10104 rm -f conftest.er1
10105 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107 (exit $ac_status); } && {
10108 test -z "$ac_c_werror_flag" ||
10109 test ! -s conftest.err
10110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_lo=$ac_mid; break
10112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010114sed 's/^/| /' conftest.$ac_ext >&5
10115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 ac_hi=`expr '(' $ac_mid ')' - 1`
10117 if test $ac_mid -le $ac_hi; then
10118 ac_lo= ac_hi=
10119 break
10120 fi
10121 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123
10124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 done
10126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010128sed 's/^/| /' conftest.$ac_ext >&5
10129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135
10136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010137# Binary search between lo and hi bounds.
10138while test "x$ac_lo" != "x$ac_hi"; do
10139 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* confdefs.h. */
10142_ACEOF
10143cat confdefs.h >>conftest.$ac_ext
10144cat >>conftest.$ac_ext <<_ACEOF
10145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010147 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010152test_array [0] = 0
10153
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159if { (ac_try="$ac_compile"
10160case "(($ac_try" in
10161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10162 *) ac_try_echo=$ac_try;;
10163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010167 grep -v '^ *+' conftest.er1 >conftest.err
10168 rm -f conftest.er1
10169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 (exit $ac_status); } && {
10172 test -z "$ac_c_werror_flag" ||
10173 test ! -s conftest.err
10174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_hi=$ac_mid
10176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010178sed 's/^/| /' conftest.$ac_ext >&5
10179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182
10183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010184done
10185case $ac_lo in
10186?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010189See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010191See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010192 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193 else
10194 ac_cv_sizeof_fpos_t=0
10195 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010196esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010197else
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* confdefs.h. */
10200_ACEOF
10201cat confdefs.h >>conftest.$ac_ext
10202cat >>conftest.$ac_ext <<_ACEOF
10203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010205 typedef fpos_t ac__type_sizeof_;
10206static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10207static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010210int
10211main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010212{
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
10214 FILE *f = fopen ("conftest.val", "w");
10215 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010217 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010222 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 }
10224 else
10225 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232
10233 ;
10234 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010235}
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
10237rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238if { (ac_try="$ac_link"
10239case "(($ac_try" in
10240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10241 *) ac_try_echo=$ac_try;;
10242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 { (case "(($ac_try" in
10249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10250 *) ac_try_echo=$ac_try;;
10251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 (exit $ac_status); }; }; then
10257 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259 echo "$as_me: program exited with status $ac_status" >&5
10260echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwis11437992002-04-12 09:54:03 +000010263( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010268See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010269 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 else
10271 ac_cv_sizeof_fpos_t=0
10272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275fi
10276rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010278{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10279echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280
10281
10282
Martin v. Löwis11437992002-04-12 09:54:03 +000010283cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286
Michael W. Hudson54241132001-12-07 15:38:26 +000010287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010288{ echo "$as_me:$LINENO: checking for size_t" >&5
10289echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10290if test "${ac_cv_type_size_t+set}" = set; then
10291 echo $ECHO_N "(cached) $ECHO_C" >&6
10292else
10293 cat >conftest.$ac_ext <<_ACEOF
10294/* confdefs.h. */
10295_ACEOF
10296cat confdefs.h >>conftest.$ac_ext
10297cat >>conftest.$ac_ext <<_ACEOF
10298/* end confdefs.h. */
10299$ac_includes_default
10300typedef size_t ac__type_new_;
10301int
10302main ()
10303{
10304if ((ac__type_new_ *) 0)
10305 return 0;
10306if (sizeof (ac__type_new_))
10307 return 0;
10308 ;
10309 return 0;
10310}
10311_ACEOF
10312rm -f conftest.$ac_objext
10313if { (ac_try="$ac_compile"
10314case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
10318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10319 (eval "$ac_compile") 2>conftest.er1
10320 ac_status=$?
10321 grep -v '^ *+' conftest.er1 >conftest.err
10322 rm -f conftest.er1
10323 cat conftest.err >&5
10324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10325 (exit $ac_status); } && {
10326 test -z "$ac_c_werror_flag" ||
10327 test ! -s conftest.err
10328 } && test -s conftest.$ac_objext; then
10329 ac_cv_type_size_t=yes
10330else
10331 echo "$as_me: failed program was:" >&5
10332sed 's/^/| /' conftest.$ac_ext >&5
10333
10334 ac_cv_type_size_t=no
10335fi
10336
10337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10338fi
10339{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10340echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342# The cast to long int works around a bug in the HP C Compiler
10343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10345# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010346{ echo "$as_me:$LINENO: checking size of size_t" >&5
10347echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010349 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010351 if test "$cross_compiling" = yes; then
10352 # Depending upon the size, compute the lo and hi bounds.
10353cat >conftest.$ac_ext <<_ACEOF
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
10359$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010360 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361int
10362main ()
10363{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010365test_array [0] = 0
10366
10367 ;
10368 return 0;
10369}
10370_ACEOF
10371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372if { (ac_try="$ac_compile"
10373case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010379 ac_status=$?
10380 grep -v '^ *+' conftest.er1 >conftest.err
10381 rm -f conftest.er1
10382 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384 (exit $ac_status); } && {
10385 test -z "$ac_c_werror_flag" ||
10386 test ! -s conftest.err
10387 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010388 ac_lo=0 ac_mid=0
10389 while :; do
10390 cat >conftest.$ac_ext <<_ACEOF
10391/* confdefs.h. */
10392_ACEOF
10393cat confdefs.h >>conftest.$ac_ext
10394cat >>conftest.$ac_ext <<_ACEOF
10395/* end confdefs.h. */
10396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010397 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010398int
10399main ()
10400{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010402test_array [0] = 0
10403
10404 ;
10405 return 0;
10406}
10407_ACEOF
10408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409if { (ac_try="$ac_compile"
10410case "(($ac_try" in
10411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10412 *) ac_try_echo=$ac_try;;
10413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416 ac_status=$?
10417 grep -v '^ *+' conftest.er1 >conftest.err
10418 rm -f conftest.er1
10419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421 (exit $ac_status); } && {
10422 test -z "$ac_c_werror_flag" ||
10423 test ! -s conftest.err
10424 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 ac_hi=$ac_mid; break
10426else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010427 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010428sed 's/^/| /' conftest.$ac_ext >&5
10429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 ac_lo=`expr $ac_mid + 1`
10431 if test $ac_lo -le $ac_mid; then
10432 ac_lo= ac_hi=
10433 break
10434 fi
10435 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437
10438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439 done
10440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010441 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010442sed 's/^/| /' conftest.$ac_ext >&5
10443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
10450$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010451 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452int
10453main ()
10454{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456test_array [0] = 0
10457
10458 ;
10459 return 0;
10460}
10461_ACEOF
10462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463if { (ac_try="$ac_compile"
10464case "(($ac_try" in
10465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10466 *) ac_try_echo=$ac_try;;
10467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470 ac_status=$?
10471 grep -v '^ *+' conftest.er1 >conftest.err
10472 rm -f conftest.er1
10473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475 (exit $ac_status); } && {
10476 test -z "$ac_c_werror_flag" ||
10477 test ! -s conftest.err
10478 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010479 ac_hi=-1 ac_mid=-1
10480 while :; do
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010488 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489int
10490main ()
10491{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010493test_array [0] = 0
10494
10495 ;
10496 return 0;
10497}
10498_ACEOF
10499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500if { (ac_try="$ac_compile"
10501case "(($ac_try" in
10502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10503 *) ac_try_echo=$ac_try;;
10504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507 ac_status=$?
10508 grep -v '^ *+' conftest.er1 >conftest.err
10509 rm -f conftest.er1
10510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512 (exit $ac_status); } && {
10513 test -z "$ac_c_werror_flag" ||
10514 test ! -s conftest.err
10515 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 ac_lo=$ac_mid; break
10517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010518 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519sed 's/^/| /' conftest.$ac_ext >&5
10520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 ac_hi=`expr '(' $ac_mid ')' - 1`
10522 if test $ac_mid -le $ac_hi; then
10523 ac_lo= ac_hi=
10524 break
10525 fi
10526 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528
10529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 done
10531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010532 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533sed 's/^/| /' conftest.$ac_ext >&5
10534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540
10541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010542# Binary search between lo and hi bounds.
10543while test "x$ac_lo" != "x$ac_hi"; do
10544 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10545 cat >conftest.$ac_ext <<_ACEOF
10546/* confdefs.h. */
10547_ACEOF
10548cat confdefs.h >>conftest.$ac_ext
10549cat >>conftest.$ac_ext <<_ACEOF
10550/* end confdefs.h. */
10551$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010552 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553int
10554main ()
10555{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557test_array [0] = 0
10558
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564if { (ac_try="$ac_compile"
10565case "(($ac_try" in
10566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10567 *) ac_try_echo=$ac_try;;
10568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571 ac_status=$?
10572 grep -v '^ *+' conftest.er1 >conftest.err
10573 rm -f conftest.er1
10574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576 (exit $ac_status); } && {
10577 test -z "$ac_c_werror_flag" ||
10578 test ! -s conftest.err
10579 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_hi=$ac_mid
10581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010582 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583sed 's/^/| /' conftest.$ac_ext >&5
10584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587
10588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589done
10590case $ac_lo in
10591?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010597 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598 else
10599 ac_cv_sizeof_size_t=0
10600 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601esac
10602else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 cat >conftest.$ac_ext <<_ACEOF
10604/* confdefs.h. */
10605_ACEOF
10606cat confdefs.h >>conftest.$ac_ext
10607cat >>conftest.$ac_ext <<_ACEOF
10608/* end confdefs.h. */
10609$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010610 typedef size_t ac__type_sizeof_;
10611static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10612static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613#include <stdio.h>
10614#include <stdlib.h>
10615int
10616main ()
10617{
10618
10619 FILE *f = fopen ("conftest.val", "w");
10620 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010622 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010627 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628 }
10629 else
10630 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643if { (ac_try="$ac_link"
10644case "(($ac_try" in
10645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10646 *) ac_try_echo=$ac_try;;
10647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 { (case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 (exit $ac_status); }; }; then
10662 ac_cv_sizeof_size_t=`cat conftest.val`
10663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664 echo "$as_me: program exited with status $ac_status" >&5
10665echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
10668( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010674 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 else
10676 ac_cv_sizeof_size_t=0
10677 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
10681rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010683{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10684echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685
10686
10687
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688cat >>confdefs.h <<_ACEOF
10689#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10690_ACEOF
10691
10692
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010693{ echo "$as_me:$LINENO: checking for pid_t" >&5
10694echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10695if test "${ac_cv_type_pid_t+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
10697else
10698 cat >conftest.$ac_ext <<_ACEOF
10699/* confdefs.h. */
10700_ACEOF
10701cat confdefs.h >>conftest.$ac_ext
10702cat >>conftest.$ac_ext <<_ACEOF
10703/* end confdefs.h. */
10704$ac_includes_default
10705typedef pid_t ac__type_new_;
10706int
10707main ()
10708{
10709if ((ac__type_new_ *) 0)
10710 return 0;
10711if (sizeof (ac__type_new_))
10712 return 0;
10713 ;
10714 return 0;
10715}
10716_ACEOF
10717rm -f conftest.$ac_objext
10718if { (ac_try="$ac_compile"
10719case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
10723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10724 (eval "$ac_compile") 2>conftest.er1
10725 ac_status=$?
10726 grep -v '^ *+' conftest.er1 >conftest.err
10727 rm -f conftest.er1
10728 cat conftest.err >&5
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } && {
10731 test -z "$ac_c_werror_flag" ||
10732 test ! -s conftest.err
10733 } && test -s conftest.$ac_objext; then
10734 ac_cv_type_pid_t=yes
10735else
10736 echo "$as_me: failed program was:" >&5
10737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739 ac_cv_type_pid_t=no
10740fi
10741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743fi
10744{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10745echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10746
Christian Heimes400adb02008-02-01 08:12:03 +000010747# The cast to long int works around a bug in the HP C Compiler
10748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10750# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010751{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10752echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010753if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010754 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010755else
10756 if test "$cross_compiling" = yes; then
10757 # Depending upon the size, compute the lo and hi bounds.
10758cat >conftest.$ac_ext <<_ACEOF
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
10764$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010765 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010766int
10767main ()
10768{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010770test_array [0] = 0
10771
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext
10777if { (ac_try="$ac_compile"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010783 (eval "$ac_compile") 2>conftest.er1
10784 ac_status=$?
10785 grep -v '^ *+' conftest.er1 >conftest.err
10786 rm -f conftest.er1
10787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010789 (exit $ac_status); } && {
10790 test -z "$ac_c_werror_flag" ||
10791 test ! -s conftest.err
10792 } && test -s conftest.$ac_objext; then
10793 ac_lo=0 ac_mid=0
10794 while :; do
10795 cat >conftest.$ac_ext <<_ACEOF
10796/* confdefs.h. */
10797_ACEOF
10798cat confdefs.h >>conftest.$ac_ext
10799cat >>conftest.$ac_ext <<_ACEOF
10800/* end confdefs.h. */
10801$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010802 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010803int
10804main ()
10805{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010807test_array [0] = 0
10808
10809 ;
10810 return 0;
10811}
10812_ACEOF
10813rm -f conftest.$ac_objext
10814if { (ac_try="$ac_compile"
10815case "(($ac_try" in
10816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10817 *) ac_try_echo=$ac_try;;
10818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010820 (eval "$ac_compile") 2>conftest.er1
10821 ac_status=$?
10822 grep -v '^ *+' conftest.er1 >conftest.err
10823 rm -f conftest.er1
10824 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010826 (exit $ac_status); } && {
10827 test -z "$ac_c_werror_flag" ||
10828 test ! -s conftest.err
10829 } && test -s conftest.$ac_objext; then
10830 ac_hi=$ac_mid; break
10831else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010832 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010833sed 's/^/| /' conftest.$ac_ext >&5
10834
10835 ac_lo=`expr $ac_mid + 1`
10836 if test $ac_lo -le $ac_mid; then
10837 ac_lo= ac_hi=
10838 break
10839 fi
10840 ac_mid=`expr 2 '*' $ac_mid + 1`
10841fi
10842
10843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844 done
10845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010846 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010847sed 's/^/| /' conftest.$ac_ext >&5
10848
10849 cat >conftest.$ac_ext <<_ACEOF
10850/* confdefs.h. */
10851_ACEOF
10852cat confdefs.h >>conftest.$ac_ext
10853cat >>conftest.$ac_ext <<_ACEOF
10854/* end confdefs.h. */
10855$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010856 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010857int
10858main ()
10859{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010861test_array [0] = 0
10862
10863 ;
10864 return 0;
10865}
10866_ACEOF
10867rm -f conftest.$ac_objext
10868if { (ac_try="$ac_compile"
10869case "(($ac_try" in
10870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10871 *) ac_try_echo=$ac_try;;
10872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010874 (eval "$ac_compile") 2>conftest.er1
10875 ac_status=$?
10876 grep -v '^ *+' conftest.er1 >conftest.err
10877 rm -f conftest.er1
10878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010880 (exit $ac_status); } && {
10881 test -z "$ac_c_werror_flag" ||
10882 test ! -s conftest.err
10883 } && test -s conftest.$ac_objext; then
10884 ac_hi=-1 ac_mid=-1
10885 while :; do
10886 cat >conftest.$ac_ext <<_ACEOF
10887/* confdefs.h. */
10888_ACEOF
10889cat confdefs.h >>conftest.$ac_ext
10890cat >>conftest.$ac_ext <<_ACEOF
10891/* end confdefs.h. */
10892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010893 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010894int
10895main ()
10896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010898test_array [0] = 0
10899
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904rm -f conftest.$ac_objext
10905if { (ac_try="$ac_compile"
10906case "(($ac_try" in
10907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10908 *) ac_try_echo=$ac_try;;
10909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010911 (eval "$ac_compile") 2>conftest.er1
10912 ac_status=$?
10913 grep -v '^ *+' conftest.er1 >conftest.err
10914 rm -f conftest.er1
10915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010917 (exit $ac_status); } && {
10918 test -z "$ac_c_werror_flag" ||
10919 test ! -s conftest.err
10920 } && test -s conftest.$ac_objext; then
10921 ac_lo=$ac_mid; break
10922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010923 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924sed 's/^/| /' conftest.$ac_ext >&5
10925
10926 ac_hi=`expr '(' $ac_mid ')' - 1`
10927 if test $ac_mid -le $ac_hi; then
10928 ac_lo= ac_hi=
10929 break
10930 fi
10931 ac_mid=`expr 2 '*' $ac_mid`
10932fi
10933
10934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10935 done
10936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010937 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010938sed 's/^/| /' conftest.$ac_ext >&5
10939
10940 ac_lo= ac_hi=
10941fi
10942
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944fi
10945
10946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947# Binary search between lo and hi bounds.
10948while test "x$ac_lo" != "x$ac_hi"; do
10949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10950 cat >conftest.$ac_ext <<_ACEOF
10951/* confdefs.h. */
10952_ACEOF
10953cat confdefs.h >>conftest.$ac_ext
10954cat >>conftest.$ac_ext <<_ACEOF
10955/* end confdefs.h. */
10956$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010957 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010958int
10959main ()
10960{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010962test_array [0] = 0
10963
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968rm -f conftest.$ac_objext
10969if { (ac_try="$ac_compile"
10970case "(($ac_try" in
10971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10972 *) ac_try_echo=$ac_try;;
10973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010975 (eval "$ac_compile") 2>conftest.er1
10976 ac_status=$?
10977 grep -v '^ *+' conftest.er1 >conftest.err
10978 rm -f conftest.er1
10979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010981 (exit $ac_status); } && {
10982 test -z "$ac_c_werror_flag" ||
10983 test ! -s conftest.err
10984 } && test -s conftest.$ac_objext; then
10985 ac_hi=$ac_mid
10986else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010987 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010988sed 's/^/| /' conftest.$ac_ext >&5
10989
10990 ac_lo=`expr '(' $ac_mid ')' + 1`
10991fi
10992
10993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10994done
10995case $ac_lo in
10996?*) ac_cv_sizeof_pid_t=$ac_lo;;
10997'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010999See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011001See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011002 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011003 else
11004 ac_cv_sizeof_pid_t=0
11005 fi ;;
11006esac
11007else
11008 cat >conftest.$ac_ext <<_ACEOF
11009/* confdefs.h. */
11010_ACEOF
11011cat confdefs.h >>conftest.$ac_ext
11012cat >>conftest.$ac_ext <<_ACEOF
11013/* end confdefs.h. */
11014$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011015 typedef pid_t ac__type_sizeof_;
11016static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11017static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011018#include <stdio.h>
11019#include <stdlib.h>
11020int
11021main ()
11022{
11023
11024 FILE *f = fopen ("conftest.val", "w");
11025 if (! f)
11026 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011027 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011028 {
11029 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011031 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011032 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011033 }
11034 else
11035 {
11036 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011038 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011040 }
11041 return ferror (f) || fclose (f) != 0;
11042
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047rm -f conftest$ac_exeext
11048if { (ac_try="$ac_link"
11049case "(($ac_try" in
11050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11051 *) ac_try_echo=$ac_try;;
11052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011054 (eval "$ac_link") 2>&5
11055 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11058 { (case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011063 (eval "$ac_try") 2>&5
11064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011066 (exit $ac_status); }; }; then
11067 ac_cv_sizeof_pid_t=`cat conftest.val`
11068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069 echo "$as_me: program exited with status $ac_status" >&5
11070echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073( exit $ac_status )
11074if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011076See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011078See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011079 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011080 else
11081 ac_cv_sizeof_pid_t=0
11082 fi
11083fi
11084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11085fi
11086rm -f conftest.val
11087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011088{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11089echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011090
11091
11092
11093cat >>confdefs.h <<_ACEOF
11094#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11095_ACEOF
11096
11097
Michael W. Hudson54241132001-12-07 15:38:26 +000011098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099{ echo "$as_me:$LINENO: checking for long long support" >&5
11100echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011101have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* confdefs.h. */
11104_ACEOF
11105cat confdefs.h >>conftest.$ac_ext
11106cat >>conftest.$ac_ext <<_ACEOF
11107/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108
Martin v. Löwis11437992002-04-12 09:54:03 +000011109int
11110main ()
11111{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
11117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118if { (ac_try="$ac_compile"
11119case "(($ac_try" in
11120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11121 *) ac_try_echo=$ac_try;;
11122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011126 grep -v '^ *+' conftest.er1 >conftest.err
11127 rm -f conftest.er1
11128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130 (exit $ac_status); } && {
11131 test -z "$ac_c_werror_flag" ||
11132 test ! -s conftest.err
11133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
11135
11136cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011137#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
11139
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011140 have_long_long=yes
11141
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011144sed 's/^/| /' conftest.$ac_ext >&5
11145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148
11149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011150{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11151echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011152if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153{ echo "$as_me:$LINENO: checking for long long" >&5
11154echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11155if test "${ac_cv_type_long_long+set}" = set; then
11156 echo $ECHO_N "(cached) $ECHO_C" >&6
11157else
11158 cat >conftest.$ac_ext <<_ACEOF
11159/* confdefs.h. */
11160_ACEOF
11161cat confdefs.h >>conftest.$ac_ext
11162cat >>conftest.$ac_ext <<_ACEOF
11163/* end confdefs.h. */
11164$ac_includes_default
11165typedef long long ac__type_new_;
11166int
11167main ()
11168{
11169if ((ac__type_new_ *) 0)
11170 return 0;
11171if (sizeof (ac__type_new_))
11172 return 0;
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
11178if { (ac_try="$ac_compile"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_compile") 2>conftest.er1
11185 ac_status=$?
11186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest.$ac_objext; then
11194 ac_cv_type_long_long=yes
11195else
11196 echo "$as_me: failed program was:" >&5
11197sed 's/^/| /' conftest.$ac_ext >&5
11198
11199 ac_cv_type_long_long=no
11200fi
11201
11202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11203fi
11204{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11205echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207# The cast to long int works around a bug in the HP C Compiler
11208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11210# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011211{ echo "$as_me:$LINENO: checking size of long long" >&5
11212echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011213if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 if test "$cross_compiling" = yes; then
11217 # Depending upon the size, compute the lo and hi bounds.
11218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011225 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011230test_array [0] = 0
11231
11232 ;
11233 return 0;
11234}
11235_ACEOF
11236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237if { (ac_try="$ac_compile"
11238case "(($ac_try" in
11239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11240 *) ac_try_echo=$ac_try;;
11241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011245 grep -v '^ *+' conftest.er1 >conftest.err
11246 rm -f conftest.er1
11247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249 (exit $ac_status); } && {
11250 test -z "$ac_c_werror_flag" ||
11251 test ! -s conftest.err
11252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_lo=0 ac_mid=0
11254 while :; do
11255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* confdefs.h. */
11257_ACEOF
11258cat confdefs.h >>conftest.$ac_ext
11259cat >>conftest.$ac_ext <<_ACEOF
11260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011262 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011267test_array [0] = 0
11268
11269 ;
11270 return 0;
11271}
11272_ACEOF
11273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274if { (ac_try="$ac_compile"
11275case "(($ac_try" in
11276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11277 *) ac_try_echo=$ac_try;;
11278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011282 grep -v '^ *+' conftest.er1 >conftest.err
11283 rm -f conftest.er1
11284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286 (exit $ac_status); } && {
11287 test -z "$ac_c_werror_flag" ||
11288 test ! -s conftest.err
11289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_hi=$ac_mid; break
11291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011293sed 's/^/| /' conftest.$ac_ext >&5
11294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 ac_lo=`expr $ac_mid + 1`
11296 if test $ac_lo -le $ac_mid; then
11297 ac_lo= ac_hi=
11298 break
11299 fi
11300 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302
11303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 done
11305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011315$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011316 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011317int
11318main ()
11319{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011321test_array [0] = 0
11322
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328if { (ac_try="$ac_compile"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ac_hi=-1 ac_mid=-1
11345 while :; do
11346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011352$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011353 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011358test_array [0] = 0
11359
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365if { (ac_try="$ac_compile"
11366case "(($ac_try" in
11367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11368 *) ac_try_echo=$ac_try;;
11369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011373 grep -v '^ *+' conftest.er1 >conftest.err
11374 rm -f conftest.er1
11375 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377 (exit $ac_status); } && {
11378 test -z "$ac_c_werror_flag" ||
11379 test ! -s conftest.err
11380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_lo=$ac_mid; break
11382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011384sed 's/^/| /' conftest.$ac_ext >&5
11385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 ac_hi=`expr '(' $ac_mid ')' - 1`
11387 if test $ac_mid -le $ac_hi; then
11388 ac_lo= ac_hi=
11389 break
11390 fi
11391 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393
11394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 done
11396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011398sed 's/^/| /' conftest.$ac_ext >&5
11399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405
11406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011407# Binary search between lo and hi bounds.
11408while test "x$ac_lo" != "x$ac_hi"; do
11409 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011417 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011418int
11419main ()
11420{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011422test_array [0] = 0
11423
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429if { (ac_try="$ac_compile"
11430case "(($ac_try" in
11431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11432 *) ac_try_echo=$ac_try;;
11433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011437 grep -v '^ *+' conftest.er1 >conftest.err
11438 rm -f conftest.er1
11439 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441 (exit $ac_status); } && {
11442 test -z "$ac_c_werror_flag" ||
11443 test ! -s conftest.err
11444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_hi=$ac_mid
11446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011448sed 's/^/| /' conftest.$ac_ext >&5
11449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452
11453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454done
11455case $ac_lo in
11456?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463 else
11464 ac_cv_sizeof_long_long=0
11465 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011466esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011475 typedef long long ac__type_sizeof_;
11476static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11477static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011482{
Martin v. Löwis11437992002-04-12 09:54:03 +000011483
11484 FILE *f = fopen ("conftest.val", "w");
11485 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011487 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011492 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 }
11494 else
11495 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
11503 ;
11504 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011505}
Martin v. Löwis11437992002-04-12 09:54:03 +000011506_ACEOF
11507rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508if { (ac_try="$ac_link"
11509case "(($ac_try" in
11510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11511 *) ac_try_echo=$ac_try;;
11512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 { (case "(($ac_try" in
11519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11520 *) ac_try_echo=$ac_try;;
11521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 (exit $ac_status); }; }; then
11527 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529 echo "$as_me: program exited with status $ac_status" >&5
11530echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011538See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011539 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 else
11541 ac_cv_sizeof_long_long=0
11542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011545fi
11546rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011548{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11549echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550
11551
11552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011555_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556
Michael W. Hudson54241132001-12-07 15:38:26 +000011557
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
11559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011560{ echo "$as_me:$LINENO: checking for long double support" >&5
11561echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011562have_long_double=no
11563cat >conftest.$ac_ext <<_ACEOF
11564/* confdefs.h. */
11565_ACEOF
11566cat confdefs.h >>conftest.$ac_ext
11567cat >>conftest.$ac_ext <<_ACEOF
11568/* end confdefs.h. */
11569
11570int
11571main ()
11572{
11573long double x; x = (long double)0;
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
11579if { (ac_try="$ac_compile"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011585 (eval "$ac_compile") 2>conftest.er1
11586 ac_status=$?
11587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011591 (exit $ac_status); } && {
11592 test -z "$ac_c_werror_flag" ||
11593 test ! -s conftest.err
11594 } && test -s conftest.$ac_objext; then
11595
11596
11597cat >>confdefs.h <<\_ACEOF
11598#define HAVE_LONG_DOUBLE 1
11599_ACEOF
11600
11601 have_long_double=yes
11602
11603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
11607
11608fi
11609
11610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011611{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11612echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011613if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011614{ echo "$as_me:$LINENO: checking for long double" >&5
11615echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11616if test "${ac_cv_type_long_double+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
11619 cat >conftest.$ac_ext <<_ACEOF
11620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
11625$ac_includes_default
11626typedef long double ac__type_new_;
11627int
11628main ()
11629{
11630if ((ac__type_new_ *) 0)
11631 return 0;
11632if (sizeof (ac__type_new_))
11633 return 0;
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
11639if { (ac_try="$ac_compile"
11640case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
11644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11645 (eval "$ac_compile") 2>conftest.er1
11646 ac_status=$?
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } && {
11652 test -z "$ac_c_werror_flag" ||
11653 test ! -s conftest.err
11654 } && test -s conftest.$ac_objext; then
11655 ac_cv_type_long_double=yes
11656else
11657 echo "$as_me: failed program was:" >&5
11658sed 's/^/| /' conftest.$ac_ext >&5
11659
11660 ac_cv_type_long_double=no
11661fi
11662
11663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11664fi
11665{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11666echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11667
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011668# The cast to long int works around a bug in the HP C Compiler
11669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11671# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011672{ echo "$as_me:$LINENO: checking size of long double" >&5
11673echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011675 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676else
11677 if test "$cross_compiling" = yes; then
11678 # Depending upon the size, compute the lo and hi bounds.
11679cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011686 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687int
11688main ()
11689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011691test_array [0] = 0
11692
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext
11698if { (ac_try="$ac_compile"
11699case "(($ac_try" in
11700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11701 *) ac_try_echo=$ac_try;;
11702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011704 (eval "$ac_compile") 2>conftest.er1
11705 ac_status=$?
11706 grep -v '^ *+' conftest.er1 >conftest.err
11707 rm -f conftest.er1
11708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011710 (exit $ac_status); } && {
11711 test -z "$ac_c_werror_flag" ||
11712 test ! -s conftest.err
11713 } && test -s conftest.$ac_objext; then
11714 ac_lo=0 ac_mid=0
11715 while :; do
11716 cat >conftest.$ac_ext <<_ACEOF
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
11722$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011723 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011724int
11725main ()
11726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011728test_array [0] = 0
11729
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734rm -f conftest.$ac_objext
11735if { (ac_try="$ac_compile"
11736case "(($ac_try" in
11737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11738 *) ac_try_echo=$ac_try;;
11739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741 (eval "$ac_compile") 2>conftest.er1
11742 ac_status=$?
11743 grep -v '^ *+' conftest.er1 >conftest.err
11744 rm -f conftest.er1
11745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011747 (exit $ac_status); } && {
11748 test -z "$ac_c_werror_flag" ||
11749 test ! -s conftest.err
11750 } && test -s conftest.$ac_objext; then
11751 ac_hi=$ac_mid; break
11752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011753 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754sed 's/^/| /' conftest.$ac_ext >&5
11755
11756 ac_lo=`expr $ac_mid + 1`
11757 if test $ac_lo -le $ac_mid; then
11758 ac_lo= ac_hi=
11759 break
11760 fi
11761 ac_mid=`expr 2 '*' $ac_mid + 1`
11762fi
11763
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765 done
11766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011767 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768sed 's/^/| /' conftest.$ac_ext >&5
11769
11770 cat >conftest.$ac_ext <<_ACEOF
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
11776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011777 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011778int
11779main ()
11780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011782test_array [0] = 0
11783
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext
11789if { (ac_try="$ac_compile"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795 (eval "$ac_compile") 2>conftest.er1
11796 ac_status=$?
11797 grep -v '^ *+' conftest.er1 >conftest.err
11798 rm -f conftest.er1
11799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011801 (exit $ac_status); } && {
11802 test -z "$ac_c_werror_flag" ||
11803 test ! -s conftest.err
11804 } && test -s conftest.$ac_objext; then
11805 ac_hi=-1 ac_mid=-1
11806 while :; do
11807 cat >conftest.$ac_ext <<_ACEOF
11808/* confdefs.h. */
11809_ACEOF
11810cat confdefs.h >>conftest.$ac_ext
11811cat >>conftest.$ac_ext <<_ACEOF
11812/* end confdefs.h. */
11813$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011814 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011815int
11816main ()
11817{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011819test_array [0] = 0
11820
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825rm -f conftest.$ac_objext
11826if { (ac_try="$ac_compile"
11827case "(($ac_try" in
11828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11829 *) ac_try_echo=$ac_try;;
11830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011832 (eval "$ac_compile") 2>conftest.er1
11833 ac_status=$?
11834 grep -v '^ *+' conftest.er1 >conftest.err
11835 rm -f conftest.er1
11836 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011838 (exit $ac_status); } && {
11839 test -z "$ac_c_werror_flag" ||
11840 test ! -s conftest.err
11841 } && test -s conftest.$ac_objext; then
11842 ac_lo=$ac_mid; break
11843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011844 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845sed 's/^/| /' conftest.$ac_ext >&5
11846
11847 ac_hi=`expr '(' $ac_mid ')' - 1`
11848 if test $ac_mid -le $ac_hi; then
11849 ac_lo= ac_hi=
11850 break
11851 fi
11852 ac_mid=`expr 2 '*' $ac_mid`
11853fi
11854
11855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11856 done
11857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011858 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859sed 's/^/| /' conftest.$ac_ext >&5
11860
11861 ac_lo= ac_hi=
11862fi
11863
11864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11865fi
11866
11867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868# Binary search between lo and hi bounds.
11869while test "x$ac_lo" != "x$ac_hi"; do
11870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11871 cat >conftest.$ac_ext <<_ACEOF
11872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
11877$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011878 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879int
11880main ()
11881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011883test_array [0] = 0
11884
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889rm -f conftest.$ac_objext
11890if { (ac_try="$ac_compile"
11891case "(($ac_try" in
11892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893 *) ac_try_echo=$ac_try;;
11894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011896 (eval "$ac_compile") 2>conftest.er1
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011902 (exit $ac_status); } && {
11903 test -z "$ac_c_werror_flag" ||
11904 test ! -s conftest.err
11905 } && test -s conftest.$ac_objext; then
11906 ac_hi=$ac_mid
11907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011908 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011909sed 's/^/| /' conftest.$ac_ext >&5
11910
11911 ac_lo=`expr '(' $ac_mid ')' + 1`
11912fi
11913
11914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915done
11916case $ac_lo in
11917?*) ac_cv_sizeof_long_double=$ac_lo;;
11918'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011923 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011924 else
11925 ac_cv_sizeof_long_double=0
11926 fi ;;
11927esac
11928else
11929 cat >conftest.$ac_ext <<_ACEOF
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
11935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011936 typedef long double ac__type_sizeof_;
11937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011939#include <stdio.h>
11940#include <stdlib.h>
11941int
11942main ()
11943{
11944
11945 FILE *f = fopen ("conftest.val", "w");
11946 if (! f)
11947 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011949 {
11950 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011953 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 }
11955 else
11956 {
11957 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 }
11962 return ferror (f) || fclose (f) != 0;
11963
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest$ac_exeext
11969if { (ac_try="$ac_link"
11970case "(($ac_try" in
11971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11972 *) ac_try_echo=$ac_try;;
11973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975 (eval "$ac_link") 2>&5
11976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11979 { (case "(($ac_try" in
11980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11981 *) ac_try_echo=$ac_try;;
11982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984 (eval "$ac_try") 2>&5
11985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987 (exit $ac_status); }; }; then
11988 ac_cv_sizeof_long_double=`cat conftest.val`
11989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990 echo "$as_me: program exited with status $ac_status" >&5
11991echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994( exit $ac_status )
11995if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012000 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001 else
12002 ac_cv_sizeof_long_double=0
12003 fi
12004fi
12005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12006fi
12007rm -f conftest.val
12008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12010echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012011
12012
12013
12014cat >>confdefs.h <<_ACEOF
12015#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12016_ACEOF
12017
12018
12019fi
12020
12021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12023echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012024have_c99_bool=no
12025cat >conftest.$ac_ext <<_ACEOF
12026/* confdefs.h. */
12027_ACEOF
12028cat confdefs.h >>conftest.$ac_ext
12029cat >>conftest.$ac_ext <<_ACEOF
12030/* end confdefs.h. */
12031
12032int
12033main ()
12034{
12035_Bool x; x = (_Bool)0;
12036 ;
12037 return 0;
12038}
12039_ACEOF
12040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041if { (ac_try="$ac_compile"
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012048 ac_status=$?
12049 grep -v '^ *+' conftest.er1 >conftest.err
12050 rm -f conftest.er1
12051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053 (exit $ac_status); } && {
12054 test -z "$ac_c_werror_flag" ||
12055 test ! -s conftest.err
12056 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012057
12058
12059cat >>confdefs.h <<\_ACEOF
12060#define HAVE_C99_BOOL 1
12061_ACEOF
12062
12063 have_c99_bool=yes
12064
12065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012066 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
Thomas Woutersb2137042007-02-01 18:02:27 +000012070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071
12072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012073{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12074echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012075if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076{ echo "$as_me:$LINENO: checking for _Bool" >&5
12077echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12078if test "${ac_cv_type__Bool+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
12080else
12081 cat >conftest.$ac_ext <<_ACEOF
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
12087$ac_includes_default
12088typedef _Bool ac__type_new_;
12089int
12090main ()
12091{
12092if ((ac__type_new_ *) 0)
12093 return 0;
12094if (sizeof (ac__type_new_))
12095 return 0;
12096 ;
12097 return 0;
12098}
12099_ACEOF
12100rm -f conftest.$ac_objext
12101if { (ac_try="$ac_compile"
12102case "(($ac_try" in
12103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12104 *) ac_try_echo=$ac_try;;
12105esac
12106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12107 (eval "$ac_compile") 2>conftest.er1
12108 ac_status=$?
12109 grep -v '^ *+' conftest.er1 >conftest.err
12110 rm -f conftest.er1
12111 cat conftest.err >&5
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); } && {
12114 test -z "$ac_c_werror_flag" ||
12115 test ! -s conftest.err
12116 } && test -s conftest.$ac_objext; then
12117 ac_cv_type__Bool=yes
12118else
12119 echo "$as_me: failed program was:" >&5
12120sed 's/^/| /' conftest.$ac_ext >&5
12121
12122 ac_cv_type__Bool=no
12123fi
12124
12125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12126fi
12127{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12128echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130# The cast to long int works around a bug in the HP C Compiler
12131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12133# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012134{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12135echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012136if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012137 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012138else
12139 if test "$cross_compiling" = yes; then
12140 # Depending upon the size, compute the lo and hi bounds.
12141cat >conftest.$ac_ext <<_ACEOF
12142/* confdefs.h. */
12143_ACEOF
12144cat confdefs.h >>conftest.$ac_ext
12145cat >>conftest.$ac_ext <<_ACEOF
12146/* end confdefs.h. */
12147$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012148 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012149int
12150main ()
12151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012153test_array [0] = 0
12154
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160if { (ac_try="$ac_compile"
12161case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012167 ac_status=$?
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012176 ac_lo=0 ac_mid=0
12177 while :; do
12178 cat >conftest.$ac_ext <<_ACEOF
12179/* confdefs.h. */
12180_ACEOF
12181cat confdefs.h >>conftest.$ac_ext
12182cat >>conftest.$ac_ext <<_ACEOF
12183/* end confdefs.h. */
12184$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012185 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012186int
12187main ()
12188{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012190test_array [0] = 0
12191
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197if { (ac_try="$ac_compile"
12198case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012204 ac_status=$?
12205 grep -v '^ *+' conftest.er1 >conftest.err
12206 rm -f conftest.er1
12207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209 (exit $ac_status); } && {
12210 test -z "$ac_c_werror_flag" ||
12211 test ! -s conftest.err
12212 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012213 ac_hi=$ac_mid; break
12214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012215 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012216sed 's/^/| /' conftest.$ac_ext >&5
12217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 ac_lo=`expr $ac_mid + 1`
12219 if test $ac_lo -le $ac_mid; then
12220 ac_lo= ac_hi=
12221 break
12222 fi
12223 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225
12226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012227 done
12228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012229 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012230sed 's/^/| /' conftest.$ac_ext >&5
12231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012233/* confdefs.h. */
12234_ACEOF
12235cat confdefs.h >>conftest.$ac_ext
12236cat >>conftest.$ac_ext <<_ACEOF
12237/* end confdefs.h. */
12238$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012239 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012240int
12241main ()
12242{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012244test_array [0] = 0
12245
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251if { (ac_try="$ac_compile"
12252case "(($ac_try" in
12253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12254 *) ac_try_echo=$ac_try;;
12255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012258 ac_status=$?
12259 grep -v '^ *+' conftest.er1 >conftest.err
12260 rm -f conftest.er1
12261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263 (exit $ac_status); } && {
12264 test -z "$ac_c_werror_flag" ||
12265 test ! -s conftest.err
12266 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012267 ac_hi=-1 ac_mid=-1
12268 while :; do
12269 cat >conftest.$ac_ext <<_ACEOF
12270/* confdefs.h. */
12271_ACEOF
12272cat confdefs.h >>conftest.$ac_ext
12273cat >>conftest.$ac_ext <<_ACEOF
12274/* end confdefs.h. */
12275$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012276 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012277int
12278main ()
12279{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012281test_array [0] = 0
12282
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288if { (ac_try="$ac_compile"
12289case "(($ac_try" in
12290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12291 *) ac_try_echo=$ac_try;;
12292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012295 ac_status=$?
12296 grep -v '^ *+' conftest.er1 >conftest.err
12297 rm -f conftest.er1
12298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300 (exit $ac_status); } && {
12301 test -z "$ac_c_werror_flag" ||
12302 test ! -s conftest.err
12303 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012304 ac_lo=$ac_mid; break
12305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012306 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012307sed 's/^/| /' conftest.$ac_ext >&5
12308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 ac_hi=`expr '(' $ac_mid ')' - 1`
12310 if test $ac_mid -le $ac_hi; then
12311 ac_lo= ac_hi=
12312 break
12313 fi
12314 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316
12317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012318 done
12319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012320 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012321sed 's/^/| /' conftest.$ac_ext >&5
12322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012330# Binary search between lo and hi bounds.
12331while test "x$ac_lo" != "x$ac_hi"; do
12332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12333 cat >conftest.$ac_ext <<_ACEOF
12334/* confdefs.h. */
12335_ACEOF
12336cat confdefs.h >>conftest.$ac_ext
12337cat >>conftest.$ac_ext <<_ACEOF
12338/* end confdefs.h. */
12339$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012340 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012341int
12342main ()
12343{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012344static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012345test_array [0] = 0
12346
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352if { (ac_try="$ac_compile"
12353case "(($ac_try" in
12354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12355 *) ac_try_echo=$ac_try;;
12356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012359 ac_status=$?
12360 grep -v '^ *+' conftest.er1 >conftest.err
12361 rm -f conftest.er1
12362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364 (exit $ac_status); } && {
12365 test -z "$ac_c_werror_flag" ||
12366 test ! -s conftest.err
12367 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012368 ac_hi=$ac_mid
12369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012370 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012371sed 's/^/| /' conftest.$ac_ext >&5
12372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375
12376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012377done
12378case $ac_lo in
12379?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012382See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012384See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012385 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386 else
12387 ac_cv_sizeof__Bool=0
12388 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012389esac
12390else
12391 cat >conftest.$ac_ext <<_ACEOF
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
12397$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012398 typedef _Bool ac__type_sizeof_;
12399static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12400static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012401#include <stdio.h>
12402#include <stdlib.h>
12403int
12404main ()
12405{
12406
12407 FILE *f = fopen ("conftest.val", "w");
12408 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012410 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012411 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012415 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012416 }
12417 else
12418 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012423 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012425
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431if { (ac_try="$ac_link"
12432case "(($ac_try" in
12433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12434 *) ac_try_echo=$ac_try;;
12435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 { (case "(($ac_try" in
12442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12443 *) ac_try_echo=$ac_try;;
12444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 (exit $ac_status); }; }; then
12450 ac_cv_sizeof__Bool=`cat conftest.val`
12451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452 echo "$as_me: program exited with status $ac_status" >&5
12453echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454sed 's/^/| /' conftest.$ac_ext >&5
12455
12456( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012459See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012461See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012462 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 else
12464 ac_cv_sizeof__Bool=0
12465 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012468fi
12469rm -f conftest.val
12470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012471{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12472echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473
12474
12475
Thomas Woutersb2137042007-02-01 18:02:27 +000012476cat >>confdefs.h <<_ACEOF
12477#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12478_ACEOF
12479
12480
12481fi
12482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012483{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12484echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012485if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012486 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012487else
12488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* confdefs.h. */
12490_ACEOF
12491cat confdefs.h >>conftest.$ac_ext
12492cat >>conftest.$ac_ext <<_ACEOF
12493/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012494#ifdef HAVE_STDINT_H
12495 #include <stdint.h>
12496 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012498typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012502if ((ac__type_new_ *) 0)
12503 return 0;
12504if (sizeof (ac__type_new_))
12505 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511if { (ac_try="$ac_compile"
12512case "(($ac_try" in
12513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12514 *) ac_try_echo=$ac_try;;
12515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012519 grep -v '^ *+' conftest.er1 >conftest.err
12520 rm -f conftest.er1
12521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 (exit $ac_status); } && {
12524 test -z "$ac_c_werror_flag" ||
12525 test ! -s conftest.err
12526 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012530sed 's/^/| /' conftest.$ac_ext >&5
12531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012532 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534
12535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012537{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12538echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12539if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012540
12541cat >>confdefs.h <<_ACEOF
12542#define HAVE_UINTPTR_T 1
12543_ACEOF
12544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012545{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12546echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12547if test "${ac_cv_type_uintptr_t+set}" = set; then
12548 echo $ECHO_N "(cached) $ECHO_C" >&6
12549else
12550 cat >conftest.$ac_ext <<_ACEOF
12551/* confdefs.h. */
12552_ACEOF
12553cat confdefs.h >>conftest.$ac_ext
12554cat >>conftest.$ac_ext <<_ACEOF
12555/* end confdefs.h. */
12556$ac_includes_default
12557typedef uintptr_t ac__type_new_;
12558int
12559main ()
12560{
12561if ((ac__type_new_ *) 0)
12562 return 0;
12563if (sizeof (ac__type_new_))
12564 return 0;
12565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
12570if { (ac_try="$ac_compile"
12571case "(($ac_try" in
12572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12573 *) ac_try_echo=$ac_try;;
12574esac
12575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12576 (eval "$ac_compile") 2>conftest.er1
12577 ac_status=$?
12578 grep -v '^ *+' conftest.er1 >conftest.err
12579 rm -f conftest.er1
12580 cat conftest.err >&5
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); } && {
12583 test -z "$ac_c_werror_flag" ||
12584 test ! -s conftest.err
12585 } && test -s conftest.$ac_objext; then
12586 ac_cv_type_uintptr_t=yes
12587else
12588 echo "$as_me: failed program was:" >&5
12589sed 's/^/| /' conftest.$ac_ext >&5
12590
12591 ac_cv_type_uintptr_t=no
12592fi
12593
12594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12595fi
12596{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12597echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599# The cast to long int works around a bug in the HP C Compiler
12600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12602# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012603{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12604echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012605if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 if test "$cross_compiling" = yes; then
12609 # Depending upon the size, compute the lo and hi bounds.
12610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012617 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012622test_array [0] = 0
12623
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629if { (ac_try="$ac_compile"
12630case "(($ac_try" in
12631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12632 *) ac_try_echo=$ac_try;;
12633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012637 grep -v '^ *+' conftest.er1 >conftest.err
12638 rm -f conftest.er1
12639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 (exit $ac_status); } && {
12642 test -z "$ac_c_werror_flag" ||
12643 test ! -s conftest.err
12644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_lo=0 ac_mid=0
12646 while :; do
12647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012654 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012659test_array [0] = 0
12660
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666if { (ac_try="$ac_compile"
12667case "(($ac_try" in
12668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12669 *) ac_try_echo=$ac_try;;
12670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012674 grep -v '^ *+' conftest.er1 >conftest.err
12675 rm -f conftest.er1
12676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678 (exit $ac_status); } && {
12679 test -z "$ac_c_werror_flag" ||
12680 test ! -s conftest.err
12681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_hi=$ac_mid; break
12683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012685sed 's/^/| /' conftest.$ac_ext >&5
12686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 ac_lo=`expr $ac_mid + 1`
12688 if test $ac_lo -le $ac_mid; then
12689 ac_lo= ac_hi=
12690 break
12691 fi
12692 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694
12695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 done
12697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012699sed 's/^/| /' conftest.$ac_ext >&5
12700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012708 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012713test_array [0] = 0
12714
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720if { (ac_try="$ac_compile"
12721case "(($ac_try" in
12722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12723 *) ac_try_echo=$ac_try;;
12724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012728 grep -v '^ *+' conftest.er1 >conftest.err
12729 rm -f conftest.er1
12730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732 (exit $ac_status); } && {
12733 test -z "$ac_c_werror_flag" ||
12734 test ! -s conftest.err
12735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ac_hi=-1 ac_mid=-1
12737 while :; do
12738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* confdefs.h. */
12740_ACEOF
12741cat confdefs.h >>conftest.$ac_ext
12742cat >>conftest.$ac_ext <<_ACEOF
12743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012745 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012750test_array [0] = 0
12751
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757if { (ac_try="$ac_compile"
12758case "(($ac_try" in
12759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12760 *) ac_try_echo=$ac_try;;
12761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012765 grep -v '^ *+' conftest.er1 >conftest.err
12766 rm -f conftest.er1
12767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769 (exit $ac_status); } && {
12770 test -z "$ac_c_werror_flag" ||
12771 test ! -s conftest.err
12772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_lo=$ac_mid; break
12774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012776sed 's/^/| /' conftest.$ac_ext >&5
12777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 ac_hi=`expr '(' $ac_mid ')' - 1`
12779 if test $ac_mid -le $ac_hi; then
12780 ac_lo= ac_hi=
12781 break
12782 fi
12783 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785
12786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 done
12788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012790sed 's/^/| /' conftest.$ac_ext >&5
12791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797
12798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012799# Binary search between lo and hi bounds.
12800while test "x$ac_lo" != "x$ac_hi"; do
12801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* confdefs.h. */
12804_ACEOF
12805cat confdefs.h >>conftest.$ac_ext
12806cat >>conftest.$ac_ext <<_ACEOF
12807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012809 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012814test_array [0] = 0
12815
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821if { (ac_try="$ac_compile"
12822case "(($ac_try" in
12823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12824 *) ac_try_echo=$ac_try;;
12825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012829 grep -v '^ *+' conftest.er1 >conftest.err
12830 rm -f conftest.er1
12831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833 (exit $ac_status); } && {
12834 test -z "$ac_c_werror_flag" ||
12835 test ! -s conftest.err
12836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_hi=$ac_mid
12838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012840sed 's/^/| /' conftest.$ac_ext >&5
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846done
12847case $ac_lo in
12848?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012854 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855 else
12856 ac_cv_sizeof_uintptr_t=0
12857 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012858esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* confdefs.h. */
12862_ACEOF
12863cat confdefs.h >>conftest.$ac_ext
12864cat >>conftest.$ac_ext <<_ACEOF
12865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012867 typedef uintptr_t ac__type_sizeof_;
12868static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12869static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872int
12873main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012874{
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
12876 FILE *f = fopen ("conftest.val", "w");
12877 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012879 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012884 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 }
12886 else
12887 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
12895 ;
12896 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012897}
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
12899rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900if { (ac_try="$ac_link"
12901case "(($ac_try" in
12902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12903 *) ac_try_echo=$ac_try;;
12904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 { (case "(($ac_try" in
12911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12912 *) ac_try_echo=$ac_try;;
12913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 (exit $ac_status); }; }; then
12919 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921 echo "$as_me: program exited with status $ac_status" >&5
12922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012923sed 's/^/| /' conftest.$ac_ext >&5
12924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012928See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012930See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012931 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 else
12933 ac_cv_sizeof_uintptr_t=0
12934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012937fi
12938rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012940{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12941echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942
12943
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012947_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948
Michael W. Hudson54241132001-12-07 15:38:26 +000012949
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
12951
Thomas Wouters89f507f2006-12-13 04:49:30 +000012952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953{ echo "$as_me:$LINENO: checking for off_t" >&5
12954echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12955if test "${ac_cv_type_off_t+set}" = set; then
12956 echo $ECHO_N "(cached) $ECHO_C" >&6
12957else
12958 cat >conftest.$ac_ext <<_ACEOF
12959/* confdefs.h. */
12960_ACEOF
12961cat confdefs.h >>conftest.$ac_ext
12962cat >>conftest.$ac_ext <<_ACEOF
12963/* end confdefs.h. */
12964
12965#ifdef HAVE_SYS_TYPES_H
12966#include <sys/types.h>
12967#endif
12968
12969
12970typedef off_t ac__type_new_;
12971int
12972main ()
12973{
12974if ((ac__type_new_ *) 0)
12975 return 0;
12976if (sizeof (ac__type_new_))
12977 return 0;
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
12983if { (ac_try="$ac_compile"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
12988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12989 (eval "$ac_compile") 2>conftest.er1
12990 ac_status=$?
12991 grep -v '^ *+' conftest.er1 >conftest.err
12992 rm -f conftest.er1
12993 cat conftest.err >&5
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } && {
12996 test -z "$ac_c_werror_flag" ||
12997 test ! -s conftest.err
12998 } && test -s conftest.$ac_objext; then
12999 ac_cv_type_off_t=yes
13000else
13001 echo "$as_me: failed program was:" >&5
13002sed 's/^/| /' conftest.$ac_ext >&5
13003
13004 ac_cv_type_off_t=no
13005fi
13006
13007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13008fi
13009{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13010echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012# The cast to long int works around a bug in the HP C Compiler
13013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13015# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013016{ echo "$as_me:$LINENO: checking size of off_t" >&5
13017echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013019 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013020else
13021 if test "$cross_compiling" = yes; then
13022 # Depending upon the size, compute the lo and hi bounds.
13023cat >conftest.$ac_ext <<_ACEOF
13024/* confdefs.h. */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h. */
13029
13030#ifdef HAVE_SYS_TYPES_H
13031#include <sys/types.h>
13032#endif
13033
13034
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013035 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036int
13037main ()
13038{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013040test_array [0] = 0
13041
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046rm -f conftest.$ac_objext
13047if { (ac_try="$ac_compile"
13048case "(($ac_try" in
13049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13050 *) ac_try_echo=$ac_try;;
13051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013053 (eval "$ac_compile") 2>conftest.er1
13054 ac_status=$?
13055 grep -v '^ *+' conftest.er1 >conftest.err
13056 rm -f conftest.er1
13057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013059 (exit $ac_status); } && {
13060 test -z "$ac_c_werror_flag" ||
13061 test ! -s conftest.err
13062 } && test -s conftest.$ac_objext; then
13063 ac_lo=0 ac_mid=0
13064 while :; do
13065 cat >conftest.$ac_ext <<_ACEOF
13066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
13071
13072#ifdef HAVE_SYS_TYPES_H
13073#include <sys/types.h>
13074#endif
13075
13076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013077 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078int
13079main ()
13080{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013081static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013082test_array [0] = 0
13083
13084 ;
13085 return 0;
13086}
13087_ACEOF
13088rm -f conftest.$ac_objext
13089if { (ac_try="$ac_compile"
13090case "(($ac_try" in
13091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13092 *) ac_try_echo=$ac_try;;
13093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013095 (eval "$ac_compile") 2>conftest.er1
13096 ac_status=$?
13097 grep -v '^ *+' conftest.er1 >conftest.err
13098 rm -f conftest.er1
13099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101 (exit $ac_status); } && {
13102 test -z "$ac_c_werror_flag" ||
13103 test ! -s conftest.err
13104 } && test -s conftest.$ac_objext; then
13105 ac_hi=$ac_mid; break
13106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013107 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108sed 's/^/| /' conftest.$ac_ext >&5
13109
13110 ac_lo=`expr $ac_mid + 1`
13111 if test $ac_lo -le $ac_mid; then
13112 ac_lo= ac_hi=
13113 break
13114 fi
13115 ac_mid=`expr 2 '*' $ac_mid + 1`
13116fi
13117
13118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13119 done
13120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122sed 's/^/| /' conftest.$ac_ext >&5
13123
13124 cat >conftest.$ac_ext <<_ACEOF
13125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
13130
13131#ifdef HAVE_SYS_TYPES_H
13132#include <sys/types.h>
13133#endif
13134
13135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137int
13138main ()
13139{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141test_array [0] = 0
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147rm -f conftest.$ac_objext
13148if { (ac_try="$ac_compile"
13149case "(($ac_try" in
13150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13151 *) ac_try_echo=$ac_try;;
13152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013154 (eval "$ac_compile") 2>conftest.er1
13155 ac_status=$?
13156 grep -v '^ *+' conftest.er1 >conftest.err
13157 rm -f conftest.er1
13158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160 (exit $ac_status); } && {
13161 test -z "$ac_c_werror_flag" ||
13162 test ! -s conftest.err
13163 } && test -s conftest.$ac_objext; then
13164 ac_hi=-1 ac_mid=-1
13165 while :; do
13166 cat >conftest.$ac_ext <<_ACEOF
13167/* confdefs.h. */
13168_ACEOF
13169cat confdefs.h >>conftest.$ac_ext
13170cat >>conftest.$ac_ext <<_ACEOF
13171/* end confdefs.h. */
13172
13173#ifdef HAVE_SYS_TYPES_H
13174#include <sys/types.h>
13175#endif
13176
13177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179int
13180main ()
13181{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183test_array [0] = 0
13184
13185 ;
13186 return 0;
13187}
13188_ACEOF
13189rm -f conftest.$ac_objext
13190if { (ac_try="$ac_compile"
13191case "(($ac_try" in
13192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13193 *) ac_try_echo=$ac_try;;
13194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196 (eval "$ac_compile") 2>conftest.er1
13197 ac_status=$?
13198 grep -v '^ *+' conftest.er1 >conftest.err
13199 rm -f conftest.er1
13200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 (exit $ac_status); } && {
13203 test -z "$ac_c_werror_flag" ||
13204 test ! -s conftest.err
13205 } && test -s conftest.$ac_objext; then
13206 ac_lo=$ac_mid; break
13207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013208 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209sed 's/^/| /' conftest.$ac_ext >&5
13210
13211 ac_hi=`expr '(' $ac_mid ')' - 1`
13212 if test $ac_mid -le $ac_hi; then
13213 ac_lo= ac_hi=
13214 break
13215 fi
13216 ac_mid=`expr 2 '*' $ac_mid`
13217fi
13218
13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220 done
13221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223sed 's/^/| /' conftest.$ac_ext >&5
13224
13225 ac_lo= ac_hi=
13226fi
13227
13228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229fi
13230
13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232# Binary search between lo and hi bounds.
13233while test "x$ac_lo" != "x$ac_hi"; do
13234 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13235 cat >conftest.$ac_ext <<_ACEOF
13236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
13241
13242#ifdef HAVE_SYS_TYPES_H
13243#include <sys/types.h>
13244#endif
13245
13246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248int
13249main ()
13250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252test_array [0] = 0
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 (eval "$ac_compile") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
13275 ac_hi=$ac_mid
13276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013277 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_lo=`expr '(' $ac_mid ')' + 1`
13281fi
13282
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284done
13285case $ac_lo in
13286?*) ac_cv_sizeof_off_t=$ac_lo;;
13287'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013290echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013292 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293 else
13294 ac_cv_sizeof_off_t=0
13295 fi ;;
13296esac
13297else
13298 cat >conftest.$ac_ext <<_ACEOF
13299/* confdefs.h. */
13300_ACEOF
13301cat confdefs.h >>conftest.$ac_ext
13302cat >>conftest.$ac_ext <<_ACEOF
13303/* end confdefs.h. */
13304
13305#ifdef HAVE_SYS_TYPES_H
13306#include <sys/types.h>
13307#endif
13308
13309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013310 typedef off_t ac__type_sizeof_;
13311static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13312static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013313#include <stdio.h>
13314#include <stdlib.h>
13315int
13316main ()
13317{
13318
13319 FILE *f = fopen ("conftest.val", "w");
13320 if (! f)
13321 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013322 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013323 {
13324 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013327 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328 }
13329 else
13330 {
13331 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013334 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013335 }
13336 return ferror (f) || fclose (f) != 0;
13337
13338 ;
13339 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013340}
Martin v. Löwis11437992002-04-12 09:54:03 +000013341_ACEOF
13342rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343if { (ac_try="$ac_link"
13344case "(($ac_try" in
13345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13346 *) ac_try_echo=$ac_try;;
13347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 { (case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013364 echo "$as_me: program exited with status $ac_status" >&5
13365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013366sed 's/^/| /' conftest.$ac_ext >&5
13367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013374 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013375 else
13376 ac_cv_sizeof_off_t=0
13377 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013380fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013383{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13384echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386
13387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013390_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13395echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013396if test "$have_long_long" = yes -a \
13397 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13398 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400cat >>confdefs.h <<\_ACEOF
13401#define HAVE_LARGEFILE_SUPPORT 1
13402_ACEOF
13403
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013404 { echo "$as_me:$LINENO: result: yes" >&5
13405echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013406else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013407 { echo "$as_me:$LINENO: result: no" >&5
13408echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013409fi
13410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013411{ echo "$as_me:$LINENO: checking for time_t" >&5
13412echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13413if test "${ac_cv_type_time_t+set}" = set; then
13414 echo $ECHO_N "(cached) $ECHO_C" >&6
13415else
13416 cat >conftest.$ac_ext <<_ACEOF
13417/* confdefs.h. */
13418_ACEOF
13419cat confdefs.h >>conftest.$ac_ext
13420cat >>conftest.$ac_ext <<_ACEOF
13421/* end confdefs.h. */
13422
13423#ifdef HAVE_SYS_TYPES_H
13424#include <sys/types.h>
13425#endif
13426#ifdef HAVE_TIME_H
13427#include <time.h>
13428#endif
13429
13430
13431typedef time_t ac__type_new_;
13432int
13433main ()
13434{
13435if ((ac__type_new_ *) 0)
13436 return 0;
13437if (sizeof (ac__type_new_))
13438 return 0;
13439 ;
13440 return 0;
13441}
13442_ACEOF
13443rm -f conftest.$ac_objext
13444if { (ac_try="$ac_compile"
13445case "(($ac_try" in
13446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13447 *) ac_try_echo=$ac_try;;
13448esac
13449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13450 (eval "$ac_compile") 2>conftest.er1
13451 ac_status=$?
13452 grep -v '^ *+' conftest.er1 >conftest.err
13453 rm -f conftest.er1
13454 cat conftest.err >&5
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); } && {
13457 test -z "$ac_c_werror_flag" ||
13458 test ! -s conftest.err
13459 } && test -s conftest.$ac_objext; then
13460 ac_cv_type_time_t=yes
13461else
13462 echo "$as_me: failed program was:" >&5
13463sed 's/^/| /' conftest.$ac_ext >&5
13464
13465 ac_cv_type_time_t=no
13466fi
13467
13468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13469fi
13470{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13471echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013473# The cast to long int works around a bug in the HP C Compiler
13474# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13475# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13476# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013477{ echo "$as_me:$LINENO: checking size of time_t" >&5
13478echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013479if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013480 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013481else
13482 if test "$cross_compiling" = yes; then
13483 # Depending upon the size, compute the lo and hi bounds.
13484cat >conftest.$ac_ext <<_ACEOF
13485/* confdefs.h. */
13486_ACEOF
13487cat confdefs.h >>conftest.$ac_ext
13488cat >>conftest.$ac_ext <<_ACEOF
13489/* end confdefs.h. */
13490
13491#ifdef HAVE_SYS_TYPES_H
13492#include <sys/types.h>
13493#endif
13494#ifdef HAVE_TIME_H
13495#include <time.h>
13496#endif
13497
13498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013499 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013500int
13501main ()
13502{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013504test_array [0] = 0
13505
13506 ;
13507 return 0;
13508}
13509_ACEOF
13510rm -f conftest.$ac_objext
13511if { (ac_try="$ac_compile"
13512case "(($ac_try" in
13513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13514 *) ac_try_echo=$ac_try;;
13515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013517 (eval "$ac_compile") 2>conftest.er1
13518 ac_status=$?
13519 grep -v '^ *+' conftest.er1 >conftest.err
13520 rm -f conftest.er1
13521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013523 (exit $ac_status); } && {
13524 test -z "$ac_c_werror_flag" ||
13525 test ! -s conftest.err
13526 } && test -s conftest.$ac_objext; then
13527 ac_lo=0 ac_mid=0
13528 while :; do
13529 cat >conftest.$ac_ext <<_ACEOF
13530/* confdefs.h. */
13531_ACEOF
13532cat confdefs.h >>conftest.$ac_ext
13533cat >>conftest.$ac_ext <<_ACEOF
13534/* end confdefs.h. */
13535
13536#ifdef HAVE_SYS_TYPES_H
13537#include <sys/types.h>
13538#endif
13539#ifdef HAVE_TIME_H
13540#include <time.h>
13541#endif
13542
13543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013544 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545int
13546main ()
13547{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549test_array [0] = 0
13550
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555rm -f conftest.$ac_objext
13556if { (ac_try="$ac_compile"
13557case "(($ac_try" in
13558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13559 *) ac_try_echo=$ac_try;;
13560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013562 (eval "$ac_compile") 2>conftest.er1
13563 ac_status=$?
13564 grep -v '^ *+' conftest.er1 >conftest.err
13565 rm -f conftest.er1
13566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013568 (exit $ac_status); } && {
13569 test -z "$ac_c_werror_flag" ||
13570 test ! -s conftest.err
13571 } && test -s conftest.$ac_objext; then
13572 ac_hi=$ac_mid; break
13573else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013574 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013575sed 's/^/| /' conftest.$ac_ext >&5
13576
13577 ac_lo=`expr $ac_mid + 1`
13578 if test $ac_lo -le $ac_mid; then
13579 ac_lo= ac_hi=
13580 break
13581 fi
13582 ac_mid=`expr 2 '*' $ac_mid + 1`
13583fi
13584
13585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13586 done
13587else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013588 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589sed 's/^/| /' conftest.$ac_ext >&5
13590
13591 cat >conftest.$ac_ext <<_ACEOF
13592/* confdefs.h. */
13593_ACEOF
13594cat confdefs.h >>conftest.$ac_ext
13595cat >>conftest.$ac_ext <<_ACEOF
13596/* end confdefs.h. */
13597
13598#ifdef HAVE_SYS_TYPES_H
13599#include <sys/types.h>
13600#endif
13601#ifdef HAVE_TIME_H
13602#include <time.h>
13603#endif
13604
13605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013606 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013607int
13608main ()
13609{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013610static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013611test_array [0] = 0
13612
13613 ;
13614 return 0;
13615}
13616_ACEOF
13617rm -f conftest.$ac_objext
13618if { (ac_try="$ac_compile"
13619case "(($ac_try" in
13620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13621 *) ac_try_echo=$ac_try;;
13622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013624 (eval "$ac_compile") 2>conftest.er1
13625 ac_status=$?
13626 grep -v '^ *+' conftest.er1 >conftest.err
13627 rm -f conftest.er1
13628 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013630 (exit $ac_status); } && {
13631 test -z "$ac_c_werror_flag" ||
13632 test ! -s conftest.err
13633 } && test -s conftest.$ac_objext; then
13634 ac_hi=-1 ac_mid=-1
13635 while :; do
13636 cat >conftest.$ac_ext <<_ACEOF
13637/* confdefs.h. */
13638_ACEOF
13639cat confdefs.h >>conftest.$ac_ext
13640cat >>conftest.$ac_ext <<_ACEOF
13641/* end confdefs.h. */
13642
13643#ifdef HAVE_SYS_TYPES_H
13644#include <sys/types.h>
13645#endif
13646#ifdef HAVE_TIME_H
13647#include <time.h>
13648#endif
13649
13650
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013651 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652int
13653main ()
13654{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656test_array [0] = 0
13657
13658 ;
13659 return 0;
13660}
13661_ACEOF
13662rm -f conftest.$ac_objext
13663if { (ac_try="$ac_compile"
13664case "(($ac_try" in
13665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13666 *) ac_try_echo=$ac_try;;
13667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013669 (eval "$ac_compile") 2>conftest.er1
13670 ac_status=$?
13671 grep -v '^ *+' conftest.er1 >conftest.err
13672 rm -f conftest.er1
13673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675 (exit $ac_status); } && {
13676 test -z "$ac_c_werror_flag" ||
13677 test ! -s conftest.err
13678 } && test -s conftest.$ac_objext; then
13679 ac_lo=$ac_mid; break
13680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013681 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682sed 's/^/| /' conftest.$ac_ext >&5
13683
13684 ac_hi=`expr '(' $ac_mid ')' - 1`
13685 if test $ac_mid -le $ac_hi; then
13686 ac_lo= ac_hi=
13687 break
13688 fi
13689 ac_mid=`expr 2 '*' $ac_mid`
13690fi
13691
13692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693 done
13694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013695 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696sed 's/^/| /' conftest.$ac_ext >&5
13697
13698 ac_lo= ac_hi=
13699fi
13700
13701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13702fi
13703
13704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13705# Binary search between lo and hi bounds.
13706while test "x$ac_lo" != "x$ac_hi"; do
13707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13708 cat >conftest.$ac_ext <<_ACEOF
13709/* confdefs.h. */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h. */
13714
13715#ifdef HAVE_SYS_TYPES_H
13716#include <sys/types.h>
13717#endif
13718#ifdef HAVE_TIME_H
13719#include <time.h>
13720#endif
13721
13722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013723 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013724int
13725main ()
13726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728test_array [0] = 0
13729
13730 ;
13731 return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext
13735if { (ac_try="$ac_compile"
13736case "(($ac_try" in
13737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13738 *) ac_try_echo=$ac_try;;
13739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741 (eval "$ac_compile") 2>conftest.er1
13742 ac_status=$?
13743 grep -v '^ *+' conftest.er1 >conftest.err
13744 rm -f conftest.er1
13745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013747 (exit $ac_status); } && {
13748 test -z "$ac_c_werror_flag" ||
13749 test ! -s conftest.err
13750 } && test -s conftest.$ac_objext; then
13751 ac_hi=$ac_mid
13752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013753 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013754sed 's/^/| /' conftest.$ac_ext >&5
13755
13756 ac_lo=`expr '(' $ac_mid ')' + 1`
13757fi
13758
13759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13760done
13761case $ac_lo in
13762?*) ac_cv_sizeof_time_t=$ac_lo;;
13763'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013764 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013766echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013767See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013768 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013769 else
13770 ac_cv_sizeof_time_t=0
13771 fi ;;
13772esac
13773else
13774 cat >conftest.$ac_ext <<_ACEOF
13775/* confdefs.h. */
13776_ACEOF
13777cat confdefs.h >>conftest.$ac_ext
13778cat >>conftest.$ac_ext <<_ACEOF
13779/* end confdefs.h. */
13780
13781#ifdef HAVE_SYS_TYPES_H
13782#include <sys/types.h>
13783#endif
13784#ifdef HAVE_TIME_H
13785#include <time.h>
13786#endif
13787
13788
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013789 typedef time_t ac__type_sizeof_;
13790static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13791static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013792#include <stdio.h>
13793#include <stdlib.h>
13794int
13795main ()
13796{
13797
13798 FILE *f = fopen ("conftest.val", "w");
13799 if (! f)
13800 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013801 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013802 {
13803 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013804 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013805 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013806 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807 }
13808 else
13809 {
13810 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013812 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013813 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013814 }
13815 return ferror (f) || fclose (f) != 0;
13816
13817 ;
13818 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013819}
Martin v. Löwis11437992002-04-12 09:54:03 +000013820_ACEOF
13821rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822if { (ac_try="$ac_link"
13823case "(($ac_try" in
13824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13825 *) ac_try_echo=$ac_try;;
13826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 { (case "(($ac_try" in
13833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834 *) ac_try_echo=$ac_try;;
13835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013843 echo "$as_me: program exited with status $ac_status" >&5
13844echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013845sed 's/^/| /' conftest.$ac_ext >&5
13846
Martin v. Löwis11437992002-04-12 09:54:03 +000013847( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013850See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013851echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013852See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013853 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013854 else
13855 ac_cv_sizeof_time_t=0
13856 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858rm -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 +000013859fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013860rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013861fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013862{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13863echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865
13866
Martin v. Löwis11437992002-04-12 09:54:03 +000013867cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013868#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013869_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013870
Michael W. Hudson54241132001-12-07 15:38:26 +000013871
13872
Trent Mick635f6fb2000-08-23 21:33:05 +000013873# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013874ac_save_cc="$CC"
13875if test "$ac_cv_kpthread" = "yes"
13876then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013877elif test "$ac_cv_kthread" = "yes"
13878then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013879elif test "$ac_cv_pthread" = "yes"
13880then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013881fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013883{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13884echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013885have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* confdefs.h. */
13888_ACEOF
13889cat confdefs.h >>conftest.$ac_ext
13890cat >>conftest.$ac_ext <<_ACEOF
13891/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013892#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013893int
13894main ()
13895{
Guido van Rossum12580492000-09-24 16:47:19 +000013896pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ;
13898 return 0;
13899}
13900_ACEOF
13901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902if { (ac_try="$ac_compile"
13903case "(($ac_try" in
13904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13905 *) ac_try_echo=$ac_try;;
13906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013910 grep -v '^ *+' conftest.er1 >conftest.err
13911 rm -f conftest.er1
13912 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 (exit $ac_status); } && {
13915 test -z "$ac_c_werror_flag" ||
13916 test ! -s conftest.err
13917 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013918 have_pthread_t=yes
13919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013921sed 's/^/| /' conftest.$ac_ext >&5
13922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923
Trent Mick635f6fb2000-08-23 21:33:05 +000013924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925
13926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013927{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13928echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013929if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013930 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13931echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13932if test "${ac_cv_type_pthread_t+set}" = set; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
13934else
13935 cat >conftest.$ac_ext <<_ACEOF
13936/* confdefs.h. */
13937_ACEOF
13938cat confdefs.h >>conftest.$ac_ext
13939cat >>conftest.$ac_ext <<_ACEOF
13940/* end confdefs.h. */
13941
13942#ifdef HAVE_PTHREAD_H
13943#include <pthread.h>
13944#endif
13945
13946
13947typedef pthread_t ac__type_new_;
13948int
13949main ()
13950{
13951if ((ac__type_new_ *) 0)
13952 return 0;
13953if (sizeof (ac__type_new_))
13954 return 0;
13955 ;
13956 return 0;
13957}
13958_ACEOF
13959rm -f conftest.$ac_objext
13960if { (ac_try="$ac_compile"
13961case "(($ac_try" in
13962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13963 *) ac_try_echo=$ac_try;;
13964esac
13965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13966 (eval "$ac_compile") 2>conftest.er1
13967 ac_status=$?
13968 grep -v '^ *+' conftest.er1 >conftest.err
13969 rm -f conftest.er1
13970 cat conftest.err >&5
13971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13972 (exit $ac_status); } && {
13973 test -z "$ac_c_werror_flag" ||
13974 test ! -s conftest.err
13975 } && test -s conftest.$ac_objext; then
13976 ac_cv_type_pthread_t=yes
13977else
13978 echo "$as_me: failed program was:" >&5
13979sed 's/^/| /' conftest.$ac_ext >&5
13980
13981 ac_cv_type_pthread_t=no
13982fi
13983
13984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13985fi
13986{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13987echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13988
13989# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13992# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013993{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13994echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013995if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013996 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013997else
13998 if test "$cross_compiling" = yes; then
13999 # Depending upon the size, compute the lo and hi bounds.
14000cat >conftest.$ac_ext <<_ACEOF
14001/* confdefs.h. */
14002_ACEOF
14003cat confdefs.h >>conftest.$ac_ext
14004cat >>conftest.$ac_ext <<_ACEOF
14005/* end confdefs.h. */
14006
14007#ifdef HAVE_PTHREAD_H
14008#include <pthread.h>
14009#endif
14010
14011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014012 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014013int
14014main ()
14015{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014017test_array [0] = 0
14018
14019 ;
14020 return 0;
14021}
14022_ACEOF
14023rm -f conftest.$ac_objext
14024if { (ac_try="$ac_compile"
14025case "(($ac_try" in
14026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14027 *) ac_try_echo=$ac_try;;
14028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014030 (eval "$ac_compile") 2>conftest.er1
14031 ac_status=$?
14032 grep -v '^ *+' conftest.er1 >conftest.err
14033 rm -f conftest.er1
14034 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014036 (exit $ac_status); } && {
14037 test -z "$ac_c_werror_flag" ||
14038 test ! -s conftest.err
14039 } && test -s conftest.$ac_objext; then
14040 ac_lo=0 ac_mid=0
14041 while :; do
14042 cat >conftest.$ac_ext <<_ACEOF
14043/* confdefs.h. */
14044_ACEOF
14045cat confdefs.h >>conftest.$ac_ext
14046cat >>conftest.$ac_ext <<_ACEOF
14047/* end confdefs.h. */
14048
14049#ifdef HAVE_PTHREAD_H
14050#include <pthread.h>
14051#endif
14052
14053
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014054 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014055int
14056main ()
14057{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014059test_array [0] = 0
14060
14061 ;
14062 return 0;
14063}
14064_ACEOF
14065rm -f conftest.$ac_objext
14066if { (ac_try="$ac_compile"
14067case "(($ac_try" in
14068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14069 *) ac_try_echo=$ac_try;;
14070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014072 (eval "$ac_compile") 2>conftest.er1
14073 ac_status=$?
14074 grep -v '^ *+' conftest.er1 >conftest.err
14075 rm -f conftest.er1
14076 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014078 (exit $ac_status); } && {
14079 test -z "$ac_c_werror_flag" ||
14080 test ! -s conftest.err
14081 } && test -s conftest.$ac_objext; then
14082 ac_hi=$ac_mid; break
14083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014084 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014085sed 's/^/| /' conftest.$ac_ext >&5
14086
14087 ac_lo=`expr $ac_mid + 1`
14088 if test $ac_lo -le $ac_mid; then
14089 ac_lo= ac_hi=
14090 break
14091 fi
14092 ac_mid=`expr 2 '*' $ac_mid + 1`
14093fi
14094
14095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14096 done
14097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014098 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014099sed 's/^/| /' conftest.$ac_ext >&5
14100
14101 cat >conftest.$ac_ext <<_ACEOF
14102/* confdefs.h. */
14103_ACEOF
14104cat confdefs.h >>conftest.$ac_ext
14105cat >>conftest.$ac_ext <<_ACEOF
14106/* end confdefs.h. */
14107
14108#ifdef HAVE_PTHREAD_H
14109#include <pthread.h>
14110#endif
14111
14112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014113 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014114int
14115main ()
14116{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014117static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014118test_array [0] = 0
14119
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124rm -f conftest.$ac_objext
14125if { (ac_try="$ac_compile"
14126case "(($ac_try" in
14127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14128 *) ac_try_echo=$ac_try;;
14129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014131 (eval "$ac_compile") 2>conftest.er1
14132 ac_status=$?
14133 grep -v '^ *+' conftest.er1 >conftest.err
14134 rm -f conftest.er1
14135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 (exit $ac_status); } && {
14138 test -z "$ac_c_werror_flag" ||
14139 test ! -s conftest.err
14140 } && test -s conftest.$ac_objext; then
14141 ac_hi=-1 ac_mid=-1
14142 while :; do
14143 cat >conftest.$ac_ext <<_ACEOF
14144/* confdefs.h. */
14145_ACEOF
14146cat confdefs.h >>conftest.$ac_ext
14147cat >>conftest.$ac_ext <<_ACEOF
14148/* end confdefs.h. */
14149
14150#ifdef HAVE_PTHREAD_H
14151#include <pthread.h>
14152#endif
14153
14154
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014155 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014156int
14157main ()
14158{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014160test_array [0] = 0
14161
14162 ;
14163 return 0;
14164}
14165_ACEOF
14166rm -f conftest.$ac_objext
14167if { (ac_try="$ac_compile"
14168case "(($ac_try" in
14169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14170 *) ac_try_echo=$ac_try;;
14171esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173 (eval "$ac_compile") 2>conftest.er1
14174 ac_status=$?
14175 grep -v '^ *+' conftest.er1 >conftest.err
14176 rm -f conftest.er1
14177 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014179 (exit $ac_status); } && {
14180 test -z "$ac_c_werror_flag" ||
14181 test ! -s conftest.err
14182 } && test -s conftest.$ac_objext; then
14183 ac_lo=$ac_mid; break
14184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014185 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186sed 's/^/| /' conftest.$ac_ext >&5
14187
14188 ac_hi=`expr '(' $ac_mid ')' - 1`
14189 if test $ac_mid -le $ac_hi; then
14190 ac_lo= ac_hi=
14191 break
14192 fi
14193 ac_mid=`expr 2 '*' $ac_mid`
14194fi
14195
14196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14197 done
14198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014199 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014200sed 's/^/| /' conftest.$ac_ext >&5
14201
14202 ac_lo= ac_hi=
14203fi
14204
14205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14206fi
14207
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209# Binary search between lo and hi bounds.
14210while test "x$ac_lo" != "x$ac_hi"; do
14211 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14212 cat >conftest.$ac_ext <<_ACEOF
14213/* confdefs.h. */
14214_ACEOF
14215cat confdefs.h >>conftest.$ac_ext
14216cat >>conftest.$ac_ext <<_ACEOF
14217/* end confdefs.h. */
14218
14219#ifdef HAVE_PTHREAD_H
14220#include <pthread.h>
14221#endif
14222
14223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014224 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225int
14226main ()
14227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014229test_array [0] = 0
14230
14231 ;
14232 return 0;
14233}
14234_ACEOF
14235rm -f conftest.$ac_objext
14236if { (ac_try="$ac_compile"
14237case "(($ac_try" in
14238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14239 *) ac_try_echo=$ac_try;;
14240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014242 (eval "$ac_compile") 2>conftest.er1
14243 ac_status=$?
14244 grep -v '^ *+' conftest.er1 >conftest.err
14245 rm -f conftest.er1
14246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014248 (exit $ac_status); } && {
14249 test -z "$ac_c_werror_flag" ||
14250 test ! -s conftest.err
14251 } && test -s conftest.$ac_objext; then
14252 ac_hi=$ac_mid
14253else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014254 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255sed 's/^/| /' conftest.$ac_ext >&5
14256
14257 ac_lo=`expr '(' $ac_mid ')' + 1`
14258fi
14259
14260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14261done
14262case $ac_lo in
14263?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14264'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014267echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014268See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014269 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014270 else
14271 ac_cv_sizeof_pthread_t=0
14272 fi ;;
14273esac
14274else
14275 cat >conftest.$ac_ext <<_ACEOF
14276/* confdefs.h. */
14277_ACEOF
14278cat confdefs.h >>conftest.$ac_ext
14279cat >>conftest.$ac_ext <<_ACEOF
14280/* end confdefs.h. */
14281
14282#ifdef HAVE_PTHREAD_H
14283#include <pthread.h>
14284#endif
14285
14286
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014287 typedef pthread_t ac__type_sizeof_;
14288static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14289static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014290#include <stdio.h>
14291#include <stdlib.h>
14292int
14293main ()
14294{
14295
14296 FILE *f = fopen ("conftest.val", "w");
14297 if (! f)
14298 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014299 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014300 {
14301 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014302 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014304 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014305 }
14306 else
14307 {
14308 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014309 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014311 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014312 }
14313 return ferror (f) || fclose (f) != 0;
14314
14315 ;
14316 return 0;
14317}
Martin v. Löwis11437992002-04-12 09:54:03 +000014318_ACEOF
14319rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320if { (ac_try="$ac_link"
14321case "(($ac_try" in
14322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14323 *) ac_try_echo=$ac_try;;
14324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330 { (case "(($ac_try" in
14331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14332 *) ac_try_echo=$ac_try;;
14333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014339 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341 echo "$as_me: program exited with status $ac_status" >&5
14342echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014343sed 's/^/| /' conftest.$ac_ext >&5
14344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014347 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014348See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014349echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014350See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014351 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014352 else
14353 ac_cv_sizeof_pthread_t=0
14354 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356rm -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 +000014357fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014358rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014359fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014360{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14361echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363
14364
Martin v. Löwis11437992002-04-12 09:54:03 +000014365cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014366#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014367_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014368
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014369
Trent Mick635f6fb2000-08-23 21:33:05 +000014370fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014371CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014372
Michael W. Hudson54241132001-12-07 15:38:26 +000014373
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014374case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014375 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014376 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14377 ;;
14378 Darwin/*)
14379 OTHER_LIBTOOL_OPT=""
14380 ;;
14381esac
14382
14383
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014384ARCH_RUN_32BIT=""
14385
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014386case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014387 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014388 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14389 if test "${enable_universalsdk}"; then
14390 :
14391 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014392 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014393 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014395 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014396 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014397 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14398 if test ${gcc_version} '<' 4.0
14399 then
14400 LIBTOOL_CRUFT="-lcc_dynamic"
14401 else
14402 LIBTOOL_CRUFT=""
14403 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014404 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014405 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014406else
14407 cat >conftest.$ac_ext <<_ACEOF
14408/* confdefs.h. */
14409_ACEOF
14410cat confdefs.h >>conftest.$ac_ext
14411cat >>conftest.$ac_ext <<_ACEOF
14412/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014413
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014414 #include <unistd.h>
14415 int main(int argc, char*argv[])
14416 {
14417 if (sizeof(long) == 4) {
14418 return 0;
14419 } else {
14420 return 1;
14421 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014422 }
14423
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014424_ACEOF
14425rm -f conftest$ac_exeext
14426if { (ac_try="$ac_link"
14427case "(($ac_try" in
14428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14429 *) ac_try_echo=$ac_try;;
14430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014432 (eval "$ac_link") 2>&5
14433 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14436 { (case "(($ac_try" in
14437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14438 *) ac_try_echo=$ac_try;;
14439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014441 (eval "$ac_try") 2>&5
14442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014444 (exit $ac_status); }; }; then
14445 ac_osx_32bit=yes
14446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014447 echo "$as_me: program exited with status $ac_status" >&5
14448echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014449sed 's/^/| /' conftest.$ac_ext >&5
14450
14451( exit $ac_status )
14452ac_osx_32bit=no
14453fi
14454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14455fi
14456
14457
14458
14459 if test "${ac_osx_32bit}" = "yes"; then
14460 case `arch` in
14461 i386)
14462 MACOSX_DEFAULT_ARCH="i386"
14463 ;;
14464 ppc)
14465 MACOSX_DEFAULT_ARCH="ppc"
14466 ;;
14467 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014468 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14469echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014470 { (exit 1); exit 1; }; }
14471 ;;
14472 esac
14473 else
14474 case `arch` in
14475 i386)
14476 MACOSX_DEFAULT_ARCH="x86_64"
14477 ;;
14478 ppc)
14479 MACOSX_DEFAULT_ARCH="ppc64"
14480 ;;
14481 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014482 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14483echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014484 { (exit 1); exit 1; }; }
14485 ;;
14486 esac
14487
14488 #ARCH_RUN_32BIT="true"
14489 fi
14490
14491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014492 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014493 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014494esac
14495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014496{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14497echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014498if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014499then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014500 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014502 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504cat >>confdefs.h <<\_ACEOF
14505#define WITH_NEXT_FRAMEWORK 1
14506_ACEOF
14507
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014508 { echo "$as_me:$LINENO: result: yes" >&5
14509echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014510 if test $enable_shared = "yes"
14511 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014512 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14513echo "$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 +000014514 { (exit 1); exit 1; }; }
14515 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 { echo "$as_me:$LINENO: result: no" >&5
14518echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014519fi
14520
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014521{ echo "$as_me:$LINENO: checking for dyld" >&5
14522echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014523case $ac_sys_system/$ac_sys_release in
14524 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014525
Martin v. Löwis11437992002-04-12 09:54:03 +000014526cat >>confdefs.h <<\_ACEOF
14527#define WITH_DYLD 1
14528_ACEOF
14529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014530 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14531echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014532 ;;
14533 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014534 { echo "$as_me:$LINENO: result: no" >&5
14535echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014536 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014537esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014538
Guido van Rossum0a516c91994-09-12 10:58:40 +000014539# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014540
Michael W. Hudson54241132001-12-07 15:38:26 +000014541
14542
14543
14544
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014546# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014547{ echo "$as_me:$LINENO: checking SO" >&5
14548echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014549if test -z "$SO"
14550then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014551 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014552 hp*|HP*)
14553 case `uname -m` in
14554 ia64) SO=.so;;
14555 *) SO=.sl;;
14556 esac
14557 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014558 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014559 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014560 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014561else
14562 # this might also be a termcap variable, see #610332
14563 echo
14564 echo '====================================================================='
14565 echo '+ +'
14566 echo '+ WARNING: You have set SO in your environment. +'
14567 echo '+ Do you really mean to change the extension for shared libraries? +'
14568 echo '+ Continuing in 10 seconds to let you to ponder. +'
14569 echo '+ +'
14570 echo '====================================================================='
14571 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014573{ echo "$as_me:$LINENO: result: $SO" >&5
14574echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014575
Georg Brandlb1441c72009-01-03 22:33:39 +000014576
Thomas Wouters477c8d52006-05-27 19:21:47 +000014577cat >>confdefs.h <<_ACEOF
14578#define SHLIB_EXT "$SO"
14579_ACEOF
14580
Guido van Rossum0a516c91994-09-12 10:58:40 +000014581# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014582# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014583# (Shared libraries in this instance are shared modules to be loaded into
14584# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014585{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14586echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014587if test -z "$LDSHARED"
14588then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014589 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014590 AIX*)
14591 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014592 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014593 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014594 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014595 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014597 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014598 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014599 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014600 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014601 hp*|HP*)
14602 if test "$GCC" = "yes"
14603 then LDSHARED='$(CC) -shared'
14604 else LDSHARED='ld -b';
14605 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014606 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014607 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014608 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14609 if test "$enable_framework" ; then
14610 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014611 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14612 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014613 else
14614 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014615 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014616 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014617 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014618 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14619 if test "$enable_framework" ; then
14620 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014621 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14622 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014623 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014624 # No framework, use the Python app as bundle-loader
14625 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014626 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014628 Darwin/*)
14629 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14630 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014631
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014632 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014634 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014635 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014636 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014637 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14638 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014639 else
14640 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14641 if test "$enable_framework" ; then
14642 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014643 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14644 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014645 else
14646 # No framework, use the Python app as bundle-loader
14647 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14648 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14649 fi
14650 fi
14651 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014652 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014653 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014654 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014655 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014656 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014657 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014658 else
14659 LDSHARED="ld -Bshareable ${LDFLAGS}"
14660 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014661 OpenBSD*)
14662 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14663 then
14664 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14665 else
14666 case `uname -r` in
14667 [01].* | 2.[0-7] | 2.[0-7].*)
14668 LDSHARED="ld -Bshareable ${LDFLAGS}"
14669 ;;
14670 *)
14671 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14672 ;;
14673 esac
14674 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014675 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014676 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014677 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014678 then LDSHARED='$(CC) -shared'
14679 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014680 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014681 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014682 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014683 *) LDSHARED="ld";;
14684 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014685fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014686{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14687echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014688BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014690# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014691{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14692echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014693if test -z "$CCSHARED"
14694then
Guido van Rossum07397971997-04-29 21:49:50 +000014695 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014696 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014697 then CCSHARED="-fPIC";
14698 elif test `uname -p` = sparc;
14699 then CCSHARED="-xcode=pic32";
14700 else CCSHARED="-Kpic";
14701 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014702 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014703 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014704 else CCSHARED="+z";
14705 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014706 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014707 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014708 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014709 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014710 if test "$GCC" = "yes"
14711 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014712 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014713 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014714 SCO_SV*)
14715 if test "$GCC" = "yes"
14716 then CCSHARED="-fPIC"
14717 else CCSHARED="-Kpic -belf"
14718 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014719 IRIX*/6*) case $CC in
14720 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014721 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014722 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014724fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014725{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14726echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014727# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014728# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014729{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14730echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014731if test -z "$LINKFORSHARED"
14732then
Guido van Rossum07397971997-04-29 21:49:50 +000014733 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014734 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014735 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014736 LINKFORSHARED="-Wl,-E -Wl,+s";;
14737# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014738 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014739 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014740 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014742 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014743 if test "$enable_framework"
14744 then
Jack Jansenda49e192005-01-07 13:08:22 +000014745 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014746 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014747 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014748 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014749 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014750 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014751 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014752 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14753 then
14754 LINKFORSHARED="-Wl,--export-dynamic"
14755 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014756 SunOS/5*) case $CC in
14757 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014758 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014759 then
14760 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014761 fi;;
14762 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014763 CYGWIN*)
14764 if test $enable_shared = "no"
14765 then
14766 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14767 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014768 QNX*)
14769 # -Wl,-E causes the symbols to be added to the dynamic
14770 # symbol table so that they can be found when a module
14771 # is loaded. -N 2048K causes the stack size to be set
14772 # to 2048 kilobytes so that the stack doesn't overflow
14773 # when running test_compile.py.
14774 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014776fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014777{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14778echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014779
Michael W. Hudson54241132001-12-07 15:38:26 +000014780
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014781
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014782{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14783echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014784if test ! "$LIBRARY" = "$LDLIBRARY"
14785then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014786 case $ac_sys_system in
14787 CYGWIN*)
14788 # Cygwin needs CCSHARED when building extension DLLs
14789 # but not when building the interpreter DLL.
14790 CFLAGSFORSHARED='';;
14791 *)
14792 CFLAGSFORSHARED='$(CCSHARED)'
14793 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014795{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14796echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014797
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014798# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14799# library (with --enable-shared).
14800# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014801# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14802# if it is not required, since it creates a dependency of the shared library
14803# to LIBS. This, in turn, means that applications linking the shared libpython
14804# don't need to link LIBS explicitly. The default should be only changed
14805# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014806
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014807{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14808echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014809case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014810 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014811 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014813{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14814echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014815
14816
Guido van Rossum627b2d71993-12-24 10:39:16 +000014817# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014819{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14820echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014821if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014823else
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014825LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014826cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014827/* confdefs.h. */
14828_ACEOF
14829cat confdefs.h >>conftest.$ac_ext
14830cat >>conftest.$ac_ext <<_ACEOF
14831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833/* Override any GCC internal prototype to avoid an error.
14834 Use char because int might match the return type of a GCC
14835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014836#ifdef __cplusplus
14837extern "C"
14838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014839char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014840int
14841main ()
14842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014844 ;
14845 return 0;
14846}
14847_ACEOF
14848rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849if { (ac_try="$ac_link"
14850case "(($ac_try" in
14851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14852 *) ac_try_echo=$ac_try;;
14853esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014857 grep -v '^ *+' conftest.er1 >conftest.err
14858 rm -f conftest.er1
14859 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861 (exit $ac_status); } && {
14862 test -z "$ac_c_werror_flag" ||
14863 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014864 } && test -s conftest$ac_exeext &&
14865 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014867else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014869sed 's/^/| /' conftest.$ac_ext >&5
14870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873
14874rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014878{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14879echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14880if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 cat >>confdefs.h <<_ACEOF
14882#define HAVE_LIBDL 1
14883_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014884
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014885 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014887fi
14888 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014890{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14891echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014892if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014894else
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014896LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* confdefs.h. */
14899_ACEOF
14900cat confdefs.h >>conftest.$ac_ext
14901cat >>conftest.$ac_ext <<_ACEOF
14902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904/* Override any GCC internal prototype to avoid an error.
14905 Use char because int might match the return type of a GCC
14906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014907#ifdef __cplusplus
14908extern "C"
14909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014910char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014911int
14912main ()
14913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
14919rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920if { (ac_try="$ac_link"
14921case "(($ac_try" in
14922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14923 *) ac_try_echo=$ac_try;;
14924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014928 grep -v '^ *+' conftest.er1 >conftest.err
14929 rm -f conftest.er1
14930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 (exit $ac_status); } && {
14933 test -z "$ac_c_werror_flag" ||
14934 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014935 } && test -s conftest$ac_exeext &&
14936 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014938else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014940sed 's/^/| /' conftest.$ac_ext >&5
14941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944
14945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014947LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014949{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14950echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14951if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 cat >>confdefs.h <<_ACEOF
14953#define HAVE_LIBDLD 1
14954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014956 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958fi
14959 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014960
Georg Brandlb1441c72009-01-03 22:33:39 +000014961# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014962if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014963 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14964echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014965if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014967else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014968 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* confdefs.h. */
14971_ACEOF
14972cat confdefs.h >>conftest.$ac_ext
14973cat >>conftest.$ac_ext <<_ACEOF
14974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976/* Override any GCC internal prototype to avoid an error.
14977 Use char because int might match the return type of a GCC
14978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014979#ifdef __cplusplus
14980extern "C"
14981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014982char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014983int
14984main ()
14985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ;
14988 return 0;
14989}
14990_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991for ac_lib in '' pthread rt posix4; do
14992 if test -z "$ac_lib"; then
14993 ac_res="none required"
14994 else
14995 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014996 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 fi
14998 rm -f conftest.$ac_objext conftest$ac_exeext
14999if { (ac_try="$ac_link"
15000case "(($ac_try" in
15001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15002 *) ac_try_echo=$ac_try;;
15003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015006 ac_status=$?
15007 grep -v '^ *+' conftest.er1 >conftest.err
15008 rm -f conftest.er1
15009 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 (exit $ac_status); } && {
15012 test -z "$ac_c_werror_flag" ||
15013 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015014 } && test -s conftest$ac_exeext &&
15015 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015018 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015019sed 's/^/| /' conftest.$ac_ext >&5
15020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021
Thomas Wouters477c8d52006-05-27 19:21:47 +000015022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023
15024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15025 conftest$ac_exeext
15026 if test "${ac_cv_search_sem_init+set}" = set; then
15027 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029done
15030if test "${ac_cv_search_sem_init+set}" = set; then
15031 :
15032else
15033 ac_cv_search_sem_init=no
15034fi
15035rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015036LIBS=$ac_func_search_save_LIBS
15037fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015038{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15039echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040ac_res=$ac_cv_search_sem_init
15041if test "$ac_res" != no; then
15042 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015043
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015044fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015045 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015046 # posix4 on Solaris 2.6
15047 # pthread (first!) on Linux
15048fi
15049
Martin v. Löwis19d17342003-06-14 21:03:05 +000015050# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015051{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15052echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015053if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015054 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015055else
15056 ac_check_lib_save_LIBS=$LIBS
15057LIBS="-lintl $LIBS"
15058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015059/* confdefs.h. */
15060_ACEOF
15061cat confdefs.h >>conftest.$ac_ext
15062cat >>conftest.$ac_ext <<_ACEOF
15063/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065/* Override any GCC internal prototype to avoid an error.
15066 Use char because int might match the return type of a GCC
15067 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015068#ifdef __cplusplus
15069extern "C"
15070#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015072int
15073main ()
15074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081if { (ac_try="$ac_link"
15082case "(($ac_try" in
15083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15084 *) ac_try_echo=$ac_try;;
15085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015089 grep -v '^ *+' conftest.er1 >conftest.err
15090 rm -f conftest.er1
15091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093 (exit $ac_status); } && {
15094 test -z "$ac_c_werror_flag" ||
15095 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015096 } && test -s conftest$ac_exeext &&
15097 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015098 ac_cv_lib_intl_textdomain=yes
15099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015101sed 's/^/| /' conftest.$ac_ext >&5
15102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105
15106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015108LIBS=$ac_check_lib_save_LIBS
15109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015110{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15111echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15112if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015113
15114cat >>confdefs.h <<\_ACEOF
15115#define WITH_LIBINTL 1
15116_ACEOF
15117
Brett Cannonc6d936e2009-06-07 20:09:53 +000015118 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015119fi
15120
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015121
15122# checks for system dependent C++ extensions support
15123case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015124 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15125echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015127/* confdefs.h. */
15128_ACEOF
15129cat confdefs.h >>conftest.$ac_ext
15130cat >>conftest.$ac_ext <<_ACEOF
15131/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015132#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015133int
15134main ()
15135{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015136loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ;
15138 return 0;
15139}
15140_ACEOF
15141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142if { (ac_try="$ac_link"
15143case "(($ac_try" in
15144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15145 *) ac_try_echo=$ac_try;;
15146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015150 grep -v '^ *+' conftest.er1 >conftest.err
15151 rm -f conftest.er1
15152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 (exit $ac_status); } && {
15155 test -z "$ac_c_werror_flag" ||
15156 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015157 } && test -s conftest$ac_exeext &&
15158 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160cat >>confdefs.h <<\_ACEOF
15161#define AIX_GENUINE_CPLUSPLUS 1
15162_ACEOF
15163
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015164 { echo "$as_me:$LINENO: result: yes" >&5
15165echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015168sed 's/^/| /' conftest.$ac_ext >&5
15169
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170 { echo "$as_me:$LINENO: result: no" >&5
15171echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173
15174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015175 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015176 *) ;;
15177esac
15178
Guido van Rossum70c7f481998-03-26 18:44:10 +000015179# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015180{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15181echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015182if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015184else
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015186LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* confdefs.h. */
15189_ACEOF
15190cat confdefs.h >>conftest.$ac_ext
15191cat >>conftest.$ac_ext <<_ACEOF
15192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194/* Override any GCC internal prototype to avoid an error.
15195 Use char because int might match the return type of a GCC
15196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015197#ifdef __cplusplus
15198extern "C"
15199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015200char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201int
15202main ()
15203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ;
15206 return 0;
15207}
15208_ACEOF
15209rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015210if { (ac_try="$ac_link"
15211case "(($ac_try" in
15212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15213 *) ac_try_echo=$ac_try;;
15214esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015218 grep -v '^ *+' conftest.er1 >conftest.err
15219 rm -f conftest.er1
15220 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 (exit $ac_status); } && {
15223 test -z "$ac_c_werror_flag" ||
15224 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015225 } && test -s conftest$ac_exeext &&
15226 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015230sed 's/^/| /' conftest.$ac_ext >&5
15231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234
15235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015238fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015239{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15240echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15241if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015242 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015243fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015244 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015245{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15246echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015249else
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015251LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* confdefs.h. */
15254_ACEOF
15255cat confdefs.h >>conftest.$ac_ext
15256cat >>conftest.$ac_ext <<_ACEOF
15257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259/* Override any GCC internal prototype to avoid an error.
15260 Use char because int might match the return type of a GCC
15261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015262#ifdef __cplusplus
15263extern "C"
15264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015265char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266int
15267main ()
15268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275if { (ac_try="$ac_link"
15276case "(($ac_try" in
15277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15278 *) ac_try_echo=$ac_try;;
15279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015283 grep -v '^ *+' conftest.er1 >conftest.err
15284 rm -f conftest.er1
15285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 (exit $ac_status); } && {
15288 test -z "$ac_c_werror_flag" ||
15289 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015290 } && test -s conftest$ac_exeext &&
15291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015295sed 's/^/| /' conftest.$ac_ext >&5
15296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299
15300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015302LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015303fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015304{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15305echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15306if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015307 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015308fi
15309 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015310
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015311{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15312echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015315if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015317{ echo "$as_me:$LINENO: result: $withval" >&5
15318echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015319LIBS="$withval $LIBS"
15320
15321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322 { echo "$as_me:$LINENO: result: no" >&5
15323echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324fi
15325
Guido van Rossum7f43da71994-08-01 12:15:30 +000015326
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015327# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015328{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15329echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015332if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333 withval=$with_system_ffi;
15334fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015336
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15338echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015339
Matthias Klose55708cc2009-04-30 08:06:49 +000015340# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015341{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15342echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015343
15344# Check whether --with-dbmliborder was given.
15345if test "${with_dbmliborder+set}" = set; then
15346 withval=$with_dbmliborder;
15347if test x$with_dbmliborder = xyes
15348then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015349{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15350echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015351 { (exit 1); exit 1; }; }
15352else
15353 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15354 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15355 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015356 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15357echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015358 { (exit 1); exit 1; }; }
15359 fi
15360 done
15361fi
15362fi
15363
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15365echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015366
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015367# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015368
15369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015370{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15371echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015374if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375 withval=$with_signal_module;
15376fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015377
15378
15379if test -z "$with_signal_module"
15380then with_signal_module="yes"
15381fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015382{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15383echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015384
15385if test "${with_signal_module}" = "yes"; then
15386 USE_SIGNAL_MODULE=""
15387 SIGNAL_OBJS=""
15388else
15389 USE_SIGNAL_MODULE="#"
15390 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15391fi
15392
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015393# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015394
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015395USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015396
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015397{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15398echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
Guido van Rossumec2f0731997-01-22 20:54:01 +000015400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015402if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015404{ echo "$as_me:$LINENO: result: $withval" >&5
15405echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015406LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015407if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015408 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015409fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015411 { echo "$as_me:$LINENO: result: no" >&5
15412echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413fi
15414
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
15416# Templates for things AC_DEFINEd more than once.
15417# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015418
15419
Martin v. Löwis11437992002-04-12 09:54:03 +000015420
15421
15422
15423
15424
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015425{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15426echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015428# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015429if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015430 withval=$with_threads;
15431fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015432
15433
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015434# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015437if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438 withval=$with_thread; with_threads=$with_thread
15439fi
15440
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015441
15442if test -z "$with_threads"
15443then with_threads="yes"
15444fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015445{ echo "$as_me:$LINENO: result: $with_threads" >&5
15446echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015447
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015448
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015449if test "$with_threads" = "no"
15450then
15451 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015452elif test "$ac_cv_pthread_is_default" = yes
15453then
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015455#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015456_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015457
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015458 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015460#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015461_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015462
15463 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015465elif test "$ac_cv_kpthread" = "yes"
15466then
15467 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015468 if test "$ac_cv_cxx_thread" = "yes"; then
15469 CXX="$CXX -Kpthread"
15470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015472#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015473_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015474
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015475 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015476 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015477elif test "$ac_cv_kthread" = "yes"
15478then
15479 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015480 if test "$ac_cv_cxx_thread" = "yes"; then
15481 CXX="$CXX -Kthread"
15482 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015483 cat >>confdefs.h <<\_ACEOF
15484#define WITH_THREAD 1
15485_ACEOF
15486
15487 posix_threads=yes
15488 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015489elif test "$ac_cv_pthread" = "yes"
15490then
15491 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015492 if test "$ac_cv_cxx_thread" = "yes"; then
15493 CXX="$CXX -pthread"
15494 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015495 cat >>confdefs.h <<\_ACEOF
15496#define WITH_THREAD 1
15497_ACEOF
15498
15499 posix_threads=yes
15500 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015501else
15502 if test ! -z "$with_threads" -a -d "$with_threads"
15503 then LDFLAGS="$LDFLAGS -L$with_threads"
15504 fi
15505 if test ! -z "$withval" -a -d "$withval"
15506 then LDFLAGS="$LDFLAGS -L$withval"
15507 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015508
15509 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015510 # define _POSIX_THREADS in unistd.h. Some apparently don't
15511 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015512 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15513echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015515/* confdefs.h. */
15516_ACEOF
15517cat confdefs.h >>conftest.$ac_ext
15518cat >>conftest.$ac_ext <<_ACEOF
15519/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015520
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015521#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015522#ifdef _POSIX_THREADS
15523yes
15524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
15526_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015528 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015529 unistd_defines_pthreads=yes
15530else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015531 unistd_defines_pthreads=no
15532fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000015533rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015535 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15536echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015539#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015540_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015543 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15544echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015545if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015547fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015548{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15549echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15553echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015555/* confdefs.h. */
15556_ACEOF
15557cat confdefs.h >>conftest.$ac_ext
15558cat >>conftest.$ac_ext <<_ACEOF
15559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015560$ac_includes_default
15561#include <cthreads.h>
15562_ACEOF
15563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564if { (ac_try="$ac_compile"
15565case "(($ac_try" in
15566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15567 *) ac_try_echo=$ac_try;;
15568esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015572 grep -v '^ *+' conftest.er1 >conftest.err
15573 rm -f conftest.er1
15574 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576 (exit $ac_status); } && {
15577 test -z "$ac_c_werror_flag" ||
15578 test ! -s conftest.err
15579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 ac_header_compiler=yes
15581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015583sed 's/^/| /' conftest.$ac_ext >&5
15584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587
15588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015589{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15590echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
15592# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15594echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015596/* confdefs.h. */
15597_ACEOF
15598cat confdefs.h >>conftest.$ac_ext
15599cat >>conftest.$ac_ext <<_ACEOF
15600/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015601#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015603if { (ac_try="$ac_cpp conftest.$ac_ext"
15604case "(($ac_try" in
15605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15606 *) ac_try_echo=$ac_try;;
15607esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015611 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 rm -f conftest.er1
15613 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015615 (exit $ac_status); } >/dev/null && {
15616 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15617 test ! -s conftest.err
15618 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ac_header_preproc=yes
15620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015622sed 's/^/| /' conftest.$ac_ext >&5
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626
Martin v. Löwis11437992002-04-12 09:54:03 +000015627rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015628{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15629echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
15631# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015632case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15633 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015634 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15635echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15636 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15637echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015638 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015639 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015641 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15642echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15643 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15644echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15645 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15646echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15647 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15648echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15649 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15650echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15651 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15652echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015654## -------------------------------------- ##
15655## Report this to http://bugs.python.org/ ##
15656## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015657_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015659 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015661{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15662echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015663if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015665else
15666 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015667fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015668{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15669echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
15671fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015672if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015674#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015676
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015678#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015679_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
15682cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015683#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015684_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015685
15686 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015687 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015688else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015691 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15692echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015693if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015695fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015696{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15697echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015698else
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015700{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15701echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015703/* confdefs.h. */
15704_ACEOF
15705cat confdefs.h >>conftest.$ac_ext
15706cat >>conftest.$ac_ext <<_ACEOF
15707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015708$ac_includes_default
15709#include <mach/cthreads.h>
15710_ACEOF
15711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712if { (ac_try="$ac_compile"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
15727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 ac_header_compiler=yes
15729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015731sed 's/^/| /' conftest.$ac_ext >&5
15732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735
15736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015737{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15738echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015739
15740# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15742echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015749#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751if { (ac_try="$ac_cpp conftest.$ac_ext"
15752case "(($ac_try" in
15753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15754 *) ac_try_echo=$ac_try;;
15755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 rm -f conftest.er1
15761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763 (exit $ac_status); } >/dev/null && {
15764 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15765 test ! -s conftest.err
15766 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_header_preproc=yes
15768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015770sed 's/^/| /' conftest.$ac_ext >&5
15771
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774
Martin v. Löwis11437992002-04-12 09:54:03 +000015775rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015776{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15777echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15781 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015782 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15783echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15784 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15785echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015786 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015787 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015789 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15790echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15791 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15792echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15793 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15794echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15795 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15796echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15797 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15798echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15799 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15800echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015802## -------------------------------------- ##
15803## Report this to http://bugs.python.org/ ##
15804## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015805_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015807 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015809{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15810echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015811if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015813else
15814 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015815fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015816{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15817echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015822#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015826#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015827_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015831#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015832_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015833
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015834 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015835else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015836
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015837 # Just looking for pthread_create in libpthread is not enough:
15838 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15839 # So we really have to include pthread.h, and then link.
15840 _libs=$LIBS
15841 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015842 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15843echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* confdefs.h. */
15846_ACEOF
15847cat confdefs.h >>conftest.$ac_ext
15848cat >>conftest.$ac_ext <<_ACEOF
15849/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015850#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015851
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015852void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015853int
15854main ()
15855{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015856
15857pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 ;
15859 return 0;
15860}
15861_ACEOF
15862rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863if { (ac_try="$ac_link"
15864case "(($ac_try" in
15865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15866 *) ac_try_echo=$ac_try;;
15867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015871 grep -v '^ *+' conftest.er1 >conftest.err
15872 rm -f conftest.er1
15873 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875 (exit $ac_status); } && {
15876 test -z "$ac_c_werror_flag" ||
15877 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015878 } && test -s conftest$ac_exeext &&
15879 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015881 { echo "$as_me:$LINENO: result: yes" >&5
15882echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015884#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015885_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015886
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015887 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015888 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015891sed 's/^/| /' conftest.$ac_ext >&5
15892
Martin v. Löwis11437992002-04-12 09:54:03 +000015893
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015894 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015895 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15896echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015897if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015899else
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015901/* confdefs.h. */
15902_ACEOF
15903cat confdefs.h >>conftest.$ac_ext
15904cat >>conftest.$ac_ext <<_ACEOF
15905/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015906/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15908#define pthread_detach innocuous_pthread_detach
15909
Guido van Rossumad678af1998-10-02 14:42:15 +000015910/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015911 which can conflict with char pthread_detach (); below.
15912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015913 <limits.h> exists even on freestanding compilers. */
15914
15915#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015916# include <limits.h>
15917#else
15918# include <assert.h>
15919#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015920
15921#undef pthread_detach
15922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923/* Override any GCC internal prototype to avoid an error.
15924 Use char because int might match the return type of a GCC
15925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015926#ifdef __cplusplus
15927extern "C"
15928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015929char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015930/* The GNU C library defines this for functions which it implements
15931 to always fail with ENOSYS. Some functions are actually named
15932 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015934choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015935#endif
15936
Skip Montanaro6dead952003-09-25 14:50:04 +000015937int
15938main ()
15939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 ;
15942 return 0;
15943}
15944_ACEOF
15945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015946if { (ac_try="$ac_link"
15947case "(($ac_try" in
15948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15949 *) ac_try_echo=$ac_try;;
15950esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015954 grep -v '^ *+' conftest.er1 >conftest.err
15955 rm -f conftest.er1
15956 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958 (exit $ac_status); } && {
15959 test -z "$ac_c_werror_flag" ||
15960 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015961 } && test -s conftest$ac_exeext &&
15962 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015966sed 's/^/| /' conftest.$ac_ext >&5
15967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970
15971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015973fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015974{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15975echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15976if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015977 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015978#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015979_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015980
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015981 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015982 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015983else
Guido van Rossumad678af1998-10-02 14:42:15 +000015984
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015985 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15986echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015987if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015988 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015989else
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015991LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999/* Override any GCC internal prototype to avoid an error.
16000 Use char because int might match the return type of a GCC
16001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016002#ifdef __cplusplus
16003extern "C"
16004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016005char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016006int
16007main ()
16008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 ;
16011 return 0;
16012}
16013_ACEOF
16014rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016015if { (ac_try="$ac_link"
16016case "(($ac_try" in
16017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16018 *) ac_try_echo=$ac_try;;
16019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016023 grep -v '^ *+' conftest.er1 >conftest.err
16024 rm -f conftest.er1
16025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027 (exit $ac_status); } && {
16028 test -z "$ac_c_werror_flag" ||
16029 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016030 } && test -s conftest$ac_exeext &&
16031 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016035sed 's/^/| /' conftest.$ac_ext >&5
16036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039
16040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016042LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016043fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016044{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16045echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16046if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016048#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016049_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016051 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016052 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016053 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016054else
Greg Steinadf63d62000-07-05 10:38:09 +000016055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016056 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16057echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016058if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016059 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016060else
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016062LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016064/* confdefs.h. */
16065_ACEOF
16066cat confdefs.h >>conftest.$ac_ext
16067cat >>conftest.$ac_ext <<_ACEOF
16068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070/* Override any GCC internal prototype to avoid an error.
16071 Use char because int might match the return type of a GCC
16072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016073#ifdef __cplusplus
16074extern "C"
16075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016076char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016077int
16078main ()
16079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 ;
16082 return 0;
16083}
16084_ACEOF
16085rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086if { (ac_try="$ac_link"
16087case "(($ac_try" in
16088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16089 *) ac_try_echo=$ac_try;;
16090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016094 grep -v '^ *+' conftest.er1 >conftest.err
16095 rm -f conftest.er1
16096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 (exit $ac_status); } && {
16099 test -z "$ac_c_werror_flag" ||
16100 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016101 } && test -s conftest$ac_exeext &&
16102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016106sed 's/^/| /' conftest.$ac_ext >&5
16107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110
16111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016113LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016114fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016115{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16116echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16117if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016118 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016119#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016120_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016121
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016122 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016123 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016124 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016125else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016126
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016127 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16128echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016129if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016131else
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016133LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016135/* confdefs.h. */
16136_ACEOF
16137cat confdefs.h >>conftest.$ac_ext
16138cat >>conftest.$ac_ext <<_ACEOF
16139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141/* Override any GCC internal prototype to avoid an error.
16142 Use char because int might match the return type of a GCC
16143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016144#ifdef __cplusplus
16145extern "C"
16146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016147char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016148int
16149main ()
16150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 ;
16153 return 0;
16154}
16155_ACEOF
16156rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157if { (ac_try="$ac_link"
16158case "(($ac_try" in
16159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16160 *) ac_try_echo=$ac_try;;
16161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016165 grep -v '^ *+' conftest.er1 >conftest.err
16166 rm -f conftest.er1
16167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 (exit $ac_status); } && {
16170 test -z "$ac_c_werror_flag" ||
16171 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016172 } && test -s conftest$ac_exeext &&
16173 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016177sed 's/^/| /' conftest.$ac_ext >&5
16178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016181
16182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016184LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016185fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016186{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16187echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16188if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016190#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016191_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016193 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016194 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016195 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016197
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016198 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16199echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016200if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016202else
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016204LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212/* Override any GCC internal prototype to avoid an error.
16213 Use char because int might match the return type of a GCC
16214 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016215#ifdef __cplusplus
16216extern "C"
16217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016218char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016219int
16220main ()
16221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 ;
16224 return 0;
16225}
16226_ACEOF
16227rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228if { (ac_try="$ac_link"
16229case "(($ac_try" in
16230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16231 *) ac_try_echo=$ac_try;;
16232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016236 grep -v '^ *+' conftest.er1 >conftest.err
16237 rm -f conftest.er1
16238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240 (exit $ac_status); } && {
16241 test -z "$ac_c_werror_flag" ||
16242 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016243 } && test -s conftest$ac_exeext &&
16244 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016248sed 's/^/| /' conftest.$ac_ext >&5
16249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252
16253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016255LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016256fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016257{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16258echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16259if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016261#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016262_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016264 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016265 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016266 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016267else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016268
Martin v. Löwis130fb172001-07-19 11:00:41 +000016269 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016270fi
16271
Guido van Rossum627b2d71993-12-24 10:39:16 +000016272
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016273fi
16274
Guido van Rossum0be3e491997-05-22 20:33:33 +000016275fi
16276
Guido van Rossum49545951997-12-02 19:28:29 +000016277fi
16278
Guido van Rossumb93a8621998-05-07 13:27:32 +000016279fi
16280
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282
16283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016284 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285fi
16286
Martin v. Löwis11437992002-04-12 09:54:03 +000016287
16288fi
16289
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016290
Michael W. Hudson54241132001-12-07 15:38:26 +000016291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016292 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16293echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016294if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016296else
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016298LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016300/* confdefs.h. */
16301_ACEOF
16302cat confdefs.h >>conftest.$ac_ext
16303cat >>conftest.$ac_ext <<_ACEOF
16304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306/* Override any GCC internal prototype to avoid an error.
16307 Use char because int might match the return type of a GCC
16308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016309#ifdef __cplusplus
16310extern "C"
16311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016312char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016313int
16314main ()
16315{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 ;
16318 return 0;
16319}
16320_ACEOF
16321rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322if { (ac_try="$ac_link"
16323case "(($ac_try" in
16324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16325 *) ac_try_echo=$ac_try;;
16326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016330 grep -v '^ *+' conftest.er1 >conftest.err
16331 rm -f conftest.er1
16332 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334 (exit $ac_status); } && {
16335 test -z "$ac_c_werror_flag" ||
16336 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016337 } && test -s conftest$ac_exeext &&
16338 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016342sed 's/^/| /' conftest.$ac_ext >&5
16343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346
16347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016349LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016350fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016351{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16352echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16353if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016355#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016356_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016357
Martin v. Löwis130fb172001-07-19 11:00:41 +000016358 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016359 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016360 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016361fi
16362
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016363
Neal Norwitza978ab02002-11-02 16:58:05 +000016364 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016365 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16366echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016367if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016369else
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016371LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016373/* confdefs.h. */
16374_ACEOF
16375cat confdefs.h >>conftest.$ac_ext
16376cat >>conftest.$ac_ext <<_ACEOF
16377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016379/* Override any GCC internal prototype to avoid an error.
16380 Use char because int might match the return type of a GCC
16381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016382#ifdef __cplusplus
16383extern "C"
16384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016385char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016386int
16387main ()
16388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016389return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016390 ;
16391 return 0;
16392}
16393_ACEOF
16394rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395if { (ac_try="$ac_link"
16396case "(($ac_try" in
16397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16398 *) ac_try_echo=$ac_try;;
16399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016403 grep -v '^ *+' conftest.er1 >conftest.err
16404 rm -f conftest.er1
16405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407 (exit $ac_status); } && {
16408 test -z "$ac_c_werror_flag" ||
16409 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016410 } && test -s conftest$ac_exeext &&
16411 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016415sed 's/^/| /' conftest.$ac_ext >&5
16416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419
16420rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016422LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016423fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016424{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16425echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16426if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016429_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016430
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016431 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016432 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016433 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016434fi
16435
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016436 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016437
Martin v. Löwis130fb172001-07-19 11:00:41 +000016438 if test "$USE_THREAD_MODULE" != "#"
16439 then
16440 # If the above checks didn't disable threads, (at least) OSF1
16441 # needs this '-threads' argument during linking.
16442 case $ac_sys_system in
16443 OSF1) LDLAST=-threads;;
16444 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016445 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016446fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016447
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016448if test "$posix_threads" = "yes"; then
16449 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016450
16451cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016452#define _POSIX_THREADS 1
16453_ACEOF
16454
16455 fi
16456
16457 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16458 case $ac_sys_system/$ac_sys_release in
16459 SunOS/5.6)
16460cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016461#define HAVE_PTHREAD_DESTRUCTOR 1
16462_ACEOF
16463
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016464 ;;
16465 SunOS/5.8)
16466cat >>confdefs.h <<\_ACEOF
16467#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16468_ACEOF
16469
16470 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016471 AIX/5)
16472cat >>confdefs.h <<\_ACEOF
16473#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16474_ACEOF
16475
16476 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016477 esac
16478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016479 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16480echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016481 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016482 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016483else
16484 if test "$cross_compiling" = yes; then
16485 ac_cv_pthread_system_supported=no
16486else
16487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016493#include <pthread.h>
16494 void *foo(void *parm) {
16495 return NULL;
16496 }
16497 main() {
16498 pthread_attr_t attr;
16499 pthread_t id;
16500 if (pthread_attr_init(&attr)) exit(-1);
16501 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16502 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16503 exit(0);
16504 }
16505_ACEOF
16506rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507if { (ac_try="$ac_link"
16508case "(($ac_try" in
16509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16510 *) ac_try_echo=$ac_try;;
16511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517 { (case "(($ac_try" in
16518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16519 *) ac_try_echo=$ac_try;;
16520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016523 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016525 (exit $ac_status); }; }; then
16526 ac_cv_pthread_system_supported=yes
16527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016528 echo "$as_me: program exited with status $ac_status" >&5
16529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016530sed 's/^/| /' conftest.$ac_ext >&5
16531
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016532( exit $ac_status )
16533ac_cv_pthread_system_supported=no
16534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016535rm -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 +000016536fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538
16539
Guido van Rossum627b2d71993-12-24 10:39:16 +000016540fi
16541
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016542 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16543echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016544 if test "$ac_cv_pthread_system_supported" = "yes"; then
16545
16546cat >>confdefs.h <<\_ACEOF
16547#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16548_ACEOF
16549
16550 fi
16551
16552for ac_func in pthread_sigmask
16553do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16555{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016559else
16560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016561/* confdefs.h. */
16562_ACEOF
16563cat confdefs.h >>conftest.$ac_ext
16564cat >>conftest.$ac_ext <<_ACEOF
16565/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016566/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16568#define $ac_func innocuous_$ac_func
16569
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016570/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016571 which can conflict with char $ac_func (); below.
16572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016573 <limits.h> exists even on freestanding compilers. */
16574
16575#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016576# include <limits.h>
16577#else
16578# include <assert.h>
16579#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016580
16581#undef $ac_func
16582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583/* Override any GCC internal prototype to avoid an error.
16584 Use char because int might match the return type of a GCC
16585 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016586#ifdef __cplusplus
16587extern "C"
16588#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016589char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016590/* The GNU C library defines this for functions which it implements
16591 to always fail with ENOSYS. Some functions are actually named
16592 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016593#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016595#endif
16596
Skip Montanaro6dead952003-09-25 14:50:04 +000016597int
16598main ()
16599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016601 ;
16602 return 0;
16603}
16604_ACEOF
16605rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606if { (ac_try="$ac_link"
16607case "(($ac_try" in
16608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16609 *) ac_try_echo=$ac_try;;
16610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016614 grep -v '^ *+' conftest.er1 >conftest.err
16615 rm -f conftest.er1
16616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 (exit $ac_status); } && {
16619 test -z "$ac_c_werror_flag" ||
16620 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016621 } && test -s conftest$ac_exeext &&
16622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016623 eval "$as_ac_var=yes"
16624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016626sed 's/^/| /' conftest.$ac_ext >&5
16627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630
16631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016632 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016633fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016634ac_res=`eval echo '${'$as_ac_var'}'`
16635 { echo "$as_me:$LINENO: result: $ac_res" >&5
16636echo "${ECHO_T}$ac_res" >&6; }
16637if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016638 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016640_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016641 case $ac_sys_system in
16642 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016643
Jason Tishlerfac083d2003-07-22 15:20:49 +000016644cat >>confdefs.h <<\_ACEOF
16645#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16646_ACEOF
16647
16648 ;;
16649 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016650fi
16651done
16652
16653fi
16654
16655
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016656# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016657
16658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016659{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16660echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016662if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016664 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016665 { echo "$as_me:$LINENO: result: no" >&5
16666echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016667 ipv6=no
16668 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669 *) { echo "$as_me:$LINENO: result: yes" >&5
16670echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016672#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016673_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016674
16675 ipv6=yes
16676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016678else
Martin v. Löwis11437992002-04-12 09:54:03 +000016679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016680 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016681 { echo "$as_me:$LINENO: result: no" >&5
16682echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016683 ipv6=no
16684
16685else
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016687/* confdefs.h. */
16688_ACEOF
16689cat confdefs.h >>conftest.$ac_ext
16690cat >>conftest.$ac_ext <<_ACEOF
16691/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016692 /* AF_INET6 available check */
16693#include <sys/types.h>
16694#include <sys/socket.h>
16695main()
16696{
16697 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16698 exit(1);
16699 else
16700 exit(0);
16701}
16702
Martin v. Löwis11437992002-04-12 09:54:03 +000016703_ACEOF
16704rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705if { (ac_try="$ac_link"
16706case "(($ac_try" in
16707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16708 *) ac_try_echo=$ac_try;;
16709esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715 { (case "(($ac_try" in
16716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16717 *) ac_try_echo=$ac_try;;
16718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 { echo "$as_me:$LINENO: result: yes" >&5
16725echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016726 ipv6=yes
16727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016728 echo "$as_me: program exited with status $ac_status" >&5
16729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016730sed 's/^/| /' conftest.$ac_ext >&5
16731
Martin v. Löwis11437992002-04-12 09:54:03 +000016732( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016733{ echo "$as_me:$LINENO: result: no" >&5
16734echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016735 ipv6=no
16736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737rm -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 +000016738fi
16739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740
16741
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016742if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016743 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16744echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016746/* confdefs.h. */
16747_ACEOF
16748cat confdefs.h >>conftest.$ac_ext
16749cat >>conftest.$ac_ext <<_ACEOF
16750/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016751#include <sys/types.h>
16752#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016753int
16754main ()
16755{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016756struct sockaddr_in6 x;
16757x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016758 ;
16759 return 0;
16760}
16761_ACEOF
16762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763if { (ac_try="$ac_compile"
16764case "(($ac_try" in
16765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16766 *) ac_try_echo=$ac_try;;
16767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 grep -v '^ *+' conftest.er1 >conftest.err
16772 rm -f conftest.er1
16773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775 (exit $ac_status); } && {
16776 test -z "$ac_c_werror_flag" ||
16777 test ! -s conftest.err
16778 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016779 { echo "$as_me:$LINENO: result: yes" >&5
16780echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016781 ipv6=yes
16782else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016784sed 's/^/| /' conftest.$ac_ext >&5
16785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016786 { echo "$as_me:$LINENO: result: no" >&5
16787echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016788 ipv6=no
16789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790
16791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016792fi
16793
16794if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016796#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016797_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016798
16799fi
16800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801fi
16802
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016803
16804ipv6type=unknown
16805ipv6lib=none
16806ipv6trylibc=no
16807
16808if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016809 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16810echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016811 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16812 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016813 case $i in
16814 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016816/* confdefs.h. */
16817_ACEOF
16818cat confdefs.h >>conftest.$ac_ext
16819cat >>conftest.$ac_ext <<_ACEOF
16820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016822#include <netinet/in.h>
16823#ifdef IPV6_INRIA_VERSION
16824yes
16825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016828 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016829 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016830fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016831rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016832
16833 ;;
16834 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016836/* confdefs.h. */
16837_ACEOF
16838cat confdefs.h >>conftest.$ac_ext
16839cat >>conftest.$ac_ext <<_ACEOF
16840/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016842#include <netinet/in.h>
16843#ifdef __KAME__
16844yes
16845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016846_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016848 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016849 ipv6type=$i;
16850 ipv6lib=inet6
16851 ipv6libdir=/usr/local/v6/lib
16852 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016853fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016854rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016855
16856 ;;
16857 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016859/* confdefs.h. */
16860_ACEOF
16861cat confdefs.h >>conftest.$ac_ext
16862cat >>conftest.$ac_ext <<_ACEOF
16863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016865#include <features.h>
16866#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16867yes
16868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016872 ipv6type=$i;
16873 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016874fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016875rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016876
16877 ;;
16878 linux-inet6)
16879 if test -d /usr/inet6; then
16880 ipv6type=$i
16881 ipv6lib=inet6
16882 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016883 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016884 fi
16885 ;;
16886 solaris)
16887 if test -f /etc/netconfig; then
16888 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16889 ipv6type=$i
16890 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016891 fi
16892 fi
16893 ;;
16894 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016902#include <sys/param.h>
16903#ifdef _TOSHIBA_INET6
16904yes
16905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016908 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016909 ipv6type=$i;
16910 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016911 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016912fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016914
16915 ;;
16916 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016918/* confdefs.h. */
16919_ACEOF
16920cat confdefs.h >>conftest.$ac_ext
16921cat >>conftest.$ac_ext <<_ACEOF
16922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016924#include </usr/local/v6/include/sys/v6config.h>
16925#ifdef __V6D__
16926yes
16927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016930 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016931 ipv6type=$i;
16932 ipv6lib=v6;
16933 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016934 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016935fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016937
16938 ;;
16939 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016941/* confdefs.h. */
16942_ACEOF
16943cat confdefs.h >>conftest.$ac_ext
16944cat >>conftest.$ac_ext <<_ACEOF
16945/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016947#include <sys/param.h>
16948#ifdef _ZETA_MINAMI_INET6
16949yes
16950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016951_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016953 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016954 ipv6type=$i;
16955 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016956 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016957fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016958rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016959
16960 ;;
16961 esac
16962 if test "$ipv6type" != "unknown"; then
16963 break
16964 fi
16965 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016966 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16967echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016968fi
16969
16970if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16971 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16972 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16973 echo "using lib$ipv6lib"
16974 else
16975 if test $ipv6trylibc = "yes"; then
16976 echo "using libc"
16977 else
16978 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16979 echo "You need to fetch lib$ipv6lib.a from appropriate"
16980 echo 'ipv6 kit and compile beforehand.'
16981 exit 1
16982 fi
16983 fi
16984fi
16985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016986{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16987echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016988cat >conftest.$ac_ext <<_ACEOF
16989/* confdefs.h. */
16990_ACEOF
16991cat confdefs.h >>conftest.$ac_ext
16992cat >>conftest.$ac_ext <<_ACEOF
16993/* end confdefs.h. */
16994#include <Carbon/Carbon.h>
16995int
16996main ()
16997{
16998FSIORefNum fRef = 0
16999 ;
17000 return 0;
17001}
17002_ACEOF
17003rm -f conftest.$ac_objext
17004if { (ac_try="$ac_compile"
17005case "(($ac_try" in
17006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17007 *) ac_try_echo=$ac_try;;
17008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017010 (eval "$ac_compile") 2>conftest.er1
17011 ac_status=$?
17012 grep -v '^ *+' conftest.er1 >conftest.err
17013 rm -f conftest.er1
17014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017016 (exit $ac_status); } && {
17017 test -z "$ac_c_werror_flag" ||
17018 test ! -s conftest.err
17019 } && test -s conftest.$ac_objext; then
17020
17021cat >>confdefs.h <<\_ACEOF
17022#define HAVE_OSX105_SDK 1
17023_ACEOF
17024
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017025 { echo "$as_me:$LINENO: result: yes" >&5
17026echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017028 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017029sed 's/^/| /' conftest.$ac_ext >&5
17030
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017031 { echo "$as_me:$LINENO: result: no" >&5
17032echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017033
17034fi
17035
17036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17037
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017038# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017039{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17040echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017043if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 withval=$with_doc_strings;
17045fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017046
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017047
17048if test -z "$with_doc_strings"
17049then with_doc_strings="yes"
17050fi
17051if test "$with_doc_strings" != "no"
17052then
17053
17054cat >>confdefs.h <<\_ACEOF
17055#define WITH_DOC_STRINGS 1
17056_ACEOF
17057
17058fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017059{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17060echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017061
Neil Schemenauera35c6882001-02-27 04:45:05 +000017062# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017063{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17064echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017067if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017069if test "$withval" != no
17070then
17071
17072cat >>confdefs.h <<\_ACEOF
17073#define WITH_TSC 1
17074_ACEOF
17075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017076 { echo "$as_me:$LINENO: result: yes" >&5
17077echo "${ECHO_T}yes" >&6; }
17078else { echo "$as_me:$LINENO: result: no" >&5
17079echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017080fi
17081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017082 { echo "$as_me:$LINENO: result: no" >&5
17083echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084fi
17085
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017086
17087# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017088{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17089echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017092if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 withval=$with_pymalloc;
17094fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017095
Neil Schemenauera35c6882001-02-27 04:45:05 +000017096
Neil Schemenauer16c22972002-03-22 15:34:49 +000017097if test -z "$with_pymalloc"
17098then with_pymalloc="yes"
17099fi
17100if test "$with_pymalloc" != "no"
17101then
Martin v. Löwis11437992002-04-12 09:54:03 +000017102
17103cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017104#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017105_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017106
17107fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017108{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17109echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017110
Benjamin Peterson05159c42009-12-03 03:01:27 +000017111# Check for Valgrind support
17112{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17113echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17114
17115# Check whether --with-valgrind was given.
17116if test "${with_valgrind+set}" = set; then
17117 withval=$with_valgrind;
17118else
17119 with_valgrind=no
17120fi
17121
17122{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17123echo "${ECHO_T}$with_valgrind" >&6; }
17124if test "$with_valgrind" != no; then
17125 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17126 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17127echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17128if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17129 echo $ECHO_N "(cached) $ECHO_C" >&6
17130fi
17131{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17132echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17133else
17134 # Is the header compilable?
17135{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17136echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17137cat >conftest.$ac_ext <<_ACEOF
17138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
17143$ac_includes_default
17144#include <valgrind/valgrind.h>
17145_ACEOF
17146rm -f conftest.$ac_objext
17147if { (ac_try="$ac_compile"
17148case "(($ac_try" in
17149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17150 *) ac_try_echo=$ac_try;;
17151esac
17152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17153 (eval "$ac_compile") 2>conftest.er1
17154 ac_status=$?
17155 grep -v '^ *+' conftest.er1 >conftest.err
17156 rm -f conftest.er1
17157 cat conftest.err >&5
17158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17159 (exit $ac_status); } && {
17160 test -z "$ac_c_werror_flag" ||
17161 test ! -s conftest.err
17162 } && test -s conftest.$ac_objext; then
17163 ac_header_compiler=yes
17164else
17165 echo "$as_me: failed program was:" >&5
17166sed 's/^/| /' conftest.$ac_ext >&5
17167
17168 ac_header_compiler=no
17169fi
17170
17171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17172{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17173echo "${ECHO_T}$ac_header_compiler" >&6; }
17174
17175# Is the header present?
17176{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17177echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17178cat >conftest.$ac_ext <<_ACEOF
17179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
17184#include <valgrind/valgrind.h>
17185_ACEOF
17186if { (ac_try="$ac_cpp conftest.$ac_ext"
17187case "(($ac_try" in
17188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17189 *) ac_try_echo=$ac_try;;
17190esac
17191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17192 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17193 ac_status=$?
17194 grep -v '^ *+' conftest.er1 >conftest.err
17195 rm -f conftest.er1
17196 cat conftest.err >&5
17197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17198 (exit $ac_status); } >/dev/null && {
17199 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17200 test ! -s conftest.err
17201 }; then
17202 ac_header_preproc=yes
17203else
17204 echo "$as_me: failed program was:" >&5
17205sed 's/^/| /' conftest.$ac_ext >&5
17206
17207 ac_header_preproc=no
17208fi
17209
17210rm -f conftest.err conftest.$ac_ext
17211{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17212echo "${ECHO_T}$ac_header_preproc" >&6; }
17213
17214# So? What about this header?
17215case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17216 yes:no: )
17217 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17218echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17219 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17220echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17221 ac_header_preproc=yes
17222 ;;
17223 no:yes:* )
17224 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17225echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17226 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17227echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17228 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17229echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17230 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17231echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17232 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17233echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17234 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17235echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17236 ( cat <<\_ASBOX
17237## -------------------------------------- ##
17238## Report this to http://bugs.python.org/ ##
17239## -------------------------------------- ##
17240_ASBOX
17241 ) | sed "s/^/$as_me: WARNING: /" >&2
17242 ;;
17243esac
17244{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17245echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17246if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17247 echo $ECHO_N "(cached) $ECHO_C" >&6
17248else
17249 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17250fi
17251{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17252echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17253
17254fi
17255if test $ac_cv_header_valgrind_valgrind_h = yes; then
17256
17257cat >>confdefs.h <<\_ACEOF
17258#define WITH_VALGRIND 1
17259_ACEOF
17260
17261else
17262 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17263echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17264 { (exit 1); exit 1; }; }
17265
17266fi
17267
17268
17269fi
17270
Barry Warsawef82cd72000-06-30 16:21:01 +000017271# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017272{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17273echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017276if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017278if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017279then
17280
17281cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017282#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017283_ACEOF
17284
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017285 { echo "$as_me:$LINENO: result: yes" >&5
17286echo "${ECHO_T}yes" >&6; }
17287else { echo "$as_me:$LINENO: result: no" >&5
17288echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017289fi
17290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017291 { echo "$as_me:$LINENO: result: no" >&5
17292echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293fi
17294
Barry Warsawef82cd72000-06-30 16:21:01 +000017295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017296# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017297
Guido van Rossum98935bf2001-09-05 19:13:16 +000017298DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017299
Guido van Rossume97ee181999-12-20 21:27:22 +000017300# the dlopen() function means we might want to use dynload_shlib.o. some
17301# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017302
Thomas Wouters3a584202000-08-05 23:28:51 +000017303for ac_func in dlopen
17304do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017305as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17306{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17307echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017310else
Martin v. Löwis11437992002-04-12 09:54:03 +000017311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017312/* confdefs.h. */
17313_ACEOF
17314cat confdefs.h >>conftest.$ac_ext
17315cat >>conftest.$ac_ext <<_ACEOF
17316/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017317/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17318 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17319#define $ac_func innocuous_$ac_func
17320
Guido van Rossume97ee181999-12-20 21:27:22 +000017321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017322 which can conflict with char $ac_func (); below.
17323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017324 <limits.h> exists even on freestanding compilers. */
17325
17326#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017327# include <limits.h>
17328#else
17329# include <assert.h>
17330#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017331
17332#undef $ac_func
17333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334/* Override any GCC internal prototype to avoid an error.
17335 Use char because int might match the return type of a GCC
17336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017337#ifdef __cplusplus
17338extern "C"
17339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017340char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017341/* The GNU C library defines this for functions which it implements
17342 to always fail with ENOSYS. Some functions are actually named
17343 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017345choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017346#endif
17347
Skip Montanaro6dead952003-09-25 14:50:04 +000017348int
17349main ()
17350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017352 ;
17353 return 0;
17354}
17355_ACEOF
17356rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357if { (ac_try="$ac_link"
17358case "(($ac_try" in
17359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360 *) ac_try_echo=$ac_try;;
17361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017365 grep -v '^ *+' conftest.er1 >conftest.err
17366 rm -f conftest.er1
17367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369 (exit $ac_status); } && {
17370 test -z "$ac_c_werror_flag" ||
17371 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017372 } && test -s conftest$ac_exeext &&
17373 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017377sed 's/^/| /' conftest.$ac_ext >&5
17378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381
17382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017383 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017384fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017385ac_res=`eval echo '${'$as_ac_var'}'`
17386 { echo "$as_me:$LINENO: result: $ac_res" >&5
17387echo "${ECHO_T}$ac_res" >&6; }
17388if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017390#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017391_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017392
Guido van Rossume97ee181999-12-20 21:27:22 +000017393fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017394done
Guido van Rossume97ee181999-12-20 21:27:22 +000017395
Michael W. Hudson54241132001-12-07 15:38:26 +000017396
Guido van Rossume97ee181999-12-20 21:27:22 +000017397# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17398# loading of modules.
17399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017400{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17401echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017402if test -z "$DYNLOADFILE"
17403then
17404 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017405 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17406 if test "$ac_cv_func_dlopen" = yes
17407 then DYNLOADFILE="dynload_shlib.o"
17408 else DYNLOADFILE="dynload_aix.o"
17409 fi
17410 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017411 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017412 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17413 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017414 *)
17415 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17416 # out any dynamic loading
17417 if test "$ac_cv_func_dlopen" = yes
17418 then DYNLOADFILE="dynload_shlib.o"
17419 else DYNLOADFILE="dynload_stub.o"
17420 fi
17421 ;;
17422 esac
17423fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017424{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17425echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017426if test "$DYNLOADFILE" != "dynload_stub.o"
17427then
Martin v. Löwis11437992002-04-12 09:54:03 +000017428
17429cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017430#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017431_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017432
17433fi
17434
Neil Schemenauer4e425612001-06-19 15:44:15 +000017435# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17436
Michael W. Hudson54241132001-12-07 15:38:26 +000017437
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017438{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17439echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017440if test -z "$MACHDEP_OBJS"
17441then
Jack Jansene578a632001-08-15 01:27:14 +000017442 MACHDEP_OBJS=$extra_machdep_objs
17443else
17444 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017446{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17447echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017448
Guido van Rossum627b2d71993-12-24 10:39:16 +000017449# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000017521
Martin v. Löwisc3001752005-01-23 09:27:24 +000017522
17523
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017524
17525
Thomas Wouterscf297e42007-02-23 15:07:44 +000017526
17527
Gregory P. Smith25523d22007-09-03 16:44:55 +000017528
Christian Heimes4e30a842007-11-30 22:12:06 +000017529
Martin v. Löwis92fab752008-03-08 10:40:41 +000017530
Martin v. Löwis823725e2008-03-24 13:39:54 +000017531
17532
Benjamin Peterson965ce872009-04-05 21:24:58 +000017533
17534
17535
17536
Martin v. Löwis011e8422009-05-05 04:43:17 +000017537
Martin v. Löwis113a0852009-05-29 17:25:39 +000017538
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017539
17540
17541
17542
Antoine Pitroub7572f02009-12-02 20:46:48 +000017543
Martin v. Löwis823725e2008-03-24 13:39:54 +000017544for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17545 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017546 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017547 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017548 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017549 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017550 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017551 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17552 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017553 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17554 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017555 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017556 truncate uname unsetenv utimes waitpid wait3 wait4 \
17557 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017558do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17560{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017564else
Martin v. Löwis11437992002-04-12 09:54:03 +000017565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017566/* confdefs.h. */
17567_ACEOF
17568cat confdefs.h >>conftest.$ac_ext
17569cat >>conftest.$ac_ext <<_ACEOF
17570/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17573#define $ac_func innocuous_$ac_func
17574
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017575/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017576 which can conflict with char $ac_func (); below.
17577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017578 <limits.h> exists even on freestanding compilers. */
17579
17580#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017581# include <limits.h>
17582#else
17583# include <assert.h>
17584#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017585
17586#undef $ac_func
17587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588/* Override any GCC internal prototype to avoid an error.
17589 Use char because int might match the return type of a GCC
17590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017591#ifdef __cplusplus
17592extern "C"
17593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017594char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017595/* The GNU C library defines this for functions which it implements
17596 to always fail with ENOSYS. Some functions are actually named
17597 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017599choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017600#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017601
Skip Montanaro6dead952003-09-25 14:50:04 +000017602int
17603main ()
17604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 ;
17607 return 0;
17608}
17609_ACEOF
17610rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611if { (ac_try="$ac_link"
17612case "(($ac_try" in
17613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17614 *) ac_try_echo=$ac_try;;
17615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017619 grep -v '^ *+' conftest.er1 >conftest.err
17620 rm -f conftest.er1
17621 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 (exit $ac_status); } && {
17624 test -z "$ac_c_werror_flag" ||
17625 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017626 } && test -s conftest$ac_exeext &&
17627 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017631sed 's/^/| /' conftest.$ac_ext >&5
17632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635
17636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017637 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017639ac_res=`eval echo '${'$as_ac_var'}'`
17640 { echo "$as_me:$LINENO: result: $ac_res" >&5
17641echo "${ECHO_T}$ac_res" >&6; }
17642if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017644#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017645_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017646
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017647fi
17648done
17649
Michael W. Hudson54241132001-12-07 15:38:26 +000017650
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017651# For some functions, having a definition is not sufficient, since
17652# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017653{ echo "$as_me:$LINENO: checking for chroot" >&5
17654echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017656/* confdefs.h. */
17657_ACEOF
17658cat confdefs.h >>conftest.$ac_ext
17659cat >>conftest.$ac_ext <<_ACEOF
17660/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017661#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017662int
17663main ()
17664{
17665void *x=chroot
17666 ;
17667 return 0;
17668}
17669_ACEOF
17670rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671if { (ac_try="$ac_compile"
17672case "(($ac_try" in
17673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17674 *) ac_try_echo=$ac_try;;
17675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017679 grep -v '^ *+' conftest.er1 >conftest.err
17680 rm -f conftest.er1
17681 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 (exit $ac_status); } && {
17684 test -z "$ac_c_werror_flag" ||
17685 test ! -s conftest.err
17686 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017687
17688cat >>confdefs.h <<\_ACEOF
17689#define HAVE_CHROOT 1
17690_ACEOF
17691
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017692 { echo "$as_me:$LINENO: result: yes" >&5
17693echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017696sed 's/^/| /' conftest.$ac_ext >&5
17697
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017698 { echo "$as_me:$LINENO: result: no" >&5
17699echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017700
17701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702
17703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017704{ echo "$as_me:$LINENO: checking for link" >&5
17705echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017707/* confdefs.h. */
17708_ACEOF
17709cat confdefs.h >>conftest.$ac_ext
17710cat >>conftest.$ac_ext <<_ACEOF
17711/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017712#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017713int
17714main ()
17715{
17716void *x=link
17717 ;
17718 return 0;
17719}
17720_ACEOF
17721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722if { (ac_try="$ac_compile"
17723case "(($ac_try" in
17724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17725 *) ac_try_echo=$ac_try;;
17726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017730 grep -v '^ *+' conftest.er1 >conftest.err
17731 rm -f conftest.er1
17732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 (exit $ac_status); } && {
17735 test -z "$ac_c_werror_flag" ||
17736 test ! -s conftest.err
17737 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017738
17739cat >>confdefs.h <<\_ACEOF
17740#define HAVE_LINK 1
17741_ACEOF
17742
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017743 { echo "$as_me:$LINENO: result: yes" >&5
17744echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017747sed 's/^/| /' conftest.$ac_ext >&5
17748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017749 { echo "$as_me:$LINENO: result: no" >&5
17750echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017751
17752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753
17754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017755{ echo "$as_me:$LINENO: checking for symlink" >&5
17756echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017758/* confdefs.h. */
17759_ACEOF
17760cat confdefs.h >>conftest.$ac_ext
17761cat >>conftest.$ac_ext <<_ACEOF
17762/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017763#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017764int
17765main ()
17766{
17767void *x=symlink
17768 ;
17769 return 0;
17770}
17771_ACEOF
17772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773if { (ac_try="$ac_compile"
17774case "(($ac_try" in
17775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17776 *) ac_try_echo=$ac_try;;
17777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017781 grep -v '^ *+' conftest.er1 >conftest.err
17782 rm -f conftest.er1
17783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785 (exit $ac_status); } && {
17786 test -z "$ac_c_werror_flag" ||
17787 test ! -s conftest.err
17788 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017789
17790cat >>confdefs.h <<\_ACEOF
17791#define HAVE_SYMLINK 1
17792_ACEOF
17793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017794 { echo "$as_me:$LINENO: result: yes" >&5
17795echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017796else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017798sed 's/^/| /' conftest.$ac_ext >&5
17799
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017800 { echo "$as_me:$LINENO: result: no" >&5
17801echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017802
17803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804
17805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017806{ echo "$as_me:$LINENO: checking for fchdir" >&5
17807echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017809/* confdefs.h. */
17810_ACEOF
17811cat confdefs.h >>conftest.$ac_ext
17812cat >>conftest.$ac_ext <<_ACEOF
17813/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017814#include <unistd.h>
17815int
17816main ()
17817{
17818void *x=fchdir
17819 ;
17820 return 0;
17821}
17822_ACEOF
17823rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824if { (ac_try="$ac_compile"
17825case "(($ac_try" in
17826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827 *) ac_try_echo=$ac_try;;
17828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017832 grep -v '^ *+' conftest.er1 >conftest.err
17833 rm -f conftest.er1
17834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836 (exit $ac_status); } && {
17837 test -z "$ac_c_werror_flag" ||
17838 test ! -s conftest.err
17839 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017840
17841cat >>confdefs.h <<\_ACEOF
17842#define HAVE_FCHDIR 1
17843_ACEOF
17844
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017845 { echo "$as_me:$LINENO: result: yes" >&5
17846echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017849sed 's/^/| /' conftest.$ac_ext >&5
17850
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017851 { echo "$as_me:$LINENO: result: no" >&5
17852echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017853
17854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855
17856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017857{ echo "$as_me:$LINENO: checking for fsync" >&5
17858echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017860/* confdefs.h. */
17861_ACEOF
17862cat confdefs.h >>conftest.$ac_ext
17863cat >>conftest.$ac_ext <<_ACEOF
17864/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017865#include <unistd.h>
17866int
17867main ()
17868{
17869void *x=fsync
17870 ;
17871 return 0;
17872}
17873_ACEOF
17874rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017875if { (ac_try="$ac_compile"
17876case "(($ac_try" in
17877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17878 *) ac_try_echo=$ac_try;;
17879esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017883 grep -v '^ *+' conftest.er1 >conftest.err
17884 rm -f conftest.er1
17885 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887 (exit $ac_status); } && {
17888 test -z "$ac_c_werror_flag" ||
17889 test ! -s conftest.err
17890 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017891
17892cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017893#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017894_ACEOF
17895
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017896 { echo "$as_me:$LINENO: result: yes" >&5
17897echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017900sed 's/^/| /' conftest.$ac_ext >&5
17901
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017902 { echo "$as_me:$LINENO: result: no" >&5
17903echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017904
17905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906
17907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017908{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17909echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017911/* confdefs.h. */
17912_ACEOF
17913cat confdefs.h >>conftest.$ac_ext
17914cat >>conftest.$ac_ext <<_ACEOF
17915/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017916#include <unistd.h>
17917int
17918main ()
17919{
17920void *x=fdatasync
17921 ;
17922 return 0;
17923}
17924_ACEOF
17925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926if { (ac_try="$ac_compile"
17927case "(($ac_try" in
17928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17929 *) ac_try_echo=$ac_try;;
17930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017934 grep -v '^ *+' conftest.er1 >conftest.err
17935 rm -f conftest.er1
17936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938 (exit $ac_status); } && {
17939 test -z "$ac_c_werror_flag" ||
17940 test ! -s conftest.err
17941 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017942
17943cat >>confdefs.h <<\_ACEOF
17944#define HAVE_FDATASYNC 1
17945_ACEOF
17946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017947 { echo "$as_me:$LINENO: result: yes" >&5
17948echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017951sed 's/^/| /' conftest.$ac_ext >&5
17952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017953 { echo "$as_me:$LINENO: result: no" >&5
17954echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017955
17956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957
17958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017959{ echo "$as_me:$LINENO: checking for epoll" >&5
17960echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017961cat >conftest.$ac_ext <<_ACEOF
17962/* confdefs.h. */
17963_ACEOF
17964cat confdefs.h >>conftest.$ac_ext
17965cat >>conftest.$ac_ext <<_ACEOF
17966/* end confdefs.h. */
17967#include <sys/epoll.h>
17968int
17969main ()
17970{
17971void *x=epoll_create
17972 ;
17973 return 0;
17974}
17975_ACEOF
17976rm -f conftest.$ac_objext
17977if { (ac_try="$ac_compile"
17978case "(($ac_try" in
17979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17980 *) ac_try_echo=$ac_try;;
17981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017983 (eval "$ac_compile") 2>conftest.er1
17984 ac_status=$?
17985 grep -v '^ *+' conftest.er1 >conftest.err
17986 rm -f conftest.er1
17987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017989 (exit $ac_status); } && {
17990 test -z "$ac_c_werror_flag" ||
17991 test ! -s conftest.err
17992 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017993
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017994cat >>confdefs.h <<\_ACEOF
17995#define HAVE_EPOLL 1
17996_ACEOF
17997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017998 { echo "$as_me:$LINENO: result: yes" >&5
17999echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018001 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018002sed 's/^/| /' conftest.$ac_ext >&5
18003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018004 { echo "$as_me:$LINENO: result: no" >&5
18005echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018006
18007fi
18008
18009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018010{ echo "$as_me:$LINENO: checking for kqueue" >&5
18011echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018012cat >conftest.$ac_ext <<_ACEOF
18013/* confdefs.h. */
18014_ACEOF
18015cat confdefs.h >>conftest.$ac_ext
18016cat >>conftest.$ac_ext <<_ACEOF
18017/* end confdefs.h. */
18018
18019#include <sys/types.h>
18020#include <sys/event.h>
18021
18022int
18023main ()
18024{
18025int x=kqueue()
18026 ;
18027 return 0;
18028}
18029_ACEOF
18030rm -f conftest.$ac_objext
18031if { (ac_try="$ac_compile"
18032case "(($ac_try" in
18033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18034 *) ac_try_echo=$ac_try;;
18035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018037 (eval "$ac_compile") 2>conftest.er1
18038 ac_status=$?
18039 grep -v '^ *+' conftest.er1 >conftest.err
18040 rm -f conftest.er1
18041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018043 (exit $ac_status); } && {
18044 test -z "$ac_c_werror_flag" ||
18045 test ! -s conftest.err
18046 } && test -s conftest.$ac_objext; then
18047
18048cat >>confdefs.h <<\_ACEOF
18049#define HAVE_KQUEUE 1
18050_ACEOF
18051
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018052 { echo "$as_me:$LINENO: result: yes" >&5
18053echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018055 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018056sed 's/^/| /' conftest.$ac_ext >&5
18057
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018058 { echo "$as_me:$LINENO: result: no" >&5
18059echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018060
18061fi
18062
18063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018064# On some systems (eg. FreeBSD 5), we would find a definition of the
18065# functions ctermid_r, setgroups in the library, but no prototype
18066# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18067# address to avoid compiler warnings and potential miscompilations
18068# because of the missing prototypes.
18069
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018070{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18071echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018073/* confdefs.h. */
18074_ACEOF
18075cat confdefs.h >>conftest.$ac_ext
18076cat >>conftest.$ac_ext <<_ACEOF
18077/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018078
18079#include "confdefs.h"
18080#include <stdio.h>
18081
Martin v. Löwisd5843682002-11-21 20:41:28 +000018082int
18083main ()
18084{
18085void* p = ctermid_r
18086 ;
18087 return 0;
18088}
18089_ACEOF
18090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091if { (ac_try="$ac_compile"
18092case "(($ac_try" in
18093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18094 *) ac_try_echo=$ac_try;;
18095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018099 grep -v '^ *+' conftest.er1 >conftest.err
18100 rm -f conftest.er1
18101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103 (exit $ac_status); } && {
18104 test -z "$ac_c_werror_flag" ||
18105 test ! -s conftest.err
18106 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018107
18108cat >>confdefs.h <<\_ACEOF
18109#define HAVE_CTERMID_R 1
18110_ACEOF
18111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018112 { echo "$as_me:$LINENO: result: yes" >&5
18113echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018116sed 's/^/| /' conftest.$ac_ext >&5
18117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018118 { echo "$as_me:$LINENO: result: no" >&5
18119echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018120
18121fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125{ echo "$as_me:$LINENO: checking for flock" >&5
18126echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018128/* confdefs.h. */
18129_ACEOF
18130cat confdefs.h >>conftest.$ac_ext
18131cat >>conftest.$ac_ext <<_ACEOF
18132/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018133
18134#include "confdefs.h"
18135#include <sys/file.h>
18136
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018137int
18138main ()
18139{
18140void* p = flock
18141 ;
18142 return 0;
18143}
18144_ACEOF
18145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146if { (ac_try="$ac_compile"
18147case "(($ac_try" in
18148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18149 *) ac_try_echo=$ac_try;;
18150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018154 grep -v '^ *+' conftest.er1 >conftest.err
18155 rm -f conftest.er1
18156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 (exit $ac_status); } && {
18159 test -z "$ac_c_werror_flag" ||
18160 test ! -s conftest.err
18161 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018162
18163cat >>confdefs.h <<\_ACEOF
18164#define HAVE_FLOCK 1
18165_ACEOF
18166
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018167 { echo "$as_me:$LINENO: result: yes" >&5
18168echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018169else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018171sed 's/^/| /' conftest.$ac_ext >&5
18172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018173 { echo "$as_me:$LINENO: result: no" >&5
18174echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018175
18176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018180{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18181echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018183/* confdefs.h. */
18184_ACEOF
18185cat confdefs.h >>conftest.$ac_ext
18186cat >>conftest.$ac_ext <<_ACEOF
18187/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018188
18189#include "confdefs.h"
18190#include <unistd.h>
18191
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018192int
18193main ()
18194{
18195void* p = getpagesize
18196 ;
18197 return 0;
18198}
18199_ACEOF
18200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201if { (ac_try="$ac_compile"
18202case "(($ac_try" in
18203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18204 *) ac_try_echo=$ac_try;;
18205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018209 grep -v '^ *+' conftest.er1 >conftest.err
18210 rm -f conftest.er1
18211 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213 (exit $ac_status); } && {
18214 test -z "$ac_c_werror_flag" ||
18215 test ! -s conftest.err
18216 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018217
18218cat >>confdefs.h <<\_ACEOF
18219#define HAVE_GETPAGESIZE 1
18220_ACEOF
18221
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018222 { echo "$as_me:$LINENO: result: yes" >&5
18223echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018226sed 's/^/| /' conftest.$ac_ext >&5
18227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018228 { echo "$as_me:$LINENO: result: no" >&5
18229echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018230
18231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232
18233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018234
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018235for ac_prog in true
18236do
18237 # Extract the first word of "$ac_prog", so it can be a program name with args.
18238set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018241if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018243else
18244 if test -n "$TRUE"; then
18245 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18246else
18247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18248for as_dir in $PATH
18249do
18250 IFS=$as_save_IFS
18251 test -z "$as_dir" && as_dir=.
18252 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253 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 +000018254 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018255 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018256 break 2
18257 fi
18258done
18259done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018261
18262fi
18263fi
18264TRUE=$ac_cv_prog_TRUE
18265if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266 { echo "$as_me:$LINENO: result: $TRUE" >&5
18267echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018269 { echo "$as_me:$LINENO: result: no" >&5
18270echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018271fi
18272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018274 test -n "$TRUE" && break
18275done
18276test -n "$TRUE" || TRUE="/bin/true"
18277
18278
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018279{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18280echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018281if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018283else
18284 ac_check_lib_save_LIBS=$LIBS
18285LIBS="-lc $LIBS"
18286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018287/* confdefs.h. */
18288_ACEOF
18289cat confdefs.h >>conftest.$ac_ext
18290cat >>conftest.$ac_ext <<_ACEOF
18291/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293/* Override any GCC internal prototype to avoid an error.
18294 Use char because int might match the return type of a GCC
18295 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018296#ifdef __cplusplus
18297extern "C"
18298#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018299char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018300int
18301main ()
18302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018304 ;
18305 return 0;
18306}
18307_ACEOF
18308rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309if { (ac_try="$ac_link"
18310case "(($ac_try" in
18311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18312 *) ac_try_echo=$ac_try;;
18313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018317 grep -v '^ *+' conftest.er1 >conftest.err
18318 rm -f conftest.er1
18319 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321 (exit $ac_status); } && {
18322 test -z "$ac_c_werror_flag" ||
18323 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018324 } && test -s conftest$ac_exeext &&
18325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018326 ac_cv_lib_c_inet_aton=yes
18327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018329sed 's/^/| /' conftest.$ac_ext >&5
18330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333
18334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018336LIBS=$ac_check_lib_save_LIBS
18337fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018338{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18339echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18340if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018341 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018342else
18343
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018344{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18345echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018346if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018348else
18349 ac_check_lib_save_LIBS=$LIBS
18350LIBS="-lresolv $LIBS"
18351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018352/* confdefs.h. */
18353_ACEOF
18354cat confdefs.h >>conftest.$ac_ext
18355cat >>conftest.$ac_ext <<_ACEOF
18356/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358/* Override any GCC internal prototype to avoid an error.
18359 Use char because int might match the return type of a GCC
18360 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018361#ifdef __cplusplus
18362extern "C"
18363#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018364char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018365int
18366main ()
18367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018369 ;
18370 return 0;
18371}
18372_ACEOF
18373rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374if { (ac_try="$ac_link"
18375case "(($ac_try" in
18376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18377 *) ac_try_echo=$ac_try;;
18378esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018382 grep -v '^ *+' conftest.er1 >conftest.err
18383 rm -f conftest.er1
18384 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 (exit $ac_status); } && {
18387 test -z "$ac_c_werror_flag" ||
18388 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018389 } && test -s conftest$ac_exeext &&
18390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018391 ac_cv_lib_resolv_inet_aton=yes
18392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018394sed 's/^/| /' conftest.$ac_ext >&5
18395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398
18399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018401LIBS=$ac_check_lib_save_LIBS
18402fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018403{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18404echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18405if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018406 cat >>confdefs.h <<_ACEOF
18407#define HAVE_LIBRESOLV 1
18408_ACEOF
18409
18410 LIBS="-lresolv $LIBS"
18411
18412fi
18413
18414
18415fi
18416
18417
Christian Heimesd0764e22007-12-04 15:00:33 +000018418# On Tru64, chflags seems to be present, but calling it will
18419# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018420{ echo "$as_me:$LINENO: checking for chflags" >&5
18421echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018422if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018423 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018424else
18425 if test "$cross_compiling" = yes; then
18426 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018427else
18428 cat >conftest.$ac_ext <<_ACEOF
18429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
18434
18435#include <sys/stat.h>
18436#include <unistd.h>
18437int main(int argc, char*argv[])
18438{
18439 if(chflags(argv[0], 0) != 0)
18440 return 1;
18441 return 0;
18442}
18443
18444_ACEOF
18445rm -f conftest$ac_exeext
18446if { (ac_try="$ac_link"
18447case "(($ac_try" in
18448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449 *) ac_try_echo=$ac_try;;
18450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018452 (eval "$ac_link") 2>&5
18453 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18456 { (case "(($ac_try" in
18457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18458 *) ac_try_echo=$ac_try;;
18459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018461 (eval "$ac_try") 2>&5
18462 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018464 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018465 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018467 echo "$as_me: program exited with status $ac_status" >&5
18468echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018469sed 's/^/| /' conftest.$ac_ext >&5
18470
18471( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018472ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018473fi
18474rm -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 +000018475fi
18476
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018477
18478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018479fi
18480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018481{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18482echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018483if test $ac_cv_have_chflags = yes
18484then
18485
18486cat >>confdefs.h <<\_ACEOF
18487#define HAVE_CHFLAGS 1
18488_ACEOF
18489
18490fi
18491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018492{ echo "$as_me:$LINENO: checking for lchflags" >&5
18493echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018494if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018495 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018496else
18497 if test "$cross_compiling" = yes; then
18498 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018499else
18500 cat >conftest.$ac_ext <<_ACEOF
18501/* confdefs.h. */
18502_ACEOF
18503cat confdefs.h >>conftest.$ac_ext
18504cat >>conftest.$ac_ext <<_ACEOF
18505/* end confdefs.h. */
18506
18507#include <sys/stat.h>
18508#include <unistd.h>
18509int main(int argc, char*argv[])
18510{
18511 if(lchflags(argv[0], 0) != 0)
18512 return 1;
18513 return 0;
18514}
18515
18516_ACEOF
18517rm -f conftest$ac_exeext
18518if { (ac_try="$ac_link"
18519case "(($ac_try" in
18520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18521 *) ac_try_echo=$ac_try;;
18522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018524 (eval "$ac_link") 2>&5
18525 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18528 { (case "(($ac_try" in
18529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18530 *) ac_try_echo=$ac_try;;
18531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018533 (eval "$ac_try") 2>&5
18534 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018536 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018537 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018539 echo "$as_me: program exited with status $ac_status" >&5
18540echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018541sed 's/^/| /' conftest.$ac_ext >&5
18542
18543( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018544ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018545fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18547fi
18548
18549
Christian Heimesd0764e22007-12-04 15:00:33 +000018550
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018551fi
18552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018553{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18554echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018555if test $ac_cv_have_lchflags = yes
18556then
18557
18558cat >>confdefs.h <<\_ACEOF
18559#define HAVE_LCHFLAGS 1
18560_ACEOF
18561
18562fi
18563
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018564case $ac_sys_system/$ac_sys_release in
18565Darwin/*)
18566 _CUR_CFLAGS="${CFLAGS}"
18567 _CUR_LDFLAGS="${LDFLAGS}"
18568 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18569 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18570 ;;
18571esac
18572
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018573{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18574echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018575if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018576 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018577else
18578 ac_check_lib_save_LIBS=$LIBS
18579LIBS="-lz $LIBS"
18580cat >conftest.$ac_ext <<_ACEOF
18581/* confdefs.h. */
18582_ACEOF
18583cat confdefs.h >>conftest.$ac_ext
18584cat >>conftest.$ac_ext <<_ACEOF
18585/* end confdefs.h. */
18586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587/* Override any GCC internal prototype to avoid an error.
18588 Use char because int might match the return type of a GCC
18589 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018590#ifdef __cplusplus
18591extern "C"
18592#endif
18593char inflateCopy ();
18594int
18595main ()
18596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018598 ;
18599 return 0;
18600}
18601_ACEOF
18602rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603if { (ac_try="$ac_link"
18604case "(($ac_try" in
18605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18606 *) ac_try_echo=$ac_try;;
18607esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018610 ac_status=$?
18611 grep -v '^ *+' conftest.er1 >conftest.err
18612 rm -f conftest.er1
18613 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018615 (exit $ac_status); } && {
18616 test -z "$ac_c_werror_flag" ||
18617 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018618 } && test -s conftest$ac_exeext &&
18619 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018620 ac_cv_lib_z_inflateCopy=yes
18621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018622 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018623sed 's/^/| /' conftest.$ac_ext >&5
18624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627
18628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018629 conftest$ac_exeext conftest.$ac_ext
18630LIBS=$ac_check_lib_save_LIBS
18631fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018632{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18633echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18634if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018635
18636cat >>confdefs.h <<\_ACEOF
18637#define HAVE_ZLIB_COPY 1
18638_ACEOF
18639
18640fi
18641
18642
18643case $ac_sys_system/$ac_sys_release in
18644Darwin/*)
18645 CFLAGS="${_CUR_CFLAGS}"
18646 LDFLAGS="${_CUR_LDFLAGS}"
18647 ;;
18648esac
18649
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018650{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18651echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018653/* confdefs.h. */
18654_ACEOF
18655cat confdefs.h >>conftest.$ac_ext
18656cat >>conftest.$ac_ext <<_ACEOF
18657/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018658
18659#include "confdefs.h"
18660#include <netdb.h>
18661
Martin v. Löwise9416172003-05-03 10:12:45 +000018662int
18663main ()
18664{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018665void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018666 ;
18667 return 0;
18668}
18669_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018670rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671if { (ac_try="$ac_link"
18672case "(($ac_try" in
18673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18674 *) ac_try_echo=$ac_try;;
18675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018677 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018679 grep -v '^ *+' conftest.er1 >conftest.err
18680 rm -f conftest.er1
18681 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683 (exit $ac_status); } && {
18684 test -z "$ac_c_werror_flag" ||
18685 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018686 } && test -s conftest$ac_exeext &&
18687 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018688
18689cat >>confdefs.h <<\_ACEOF
18690#define HAVE_HSTRERROR 1
18691_ACEOF
18692
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018693 { echo "$as_me:$LINENO: result: yes" >&5
18694echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018697sed 's/^/| /' conftest.$ac_ext >&5
18698
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018699 { echo "$as_me:$LINENO: result: no" >&5
18700echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018701
18702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703
18704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018706
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018707{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18708echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018709cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018710/* confdefs.h. */
18711_ACEOF
18712cat confdefs.h >>conftest.$ac_ext
18713cat >>conftest.$ac_ext <<_ACEOF
18714/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018715
18716#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018717#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018718#include <sys/socket.h>
18719#include <netinet/in.h>
18720#include <arpa/inet.h>
18721
Martin v. Löwise9416172003-05-03 10:12:45 +000018722int
18723main ()
18724{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018725void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018726 ;
18727 return 0;
18728}
18729_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018730rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731if { (ac_try="$ac_link"
18732case "(($ac_try" in
18733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18734 *) ac_try_echo=$ac_try;;
18735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018739 grep -v '^ *+' conftest.er1 >conftest.err
18740 rm -f conftest.er1
18741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 (exit $ac_status); } && {
18744 test -z "$ac_c_werror_flag" ||
18745 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018746 } && test -s conftest$ac_exeext &&
18747 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018748
18749cat >>confdefs.h <<\_ACEOF
18750#define HAVE_INET_ATON 1
18751_ACEOF
18752
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018753 { echo "$as_me:$LINENO: result: yes" >&5
18754echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018757sed 's/^/| /' conftest.$ac_ext >&5
18758
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018759 { echo "$as_me:$LINENO: result: no" >&5
18760echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018761
18762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018763
18764rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018767{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18768echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018770/* confdefs.h. */
18771_ACEOF
18772cat confdefs.h >>conftest.$ac_ext
18773cat >>conftest.$ac_ext <<_ACEOF
18774/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018775
18776#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018777#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018778#include <sys/socket.h>
18779#include <netinet/in.h>
18780#include <arpa/inet.h>
18781
Martin v. Löwise9416172003-05-03 10:12:45 +000018782int
18783main ()
18784{
18785void* p = inet_pton
18786 ;
18787 return 0;
18788}
18789_ACEOF
18790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791if { (ac_try="$ac_compile"
18792case "(($ac_try" in
18793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18794 *) ac_try_echo=$ac_try;;
18795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018799 grep -v '^ *+' conftest.er1 >conftest.err
18800 rm -f conftest.er1
18801 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018803 (exit $ac_status); } && {
18804 test -z "$ac_c_werror_flag" ||
18805 test ! -s conftest.err
18806 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018807
18808cat >>confdefs.h <<\_ACEOF
18809#define HAVE_INET_PTON 1
18810_ACEOF
18811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812 { echo "$as_me:$LINENO: result: yes" >&5
18813echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018814else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018816sed 's/^/| /' conftest.$ac_ext >&5
18817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018818 { echo "$as_me:$LINENO: result: no" >&5
18819echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018820
18821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822
18823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018824
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018825# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018826{ echo "$as_me:$LINENO: checking for setgroups" >&5
18827echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018829/* confdefs.h. */
18830_ACEOF
18831cat confdefs.h >>conftest.$ac_ext
18832cat >>conftest.$ac_ext <<_ACEOF
18833/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018834
18835#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018836#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018837#ifdef HAVE_GRP_H
18838#include <grp.h>
18839#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018840
Martin v. Löwisd5843682002-11-21 20:41:28 +000018841int
18842main ()
18843{
18844void* p = setgroups
18845 ;
18846 return 0;
18847}
18848_ACEOF
18849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018850if { (ac_try="$ac_compile"
18851case "(($ac_try" in
18852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18853 *) ac_try_echo=$ac_try;;
18854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018858 grep -v '^ *+' conftest.er1 >conftest.err
18859 rm -f conftest.er1
18860 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018862 (exit $ac_status); } && {
18863 test -z "$ac_c_werror_flag" ||
18864 test ! -s conftest.err
18865 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018866
18867cat >>confdefs.h <<\_ACEOF
18868#define HAVE_SETGROUPS 1
18869_ACEOF
18870
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018871 { echo "$as_me:$LINENO: result: yes" >&5
18872echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018875sed 's/^/| /' conftest.$ac_ext >&5
18876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018877 { echo "$as_me:$LINENO: result: no" >&5
18878echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018879
18880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018881
18882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018884# check for openpty and forkpty
18885
Martin v. Löwis11437992002-04-12 09:54:03 +000018886
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018887for ac_func in openpty
18888do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018889as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18890{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18891echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018892if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018894else
Martin v. Löwis11437992002-04-12 09:54:03 +000018895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018896/* confdefs.h. */
18897_ACEOF
18898cat confdefs.h >>conftest.$ac_ext
18899cat >>conftest.$ac_ext <<_ACEOF
18900/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018901/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18902 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18903#define $ac_func innocuous_$ac_func
18904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018905/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018906 which can conflict with char $ac_func (); below.
18907 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018908 <limits.h> exists even on freestanding compilers. */
18909
18910#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018911# include <limits.h>
18912#else
18913# include <assert.h>
18914#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018915
18916#undef $ac_func
18917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918/* Override any GCC internal prototype to avoid an error.
18919 Use char because int might match the return type of a GCC
18920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018921#ifdef __cplusplus
18922extern "C"
18923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018924char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018925/* The GNU C library defines this for functions which it implements
18926 to always fail with ENOSYS. Some functions are actually named
18927 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018928#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018929choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018930#endif
18931
Skip Montanaro6dead952003-09-25 14:50:04 +000018932int
18933main ()
18934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018935return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 ;
18937 return 0;
18938}
18939_ACEOF
18940rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018941if { (ac_try="$ac_link"
18942case "(($ac_try" in
18943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18944 *) ac_try_echo=$ac_try;;
18945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018949 grep -v '^ *+' conftest.er1 >conftest.err
18950 rm -f conftest.er1
18951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018953 (exit $ac_status); } && {
18954 test -z "$ac_c_werror_flag" ||
18955 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018956 } && test -s conftest$ac_exeext &&
18957 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018961sed 's/^/| /' conftest.$ac_ext >&5
18962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018963 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965
18966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018967 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018969ac_res=`eval echo '${'$as_ac_var'}'`
18970 { echo "$as_me:$LINENO: result: $ac_res" >&5
18971echo "${ECHO_T}$ac_res" >&6; }
18972if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018973 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018974#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018975_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018978 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18979echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018980if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018981 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018982else
Martin v. Löwis11437992002-04-12 09:54:03 +000018983 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018984LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018985cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018986/* confdefs.h. */
18987_ACEOF
18988cat confdefs.h >>conftest.$ac_ext
18989cat >>conftest.$ac_ext <<_ACEOF
18990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018992/* Override any GCC internal prototype to avoid an error.
18993 Use char because int might match the return type of a GCC
18994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018995#ifdef __cplusplus
18996extern "C"
18997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018998char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018999int
19000main ()
19001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019002return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019003 ;
19004 return 0;
19005}
19006_ACEOF
19007rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019008if { (ac_try="$ac_link"
19009case "(($ac_try" in
19010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19011 *) ac_try_echo=$ac_try;;
19012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019014 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019016 grep -v '^ *+' conftest.er1 >conftest.err
19017 rm -f conftest.er1
19018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020 (exit $ac_status); } && {
19021 test -z "$ac_c_werror_flag" ||
19022 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019023 } && test -s conftest$ac_exeext &&
19024 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019028sed 's/^/| /' conftest.$ac_ext >&5
19029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019030 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019032
19033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019035LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19038echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19039if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019040 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019041#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019042_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019043 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019045 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19046echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019047if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019049else
19050 ac_check_lib_save_LIBS=$LIBS
19051LIBS="-lbsd $LIBS"
19052cat >conftest.$ac_ext <<_ACEOF
19053/* confdefs.h. */
19054_ACEOF
19055cat confdefs.h >>conftest.$ac_ext
19056cat >>conftest.$ac_ext <<_ACEOF
19057/* end confdefs.h. */
19058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059/* Override any GCC internal prototype to avoid an error.
19060 Use char because int might match the return type of a GCC
19061 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019062#ifdef __cplusplus
19063extern "C"
19064#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019065char openpty ();
19066int
19067main ()
19068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019069return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019070 ;
19071 return 0;
19072}
19073_ACEOF
19074rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019075if { (ac_try="$ac_link"
19076case "(($ac_try" in
19077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19078 *) ac_try_echo=$ac_try;;
19079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019081 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019082 ac_status=$?
19083 grep -v '^ *+' conftest.er1 >conftest.err
19084 rm -f conftest.er1
19085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019087 (exit $ac_status); } && {
19088 test -z "$ac_c_werror_flag" ||
19089 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019090 } && test -s conftest$ac_exeext &&
19091 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019092 ac_cv_lib_bsd_openpty=yes
19093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019094 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019095sed 's/^/| /' conftest.$ac_ext >&5
19096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099
19100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019101 conftest$ac_exeext conftest.$ac_ext
19102LIBS=$ac_check_lib_save_LIBS
19103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019104{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19105echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19106if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019107 cat >>confdefs.h <<\_ACEOF
19108#define HAVE_OPENPTY 1
19109_ACEOF
19110 LIBS="$LIBS -lbsd"
19111fi
19112
19113
19114fi
19115
Fred Drake8cef4cf2000-06-28 16:40:38 +000019116
19117fi
19118done
19119
Martin v. Löwis11437992002-04-12 09:54:03 +000019120
Fred Drake8cef4cf2000-06-28 16:40:38 +000019121for ac_func in forkpty
19122do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019123as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19124{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19125echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019126if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019127 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019128else
Martin v. Löwis11437992002-04-12 09:54:03 +000019129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019130/* confdefs.h. */
19131_ACEOF
19132cat confdefs.h >>conftest.$ac_ext
19133cat >>conftest.$ac_ext <<_ACEOF
19134/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019135/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19136 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19137#define $ac_func innocuous_$ac_func
19138
Fred Drake8cef4cf2000-06-28 16:40:38 +000019139/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019140 which can conflict with char $ac_func (); below.
19141 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019142 <limits.h> exists even on freestanding compilers. */
19143
19144#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019145# include <limits.h>
19146#else
19147# include <assert.h>
19148#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019149
19150#undef $ac_func
19151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019152/* Override any GCC internal prototype to avoid an error.
19153 Use char because int might match the return type of a GCC
19154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019155#ifdef __cplusplus
19156extern "C"
19157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019158char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019159/* The GNU C library defines this for functions which it implements
19160 to always fail with ENOSYS. Some functions are actually named
19161 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019162#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019163choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019164#endif
19165
Skip Montanaro6dead952003-09-25 14:50:04 +000019166int
19167main ()
19168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019170 ;
19171 return 0;
19172}
19173_ACEOF
19174rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019175if { (ac_try="$ac_link"
19176case "(($ac_try" in
19177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19178 *) ac_try_echo=$ac_try;;
19179esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019183 grep -v '^ *+' conftest.er1 >conftest.err
19184 rm -f conftest.er1
19185 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019187 (exit $ac_status); } && {
19188 test -z "$ac_c_werror_flag" ||
19189 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019190 } && test -s conftest$ac_exeext &&
19191 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019192 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019195sed 's/^/| /' conftest.$ac_ext >&5
19196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019197 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019199
19200rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019201 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019202fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019203ac_res=`eval echo '${'$as_ac_var'}'`
19204 { echo "$as_me:$LINENO: result: $ac_res" >&5
19205echo "${ECHO_T}$ac_res" >&6; }
19206if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019207 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019208#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019209_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019210
Fred Drake8cef4cf2000-06-28 16:40:38 +000019211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019212 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19213echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019214if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019215 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019216else
Martin v. Löwis11437992002-04-12 09:54:03 +000019217 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019218LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019220/* confdefs.h. */
19221_ACEOF
19222cat confdefs.h >>conftest.$ac_ext
19223cat >>conftest.$ac_ext <<_ACEOF
19224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019226/* Override any GCC internal prototype to avoid an error.
19227 Use char because int might match the return type of a GCC
19228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019229#ifdef __cplusplus
19230extern "C"
19231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019232char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019233int
19234main ()
19235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019236return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019237 ;
19238 return 0;
19239}
19240_ACEOF
19241rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019242if { (ac_try="$ac_link"
19243case "(($ac_try" in
19244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19245 *) ac_try_echo=$ac_try;;
19246esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019250 grep -v '^ *+' conftest.er1 >conftest.err
19251 rm -f conftest.er1
19252 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019254 (exit $ac_status); } && {
19255 test -z "$ac_c_werror_flag" ||
19256 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019257 } && test -s conftest$ac_exeext &&
19258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262sed 's/^/| /' conftest.$ac_ext >&5
19263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019264 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019266
19267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019269LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019271{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19272echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19273if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019275#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019276_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019277 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019279 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19280echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019281if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019283else
19284 ac_check_lib_save_LIBS=$LIBS
19285LIBS="-lbsd $LIBS"
19286cat >conftest.$ac_ext <<_ACEOF
19287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
19292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019293/* Override any GCC internal prototype to avoid an error.
19294 Use char because int might match the return type of a GCC
19295 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019296#ifdef __cplusplus
19297extern "C"
19298#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019299char forkpty ();
19300int
19301main ()
19302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019303return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019304 ;
19305 return 0;
19306}
19307_ACEOF
19308rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019309if { (ac_try="$ac_link"
19310case "(($ac_try" in
19311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19312 *) ac_try_echo=$ac_try;;
19313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019316 ac_status=$?
19317 grep -v '^ *+' conftest.er1 >conftest.err
19318 rm -f conftest.er1
19319 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019321 (exit $ac_status); } && {
19322 test -z "$ac_c_werror_flag" ||
19323 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019324 } && test -s conftest$ac_exeext &&
19325 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019326 ac_cv_lib_bsd_forkpty=yes
19327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019328 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019329sed 's/^/| /' conftest.$ac_ext >&5
19330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019333
19334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019335 conftest$ac_exeext conftest.$ac_ext
19336LIBS=$ac_check_lib_save_LIBS
19337fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019338{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19339echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19340if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019341 cat >>confdefs.h <<\_ACEOF
19342#define HAVE_FORKPTY 1
19343_ACEOF
19344 LIBS="$LIBS -lbsd"
19345fi
19346
19347
19348fi
19349
Fred Drake8cef4cf2000-06-28 16:40:38 +000019350
19351fi
19352done
19353
Jack Jansendd19cf82001-12-06 22:36:17 +000019354
Christian Heimesb186d002008-03-18 15:15:01 +000019355# Stuff for expat.
19356
19357for ac_func in memmove
19358do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019359as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19360{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19361echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019362if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019363 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019364else
19365 cat >conftest.$ac_ext <<_ACEOF
19366/* confdefs.h. */
19367_ACEOF
19368cat confdefs.h >>conftest.$ac_ext
19369cat >>conftest.$ac_ext <<_ACEOF
19370/* end confdefs.h. */
19371/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19372 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19373#define $ac_func innocuous_$ac_func
19374
19375/* System header to define __stub macros and hopefully few prototypes,
19376 which can conflict with char $ac_func (); below.
19377 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19378 <limits.h> exists even on freestanding compilers. */
19379
19380#ifdef __STDC__
19381# include <limits.h>
19382#else
19383# include <assert.h>
19384#endif
19385
19386#undef $ac_func
19387
19388/* Override any GCC internal prototype to avoid an error.
19389 Use char because int might match the return type of a GCC
19390 builtin and then its argument prototype would still apply. */
19391#ifdef __cplusplus
19392extern "C"
19393#endif
19394char $ac_func ();
19395/* The GNU C library defines this for functions which it implements
19396 to always fail with ENOSYS. Some functions are actually named
19397 something starting with __ and the normal name is an alias. */
19398#if defined __stub_$ac_func || defined __stub___$ac_func
19399choke me
19400#endif
19401
19402int
19403main ()
19404{
19405return $ac_func ();
19406 ;
19407 return 0;
19408}
19409_ACEOF
19410rm -f conftest.$ac_objext conftest$ac_exeext
19411if { (ac_try="$ac_link"
19412case "(($ac_try" in
19413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19414 *) ac_try_echo=$ac_try;;
19415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019417 (eval "$ac_link") 2>conftest.er1
19418 ac_status=$?
19419 grep -v '^ *+' conftest.er1 >conftest.err
19420 rm -f conftest.er1
19421 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019423 (exit $ac_status); } && {
19424 test -z "$ac_c_werror_flag" ||
19425 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019426 } && test -s conftest$ac_exeext &&
19427 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019428 eval "$as_ac_var=yes"
19429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019430 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019431sed 's/^/| /' conftest.$ac_ext >&5
19432
19433 eval "$as_ac_var=no"
19434fi
19435
19436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19437 conftest$ac_exeext conftest.$ac_ext
19438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019439ac_res=`eval echo '${'$as_ac_var'}'`
19440 { echo "$as_me:$LINENO: result: $ac_res" >&5
19441echo "${ECHO_T}$ac_res" >&6; }
19442if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019443 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019444#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019445_ACEOF
19446
19447fi
19448done
19449
19450
Michael W. Hudson54241132001-12-07 15:38:26 +000019451# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019452
19453
19454
19455
19456
19457
Fred Drake8cef4cf2000-06-28 16:40:38 +000019458for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19459do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19461{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019463if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019465else
Martin v. Löwis11437992002-04-12 09:54:03 +000019466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019467/* confdefs.h. */
19468_ACEOF
19469cat confdefs.h >>conftest.$ac_ext
19470cat >>conftest.$ac_ext <<_ACEOF
19471/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019472/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19473 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19474#define $ac_func innocuous_$ac_func
19475
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019476/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019477 which can conflict with char $ac_func (); below.
19478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019479 <limits.h> exists even on freestanding compilers. */
19480
19481#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019482# include <limits.h>
19483#else
19484# include <assert.h>
19485#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019486
19487#undef $ac_func
19488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489/* Override any GCC internal prototype to avoid an error.
19490 Use char because int might match the return type of a GCC
19491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019492#ifdef __cplusplus
19493extern "C"
19494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019495char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019496/* The GNU C library defines this for functions which it implements
19497 to always fail with ENOSYS. Some functions are actually named
19498 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019500choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019501#endif
19502
Skip Montanaro6dead952003-09-25 14:50:04 +000019503int
19504main ()
19505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019506return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019507 ;
19508 return 0;
19509}
19510_ACEOF
19511rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019512if { (ac_try="$ac_link"
19513case "(($ac_try" in
19514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19515 *) ac_try_echo=$ac_try;;
19516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019520 grep -v '^ *+' conftest.er1 >conftest.err
19521 rm -f conftest.er1
19522 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524 (exit $ac_status); } && {
19525 test -z "$ac_c_werror_flag" ||
19526 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019527 } && test -s conftest$ac_exeext &&
19528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019532sed 's/^/| /' conftest.$ac_ext >&5
19533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019536
19537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019538 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019539fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019540ac_res=`eval echo '${'$as_ac_var'}'`
19541 { echo "$as_me:$LINENO: result: $ac_res" >&5
19542echo "${ECHO_T}$ac_res" >&6; }
19543if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019546_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019549done
19550
Michael W. Hudson54241132001-12-07 15:38:26 +000019551
Martin v. Löwis11437992002-04-12 09:54:03 +000019552
19553
19554
Christian Heimesb186d002008-03-18 15:15:01 +000019555for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019556do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019557as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19558{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19559echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019560if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562else
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019564/* confdefs.h. */
19565_ACEOF
19566cat confdefs.h >>conftest.$ac_ext
19567cat >>conftest.$ac_ext <<_ACEOF
19568/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019569/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19570 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19571#define $ac_func innocuous_$ac_func
19572
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019573/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019574 which can conflict with char $ac_func (); below.
19575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019576 <limits.h> exists even on freestanding compilers. */
19577
19578#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019579# include <limits.h>
19580#else
19581# include <assert.h>
19582#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019583
19584#undef $ac_func
19585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586/* Override any GCC internal prototype to avoid an error.
19587 Use char because int might match the return type of a GCC
19588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019589#ifdef __cplusplus
19590extern "C"
19591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019592char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019593/* The GNU C library defines this for functions which it implements
19594 to always fail with ENOSYS. Some functions are actually named
19595 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019596#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019597choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019598#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599
Skip Montanaro6dead952003-09-25 14:50:04 +000019600int
19601main ()
19602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019603return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 ;
19605 return 0;
19606}
19607_ACEOF
19608rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019609if { (ac_try="$ac_link"
19610case "(($ac_try" in
19611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19612 *) ac_try_echo=$ac_try;;
19613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617 grep -v '^ *+' conftest.er1 >conftest.err
19618 rm -f conftest.er1
19619 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019621 (exit $ac_status); } && {
19622 test -z "$ac_c_werror_flag" ||
19623 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019624 } && test -s conftest$ac_exeext &&
19625 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019626 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019627else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019629sed 's/^/| /' conftest.$ac_ext >&5
19630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019631 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633
19634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019636fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019637ac_res=`eval echo '${'$as_ac_var'}'`
19638 { echo "$as_me:$LINENO: result: $ac_res" >&5
19639echo "${ECHO_T}$ac_res" >&6; }
19640if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019641 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019642#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019643_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019644
Martin v. Löwis1142de32002-03-29 16:28:31 +000019645else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019646 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019647 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019648 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19649 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019650esac
19651
Martin v. Löwis1142de32002-03-29 16:28:31 +000019652fi
19653done
19654
19655
Martin v. Löwis11437992002-04-12 09:54:03 +000019656
Martin v. Löwis1142de32002-03-29 16:28:31 +000019657for ac_func in getpgrp
19658do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019659as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19660{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19661echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019662if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019664else
Martin v. Löwis11437992002-04-12 09:54:03 +000019665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019666/* confdefs.h. */
19667_ACEOF
19668cat confdefs.h >>conftest.$ac_ext
19669cat >>conftest.$ac_ext <<_ACEOF
19670/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019671/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19672 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19673#define $ac_func innocuous_$ac_func
19674
Martin v. Löwis1142de32002-03-29 16:28:31 +000019675/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019676 which can conflict with char $ac_func (); below.
19677 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019678 <limits.h> exists even on freestanding compilers. */
19679
19680#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019681# include <limits.h>
19682#else
19683# include <assert.h>
19684#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019685
19686#undef $ac_func
19687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688/* Override any GCC internal prototype to avoid an error.
19689 Use char because int might match the return type of a GCC
19690 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019691#ifdef __cplusplus
19692extern "C"
19693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019694char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019695/* The GNU C library defines this for functions which it implements
19696 to always fail with ENOSYS. Some functions are actually named
19697 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019698#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019699choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019700#endif
19701
Skip Montanaro6dead952003-09-25 14:50:04 +000019702int
19703main ()
19704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019705return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019706 ;
19707 return 0;
19708}
19709_ACEOF
19710rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019711if { (ac_try="$ac_link"
19712case "(($ac_try" in
19713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19714 *) ac_try_echo=$ac_try;;
19715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019717 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019719 grep -v '^ *+' conftest.er1 >conftest.err
19720 rm -f conftest.er1
19721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019723 (exit $ac_status); } && {
19724 test -z "$ac_c_werror_flag" ||
19725 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019726 } && test -s conftest$ac_exeext &&
19727 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019728 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019731sed 's/^/| /' conftest.$ac_ext >&5
19732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019735
19736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019737 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019738fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019739ac_res=`eval echo '${'$as_ac_var'}'`
19740 { echo "$as_me:$LINENO: result: $ac_res" >&5
19741echo "${ECHO_T}$ac_res" >&6; }
19742if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019743 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019745_ACEOF
19746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019747/* confdefs.h. */
19748_ACEOF
19749cat confdefs.h >>conftest.$ac_ext
19750cat >>conftest.$ac_ext <<_ACEOF
19751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019752#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019753int
19754main ()
19755{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019756getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019757 ;
19758 return 0;
19759}
19760_ACEOF
19761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019762if { (ac_try="$ac_compile"
19763case "(($ac_try" in
19764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19765 *) ac_try_echo=$ac_try;;
19766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019770 grep -v '^ *+' conftest.er1 >conftest.err
19771 rm -f conftest.er1
19772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019774 (exit $ac_status); } && {
19775 test -z "$ac_c_werror_flag" ||
19776 test ! -s conftest.err
19777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019778
19779cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019780#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019781_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019782
Martin v. Löwis11437992002-04-12 09:54:03 +000019783
Guido van Rossumf78abae1997-01-21 22:02:36 +000019784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019786sed 's/^/| /' conftest.$ac_ext >&5
19787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019788
Guido van Rossum627b2d71993-12-24 10:39:16 +000019789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790
19791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019792
Guido van Rossum627b2d71993-12-24 10:39:16 +000019793fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019794done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019795
Jack Jansen150753c2003-03-29 22:07:47 +000019796
19797for ac_func in setpgrp
19798do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19800{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019802if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019804else
Martin v. Löwis11437992002-04-12 09:54:03 +000019805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019806/* confdefs.h. */
19807_ACEOF
19808cat confdefs.h >>conftest.$ac_ext
19809cat >>conftest.$ac_ext <<_ACEOF
19810/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019811/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19812 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19813#define $ac_func innocuous_$ac_func
19814
Jack Jansen150753c2003-03-29 22:07:47 +000019815/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019816 which can conflict with char $ac_func (); below.
19817 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019818 <limits.h> exists even on freestanding compilers. */
19819
19820#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019821# include <limits.h>
19822#else
19823# include <assert.h>
19824#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019825
19826#undef $ac_func
19827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828/* Override any GCC internal prototype to avoid an error.
19829 Use char because int might match the return type of a GCC
19830 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019831#ifdef __cplusplus
19832extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019833#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019834char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019835/* The GNU C library defines this for functions which it implements
19836 to always fail with ENOSYS. Some functions are actually named
19837 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019838#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019839choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019840#endif
19841
Skip Montanaro6dead952003-09-25 14:50:04 +000019842int
19843main ()
19844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019845return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019846 ;
19847 return 0;
19848}
19849_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019850rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019851if { (ac_try="$ac_link"
19852case "(($ac_try" in
19853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19854 *) ac_try_echo=$ac_try;;
19855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019859 grep -v '^ *+' conftest.er1 >conftest.err
19860 rm -f conftest.er1
19861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019863 (exit $ac_status); } && {
19864 test -z "$ac_c_werror_flag" ||
19865 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019866 } && test -s conftest$ac_exeext &&
19867 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019868 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019871sed 's/^/| /' conftest.$ac_ext >&5
19872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019873 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019875
19876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019877 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019878fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019879ac_res=`eval echo '${'$as_ac_var'}'`
19880 { echo "$as_me:$LINENO: result: $ac_res" >&5
19881echo "${ECHO_T}$ac_res" >&6; }
19882if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019883 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019885_ACEOF
19886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019887/* confdefs.h. */
19888_ACEOF
19889cat confdefs.h >>conftest.$ac_ext
19890cat >>conftest.$ac_ext <<_ACEOF
19891/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019892#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019893int
19894main ()
19895{
19896setpgrp(0,0);
19897 ;
19898 return 0;
19899}
19900_ACEOF
19901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902if { (ac_try="$ac_compile"
19903case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019908 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019910 grep -v '^ *+' conftest.er1 >conftest.err
19911 rm -f conftest.er1
19912 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019914 (exit $ac_status); } && {
19915 test -z "$ac_c_werror_flag" ||
19916 test ! -s conftest.err
19917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019918
19919cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019920#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019921_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019922
Jack Jansen150753c2003-03-29 22:07:47 +000019923
19924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019926sed 's/^/| /' conftest.$ac_ext >&5
19927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019928
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930
19931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019932
19933fi
19934done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019935
Martin v. Löwis11437992002-04-12 09:54:03 +000019936
Thomas Wouters3a584202000-08-05 23:28:51 +000019937for ac_func in gettimeofday
19938do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019939as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19940{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19941echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019942if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019944else
Martin v. Löwis11437992002-04-12 09:54:03 +000019945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019946/* confdefs.h. */
19947_ACEOF
19948cat confdefs.h >>conftest.$ac_ext
19949cat >>conftest.$ac_ext <<_ACEOF
19950/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019951/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19952 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19953#define $ac_func innocuous_$ac_func
19954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019955/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019956 which can conflict with char $ac_func (); below.
19957 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019958 <limits.h> exists even on freestanding compilers. */
19959
19960#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019961# include <limits.h>
19962#else
19963# include <assert.h>
19964#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019965
19966#undef $ac_func
19967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019968/* Override any GCC internal prototype to avoid an error.
19969 Use char because int might match the return type of a GCC
19970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019971#ifdef __cplusplus
19972extern "C"
19973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019974char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019975/* The GNU C library defines this for functions which it implements
19976 to always fail with ENOSYS. Some functions are actually named
19977 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019978#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019979choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019980#endif
19981
Skip Montanaro6dead952003-09-25 14:50:04 +000019982int
19983main ()
19984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019985return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019986 ;
19987 return 0;
19988}
19989_ACEOF
19990rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019991if { (ac_try="$ac_link"
19992case "(($ac_try" in
19993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19994 *) ac_try_echo=$ac_try;;
19995esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019997 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019999 grep -v '^ *+' conftest.er1 >conftest.err
20000 rm -f conftest.er1
20001 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020003 (exit $ac_status); } && {
20004 test -z "$ac_c_werror_flag" ||
20005 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020006 } && test -s conftest$ac_exeext &&
20007 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020008 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020011sed 's/^/| /' conftest.$ac_ext >&5
20012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020013 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020015
20016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020017 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020018fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020019ac_res=`eval echo '${'$as_ac_var'}'`
20020 { echo "$as_me:$LINENO: result: $ac_res" >&5
20021echo "${ECHO_T}$ac_res" >&6; }
20022if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020023 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020024#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020025_ACEOF
20026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020027/* confdefs.h. */
20028_ACEOF
20029cat confdefs.h >>conftest.$ac_ext
20030cat >>conftest.$ac_ext <<_ACEOF
20031/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020032#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020033int
20034main ()
20035{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020036gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020037 ;
20038 return 0;
20039}
20040_ACEOF
20041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020042if { (ac_try="$ac_compile"
20043case "(($ac_try" in
20044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20045 *) ac_try_echo=$ac_try;;
20046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020050 grep -v '^ *+' conftest.er1 >conftest.err
20051 rm -f conftest.er1
20052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054 (exit $ac_status); } && {
20055 test -z "$ac_c_werror_flag" ||
20056 test ! -s conftest.err
20057 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020058 :
20059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020061sed 's/^/| /' conftest.$ac_ext >&5
20062
Martin v. Löwis11437992002-04-12 09:54:03 +000020063
20064cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020065#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020066_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020067
Martin v. Löwis11437992002-04-12 09:54:03 +000020068
Guido van Rossum627b2d71993-12-24 10:39:16 +000020069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020070
20071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020072
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020073fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020074done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020075
Michael W. Hudson54241132001-12-07 15:38:26 +000020076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020077{ echo "$as_me:$LINENO: checking for major" >&5
20078echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020080/* confdefs.h. */
20081_ACEOF
20082cat confdefs.h >>conftest.$ac_ext
20083cat >>conftest.$ac_ext <<_ACEOF
20084/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020085
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020086#if defined(MAJOR_IN_MKDEV)
20087#include <sys/mkdev.h>
20088#elif defined(MAJOR_IN_SYSMACROS)
20089#include <sys/sysmacros.h>
20090#else
20091#include <sys/types.h>
20092#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020094int
20095main ()
20096{
20097
20098 makedev(major(0),minor(0));
20099
20100 ;
20101 return 0;
20102}
20103_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020104rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020105if { (ac_try="$ac_link"
20106case "(($ac_try" in
20107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20108 *) ac_try_echo=$ac_try;;
20109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020111 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020113 grep -v '^ *+' conftest.er1 >conftest.err
20114 rm -f conftest.er1
20115 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020117 (exit $ac_status); } && {
20118 test -z "$ac_c_werror_flag" ||
20119 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020120 } && test -s conftest$ac_exeext &&
20121 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020122
20123
20124cat >>confdefs.h <<\_ACEOF
20125#define HAVE_DEVICE_MACROS 1
20126_ACEOF
20127
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020128 { echo "$as_me:$LINENO: result: yes" >&5
20129echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020130
20131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020133sed 's/^/| /' conftest.$ac_ext >&5
20134
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020135
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020136 { echo "$as_me:$LINENO: result: no" >&5
20137echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020138
20139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020140
20141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020142 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020143
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020144# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020145# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020146{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20147echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020149/* confdefs.h. */
20150_ACEOF
20151cat confdefs.h >>conftest.$ac_ext
20152cat >>conftest.$ac_ext <<_ACEOF
20153/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020154
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020155#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020156#include <sys/socket.h>
20157#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020158#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020159
Martin v. Löwis11437992002-04-12 09:54:03 +000020160int
20161main ()
20162{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020163getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 ;
20165 return 0;
20166}
20167_ACEOF
20168rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169if { (ac_try="$ac_link"
20170case "(($ac_try" in
20171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20172 *) ac_try_echo=$ac_try;;
20173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177 grep -v '^ *+' conftest.er1 >conftest.err
20178 rm -f conftest.er1
20179 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 (exit $ac_status); } && {
20182 test -z "$ac_c_werror_flag" ||
20183 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020184 } && test -s conftest$ac_exeext &&
20185 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020186 have_getaddrinfo=yes
20187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020188 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020189sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020191 have_getaddrinfo=no
20192fi
20193
20194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20195 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020196{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20197echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020198if test $have_getaddrinfo = yes
20199then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020200 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20201echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020202 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020203 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020204else
20205 if test "$cross_compiling" = yes; then
20206 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020207else
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020209/* confdefs.h. */
20210_ACEOF
20211cat confdefs.h >>conftest.$ac_ext
20212cat >>conftest.$ac_ext <<_ACEOF
20213/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020214
20215#include <sys/types.h>
20216#include <netdb.h>
20217#include <string.h>
20218#include <sys/socket.h>
20219#include <netinet/in.h>
20220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020221int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020222{
20223 int passive, gaierr, inet4 = 0, inet6 = 0;
20224 struct addrinfo hints, *ai, *aitop;
20225 char straddr[INET6_ADDRSTRLEN], strport[16];
20226
20227 for (passive = 0; passive <= 1; passive++) {
20228 memset(&hints, 0, sizeof(hints));
20229 hints.ai_family = AF_UNSPEC;
20230 hints.ai_flags = passive ? AI_PASSIVE : 0;
20231 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020232 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020233 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20234 (void)gai_strerror(gaierr);
20235 goto bad;
20236 }
20237 for (ai = aitop; ai; ai = ai->ai_next) {
20238 if (ai->ai_addr == NULL ||
20239 ai->ai_addrlen == 0 ||
20240 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20241 straddr, sizeof(straddr), strport, sizeof(strport),
20242 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20243 goto bad;
20244 }
20245 switch (ai->ai_family) {
20246 case AF_INET:
20247 if (strcmp(strport, "54321") != 0) {
20248 goto bad;
20249 }
20250 if (passive) {
20251 if (strcmp(straddr, "0.0.0.0") != 0) {
20252 goto bad;
20253 }
20254 } else {
20255 if (strcmp(straddr, "127.0.0.1") != 0) {
20256 goto bad;
20257 }
20258 }
20259 inet4++;
20260 break;
20261 case AF_INET6:
20262 if (strcmp(strport, "54321") != 0) {
20263 goto bad;
20264 }
20265 if (passive) {
20266 if (strcmp(straddr, "::") != 0) {
20267 goto bad;
20268 }
20269 } else {
20270 if (strcmp(straddr, "::1") != 0) {
20271 goto bad;
20272 }
20273 }
20274 inet6++;
20275 break;
20276 case AF_UNSPEC:
20277 goto bad;
20278 break;
20279 default:
20280 /* another family support? */
20281 break;
20282 }
20283 }
20284 }
20285
20286 if (!(inet4 == 0 || inet4 == 2))
20287 goto bad;
20288 if (!(inet6 == 0 || inet6 == 2))
20289 goto bad;
20290
20291 if (aitop)
20292 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020293 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020294
20295 bad:
20296 if (aitop)
20297 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020298 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020299}
20300
Martin v. Löwis11437992002-04-12 09:54:03 +000020301_ACEOF
20302rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303if { (ac_try="$ac_link"
20304case "(($ac_try" in
20305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20306 *) ac_try_echo=$ac_try;;
20307esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020309 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020310 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313 { (case "(($ac_try" in
20314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20315 *) ac_try_echo=$ac_try;;
20316esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020318 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020319 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020322 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020324 echo "$as_me: program exited with status $ac_status" >&5
20325echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020326sed 's/^/| /' conftest.$ac_ext >&5
20327
Martin v. Löwis11437992002-04-12 09:54:03 +000020328( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020329ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020331rm -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 +000020332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020333
20334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020335fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020336
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020339if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20340then
20341 if test $ipv6 = yes
20342 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020343 echo 'Fatal: You must get working getaddrinfo() function.'
20344 echo ' or you can specify "--disable-ipv6"'.
20345 exit 1
20346 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020347else
Martin v. Löwis11437992002-04-12 09:54:03 +000020348
20349cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020350#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020351_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020352
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020354
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020355for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020356do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20358{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020360if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020361 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020362else
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020369/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20370 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20371#define $ac_func innocuous_$ac_func
20372
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020373/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020374 which can conflict with char $ac_func (); below.
20375 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020376 <limits.h> exists even on freestanding compilers. */
20377
20378#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020379# include <limits.h>
20380#else
20381# include <assert.h>
20382#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020383
20384#undef $ac_func
20385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386/* Override any GCC internal prototype to avoid an error.
20387 Use char because int might match the return type of a GCC
20388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020389#ifdef __cplusplus
20390extern "C"
20391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020392char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020393/* The GNU C library defines this for functions which it implements
20394 to always fail with ENOSYS. Some functions are actually named
20395 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020396#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020397choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020398#endif
20399
Skip Montanaro6dead952003-09-25 14:50:04 +000020400int
20401main ()
20402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 ;
20405 return 0;
20406}
20407_ACEOF
20408rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409if { (ac_try="$ac_link"
20410case "(($ac_try" in
20411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20412 *) ac_try_echo=$ac_try;;
20413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020417 grep -v '^ *+' conftest.er1 >conftest.err
20418 rm -f conftest.er1
20419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020421 (exit $ac_status); } && {
20422 test -z "$ac_c_werror_flag" ||
20423 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020424 } && test -s conftest$ac_exeext &&
20425 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020429sed 's/^/| /' conftest.$ac_ext >&5
20430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020431 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433
20434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020435 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020437ac_res=`eval echo '${'$as_ac_var'}'`
20438 { echo "$as_me:$LINENO: result: $ac_res" >&5
20439echo "${ECHO_T}$ac_res" >&6; }
20440if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020442#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020443_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020444
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020445fi
20446done
20447
Michael W. Hudson54241132001-12-07 15:38:26 +000020448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020449# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020450{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20451echo $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 +000020452if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020454else
Martin v. Löwis11437992002-04-12 09:54:03 +000020455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020456/* confdefs.h. */
20457_ACEOF
20458cat confdefs.h >>conftest.$ac_ext
20459cat >>conftest.$ac_ext <<_ACEOF
20460/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020461#include <sys/types.h>
20462#include <sys/time.h>
20463#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020464
Martin v. Löwis11437992002-04-12 09:54:03 +000020465int
20466main ()
20467{
20468if ((struct tm *) 0)
20469return 0;
20470 ;
20471 return 0;
20472}
20473_ACEOF
20474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475if { (ac_try="$ac_compile"
20476case "(($ac_try" in
20477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20478 *) ac_try_echo=$ac_try;;
20479esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020483 grep -v '^ *+' conftest.er1 >conftest.err
20484 rm -f conftest.er1
20485 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487 (exit $ac_status); } && {
20488 test -z "$ac_c_werror_flag" ||
20489 test ! -s conftest.err
20490 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020491 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020494sed 's/^/| /' conftest.$ac_ext >&5
20495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020496 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020498
20499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020501{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20502echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020503if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020504
20505cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020506#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508
20509fi
20510
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020511{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20512echo $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 +000020513if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020515else
Martin v. Löwis11437992002-04-12 09:54:03 +000020516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020517/* confdefs.h. */
20518_ACEOF
20519cat confdefs.h >>conftest.$ac_ext
20520cat >>conftest.$ac_ext <<_ACEOF
20521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020522#include <sys/types.h>
20523#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020524
Martin v. Löwis11437992002-04-12 09:54:03 +000020525int
20526main ()
20527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020528struct tm tm;
20529 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020530 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 ;
20532 return 0;
20533}
20534_ACEOF
20535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536if { (ac_try="$ac_compile"
20537case "(($ac_try" in
20538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20539 *) ac_try_echo=$ac_try;;
20540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544 grep -v '^ *+' conftest.er1 >conftest.err
20545 rm -f conftest.er1
20546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 (exit $ac_status); } && {
20549 test -z "$ac_c_werror_flag" ||
20550 test ! -s conftest.err
20551 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020552 ac_cv_struct_tm=time.h
20553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020555sed 's/^/| /' conftest.$ac_ext >&5
20556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020557 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020559
20560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020561fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020562{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20563echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020564if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020565
20566cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020567#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020568_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020569
20570fi
20571
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020572{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20573echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020574if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020576else
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020578/* confdefs.h. */
20579_ACEOF
20580cat confdefs.h >>conftest.$ac_ext
20581cat >>conftest.$ac_ext <<_ACEOF
20582/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020583#include <sys/types.h>
20584#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020585
20586
Martin v. Löwis11437992002-04-12 09:54:03 +000020587int
20588main ()
20589{
20590static struct tm ac_aggr;
20591if (ac_aggr.tm_zone)
20592return 0;
20593 ;
20594 return 0;
20595}
20596_ACEOF
20597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020598if { (ac_try="$ac_compile"
20599case "(($ac_try" in
20600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20601 *) ac_try_echo=$ac_try;;
20602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020606 grep -v '^ *+' conftest.er1 >conftest.err
20607 rm -f conftest.er1
20608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020610 (exit $ac_status); } && {
20611 test -z "$ac_c_werror_flag" ||
20612 test ! -s conftest.err
20613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020614 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020617sed 's/^/| /' conftest.$ac_ext >&5
20618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020620/* confdefs.h. */
20621_ACEOF
20622cat confdefs.h >>conftest.$ac_ext
20623cat >>conftest.$ac_ext <<_ACEOF
20624/* end confdefs.h. */
20625#include <sys/types.h>
20626#include <$ac_cv_struct_tm>
20627
20628
20629int
20630main ()
20631{
20632static struct tm ac_aggr;
20633if (sizeof ac_aggr.tm_zone)
20634return 0;
20635 ;
20636 return 0;
20637}
20638_ACEOF
20639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020640if { (ac_try="$ac_compile"
20641case "(($ac_try" in
20642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20643 *) ac_try_echo=$ac_try;;
20644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020648 grep -v '^ *+' conftest.er1 >conftest.err
20649 rm -f conftest.er1
20650 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 (exit $ac_status); } && {
20653 test -z "$ac_c_werror_flag" ||
20654 test ! -s conftest.err
20655 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020656 ac_cv_member_struct_tm_tm_zone=yes
20657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020659sed 's/^/| /' conftest.$ac_ext >&5
20660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020666
20667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020668fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020669{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20670echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20671if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020672
20673cat >>confdefs.h <<_ACEOF
20674#define HAVE_STRUCT_TM_TM_ZONE 1
20675_ACEOF
20676
20677
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020678fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020679
Martin v. Löwis11437992002-04-12 09:54:03 +000020680if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20681
20682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020683#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020685
20686else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020687 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20688echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020690 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020691else
20692 cat >conftest.$ac_ext <<_ACEOF
20693/* confdefs.h. */
20694_ACEOF
20695cat confdefs.h >>conftest.$ac_ext
20696cat >>conftest.$ac_ext <<_ACEOF
20697/* end confdefs.h. */
20698#include <time.h>
20699
20700int
20701main ()
20702{
20703#ifndef tzname
20704 (void) tzname;
20705#endif
20706
20707 ;
20708 return 0;
20709}
20710_ACEOF
20711rm -f conftest.$ac_objext
20712if { (ac_try="$ac_compile"
20713case "(($ac_try" in
20714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20715 *) ac_try_echo=$ac_try;;
20716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020718 (eval "$ac_compile") 2>conftest.er1
20719 ac_status=$?
20720 grep -v '^ *+' conftest.er1 >conftest.err
20721 rm -f conftest.er1
20722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020724 (exit $ac_status); } && {
20725 test -z "$ac_c_werror_flag" ||
20726 test ! -s conftest.err
20727 } && test -s conftest.$ac_objext; then
20728 ac_cv_have_decl_tzname=yes
20729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020730 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731sed 's/^/| /' conftest.$ac_ext >&5
20732
20733 ac_cv_have_decl_tzname=no
20734fi
20735
20736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020738{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20739echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20740if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020741
20742cat >>confdefs.h <<_ACEOF
20743#define HAVE_DECL_TZNAME 1
20744_ACEOF
20745
20746
20747else
20748 cat >>confdefs.h <<_ACEOF
20749#define HAVE_DECL_TZNAME 0
20750_ACEOF
20751
20752
20753fi
20754
20755
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020756 { echo "$as_me:$LINENO: checking for tzname" >&5
20757echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020758if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020760else
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020762/* confdefs.h. */
20763_ACEOF
20764cat confdefs.h >>conftest.$ac_ext
20765cat >>conftest.$ac_ext <<_ACEOF
20766/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020767#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020768#if !HAVE_DECL_TZNAME
20769extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020771
Martin v. Löwis11437992002-04-12 09:54:03 +000020772int
20773main ()
20774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020775return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020776 ;
20777 return 0;
20778}
20779_ACEOF
20780rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020781if { (ac_try="$ac_link"
20782case "(($ac_try" in
20783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20784 *) ac_try_echo=$ac_try;;
20785esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020787 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 grep -v '^ *+' conftest.er1 >conftest.err
20790 rm -f conftest.er1
20791 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793 (exit $ac_status); } && {
20794 test -z "$ac_c_werror_flag" ||
20795 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020796 } && test -s conftest$ac_exeext &&
20797 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020798 ac_cv_var_tzname=yes
20799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020801sed 's/^/| /' conftest.$ac_ext >&5
20802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805
20806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020807 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020808fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020809{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20810echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020811 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020812
20813cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020814#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020815_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817 fi
20818fi
20819
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020820{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20821echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020822if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020823 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020824else
20825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020826/* confdefs.h. */
20827_ACEOF
20828cat confdefs.h >>conftest.$ac_ext
20829cat >>conftest.$ac_ext <<_ACEOF
20830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020832int
20833main ()
20834{
20835static struct stat ac_aggr;
20836if (ac_aggr.st_rdev)
20837return 0;
20838 ;
20839 return 0;
20840}
20841_ACEOF
20842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843if { (ac_try="$ac_compile"
20844case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020851 grep -v '^ *+' conftest.er1 >conftest.err
20852 rm -f conftest.er1
20853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020855 (exit $ac_status); } && {
20856 test -z "$ac_c_werror_flag" ||
20857 test ! -s conftest.err
20858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 ac_cv_member_struct_stat_st_rdev=yes
20860else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020862sed 's/^/| /' conftest.$ac_ext >&5
20863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020865/* confdefs.h. */
20866_ACEOF
20867cat confdefs.h >>conftest.$ac_ext
20868cat >>conftest.$ac_ext <<_ACEOF
20869/* end confdefs.h. */
20870$ac_includes_default
20871int
20872main ()
20873{
20874static struct stat ac_aggr;
20875if (sizeof ac_aggr.st_rdev)
20876return 0;
20877 ;
20878 return 0;
20879}
20880_ACEOF
20881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020882if { (ac_try="$ac_compile"
20883case "(($ac_try" in
20884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20885 *) ac_try_echo=$ac_try;;
20886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020888 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020890 grep -v '^ *+' conftest.er1 >conftest.err
20891 rm -f conftest.er1
20892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020894 (exit $ac_status); } && {
20895 test -z "$ac_c_werror_flag" ||
20896 test ! -s conftest.err
20897 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020898 ac_cv_member_struct_stat_st_rdev=yes
20899else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020901sed 's/^/| /' conftest.$ac_ext >&5
20902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020903 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020905
20906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908
20909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020910fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020911{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20912echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20913if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020914
20915cat >>confdefs.h <<_ACEOF
20916#define HAVE_STRUCT_STAT_ST_RDEV 1
20917_ACEOF
20918
20919
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020920fi
20921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020922{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20923echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020924if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020926else
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020928/* confdefs.h. */
20929_ACEOF
20930cat confdefs.h >>conftest.$ac_ext
20931cat >>conftest.$ac_ext <<_ACEOF
20932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020933$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020934int
20935main ()
20936{
20937static struct stat ac_aggr;
20938if (ac_aggr.st_blksize)
20939return 0;
20940 ;
20941 return 0;
20942}
20943_ACEOF
20944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020945if { (ac_try="$ac_compile"
20946case "(($ac_try" in
20947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20948 *) ac_try_echo=$ac_try;;
20949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020953 grep -v '^ *+' conftest.er1 >conftest.err
20954 rm -f conftest.er1
20955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020957 (exit $ac_status); } && {
20958 test -z "$ac_c_werror_flag" ||
20959 test ! -s conftest.err
20960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020964sed 's/^/| /' conftest.$ac_ext >&5
20965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020967/* confdefs.h. */
20968_ACEOF
20969cat confdefs.h >>conftest.$ac_ext
20970cat >>conftest.$ac_ext <<_ACEOF
20971/* end confdefs.h. */
20972$ac_includes_default
20973int
20974main ()
20975{
20976static struct stat ac_aggr;
20977if (sizeof ac_aggr.st_blksize)
20978return 0;
20979 ;
20980 return 0;
20981}
20982_ACEOF
20983rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020984if { (ac_try="$ac_compile"
20985case "(($ac_try" in
20986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20987 *) ac_try_echo=$ac_try;;
20988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020990 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020992 grep -v '^ *+' conftest.er1 >conftest.err
20993 rm -f conftest.er1
20994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996 (exit $ac_status); } && {
20997 test -z "$ac_c_werror_flag" ||
20998 test ! -s conftest.err
20999 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021000 ac_cv_member_struct_stat_st_blksize=yes
21001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021003sed 's/^/| /' conftest.$ac_ext >&5
21004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021005 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021007
21008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010
21011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021012fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021013{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21014echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21015if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021016
Martin v. Löwis11437992002-04-12 09:54:03 +000021017cat >>confdefs.h <<_ACEOF
21018#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21019_ACEOF
21020
21021
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021022fi
21023
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021024{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21025echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021026if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021027 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021028else
21029 cat >conftest.$ac_ext <<_ACEOF
21030/* confdefs.h. */
21031_ACEOF
21032cat confdefs.h >>conftest.$ac_ext
21033cat >>conftest.$ac_ext <<_ACEOF
21034/* end confdefs.h. */
21035$ac_includes_default
21036int
21037main ()
21038{
21039static struct stat ac_aggr;
21040if (ac_aggr.st_flags)
21041return 0;
21042 ;
21043 return 0;
21044}
21045_ACEOF
21046rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021047if { (ac_try="$ac_compile"
21048case "(($ac_try" in
21049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21050 *) ac_try_echo=$ac_try;;
21051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021053 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021054 ac_status=$?
21055 grep -v '^ *+' conftest.er1 >conftest.err
21056 rm -f conftest.er1
21057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021059 (exit $ac_status); } && {
21060 test -z "$ac_c_werror_flag" ||
21061 test ! -s conftest.err
21062 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021063 ac_cv_member_struct_stat_st_flags=yes
21064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021065 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021066sed 's/^/| /' conftest.$ac_ext >&5
21067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021068 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021069/* confdefs.h. */
21070_ACEOF
21071cat confdefs.h >>conftest.$ac_ext
21072cat >>conftest.$ac_ext <<_ACEOF
21073/* end confdefs.h. */
21074$ac_includes_default
21075int
21076main ()
21077{
21078static struct stat ac_aggr;
21079if (sizeof ac_aggr.st_flags)
21080return 0;
21081 ;
21082 return 0;
21083}
21084_ACEOF
21085rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021086if { (ac_try="$ac_compile"
21087case "(($ac_try" in
21088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21089 *) ac_try_echo=$ac_try;;
21090esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021092 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021093 ac_status=$?
21094 grep -v '^ *+' conftest.er1 >conftest.err
21095 rm -f conftest.er1
21096 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021098 (exit $ac_status); } && {
21099 test -z "$ac_c_werror_flag" ||
21100 test ! -s conftest.err
21101 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021102 ac_cv_member_struct_stat_st_flags=yes
21103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021104 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021105sed 's/^/| /' conftest.$ac_ext >&5
21106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021107 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109
21110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021112
21113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021114fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021115{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21116echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21117if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021118
21119cat >>confdefs.h <<_ACEOF
21120#define HAVE_STRUCT_STAT_ST_FLAGS 1
21121_ACEOF
21122
21123
21124fi
21125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021126{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21127echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021128if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021129 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021130else
21131 cat >conftest.$ac_ext <<_ACEOF
21132/* confdefs.h. */
21133_ACEOF
21134cat confdefs.h >>conftest.$ac_ext
21135cat >>conftest.$ac_ext <<_ACEOF
21136/* end confdefs.h. */
21137$ac_includes_default
21138int
21139main ()
21140{
21141static struct stat ac_aggr;
21142if (ac_aggr.st_gen)
21143return 0;
21144 ;
21145 return 0;
21146}
21147_ACEOF
21148rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149if { (ac_try="$ac_compile"
21150case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021156 ac_status=$?
21157 grep -v '^ *+' conftest.er1 >conftest.err
21158 rm -f conftest.er1
21159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021161 (exit $ac_status); } && {
21162 test -z "$ac_c_werror_flag" ||
21163 test ! -s conftest.err
21164 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021165 ac_cv_member_struct_stat_st_gen=yes
21166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021167 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021168sed 's/^/| /' conftest.$ac_ext >&5
21169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021170 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021171/* confdefs.h. */
21172_ACEOF
21173cat confdefs.h >>conftest.$ac_ext
21174cat >>conftest.$ac_ext <<_ACEOF
21175/* end confdefs.h. */
21176$ac_includes_default
21177int
21178main ()
21179{
21180static struct stat ac_aggr;
21181if (sizeof ac_aggr.st_gen)
21182return 0;
21183 ;
21184 return 0;
21185}
21186_ACEOF
21187rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021188if { (ac_try="$ac_compile"
21189case "(($ac_try" in
21190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21191 *) ac_try_echo=$ac_try;;
21192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021195 ac_status=$?
21196 grep -v '^ *+' conftest.er1 >conftest.err
21197 rm -f conftest.er1
21198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021200 (exit $ac_status); } && {
21201 test -z "$ac_c_werror_flag" ||
21202 test ! -s conftest.err
21203 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021204 ac_cv_member_struct_stat_st_gen=yes
21205else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021206 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021207sed 's/^/| /' conftest.$ac_ext >&5
21208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021209 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211
21212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214
21215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021216fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021217{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21218echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21219if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021220
21221cat >>confdefs.h <<_ACEOF
21222#define HAVE_STRUCT_STAT_ST_GEN 1
21223_ACEOF
21224
21225
21226fi
21227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021228{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21229echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021230if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021231 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021232else
21233 cat >conftest.$ac_ext <<_ACEOF
21234/* confdefs.h. */
21235_ACEOF
21236cat confdefs.h >>conftest.$ac_ext
21237cat >>conftest.$ac_ext <<_ACEOF
21238/* end confdefs.h. */
21239$ac_includes_default
21240int
21241main ()
21242{
21243static struct stat ac_aggr;
21244if (ac_aggr.st_birthtime)
21245return 0;
21246 ;
21247 return 0;
21248}
21249_ACEOF
21250rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021251if { (ac_try="$ac_compile"
21252case "(($ac_try" in
21253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21254 *) ac_try_echo=$ac_try;;
21255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021258 ac_status=$?
21259 grep -v '^ *+' conftest.er1 >conftest.err
21260 rm -f conftest.er1
21261 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021263 (exit $ac_status); } && {
21264 test -z "$ac_c_werror_flag" ||
21265 test ! -s conftest.err
21266 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021267 ac_cv_member_struct_stat_st_birthtime=yes
21268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021269 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021270sed 's/^/| /' conftest.$ac_ext >&5
21271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021272 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021273/* confdefs.h. */
21274_ACEOF
21275cat confdefs.h >>conftest.$ac_ext
21276cat >>conftest.$ac_ext <<_ACEOF
21277/* end confdefs.h. */
21278$ac_includes_default
21279int
21280main ()
21281{
21282static struct stat ac_aggr;
21283if (sizeof ac_aggr.st_birthtime)
21284return 0;
21285 ;
21286 return 0;
21287}
21288_ACEOF
21289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021290if { (ac_try="$ac_compile"
21291case "(($ac_try" in
21292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21293 *) ac_try_echo=$ac_try;;
21294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021297 ac_status=$?
21298 grep -v '^ *+' conftest.er1 >conftest.err
21299 rm -f conftest.er1
21300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021302 (exit $ac_status); } && {
21303 test -z "$ac_c_werror_flag" ||
21304 test ! -s conftest.err
21305 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021306 ac_cv_member_struct_stat_st_birthtime=yes
21307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021308 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021309sed 's/^/| /' conftest.$ac_ext >&5
21310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313
21314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316
21317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021318fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021319{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21320echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21321if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021322
21323cat >>confdefs.h <<_ACEOF
21324#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21325_ACEOF
21326
21327
21328fi
21329
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021330{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21331echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021332if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021334else
Martin v. Löwis11437992002-04-12 09:54:03 +000021335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021336/* confdefs.h. */
21337_ACEOF
21338cat confdefs.h >>conftest.$ac_ext
21339cat >>conftest.$ac_ext <<_ACEOF
21340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021341$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021342int
21343main ()
21344{
21345static struct stat ac_aggr;
21346if (ac_aggr.st_blocks)
21347return 0;
21348 ;
21349 return 0;
21350}
21351_ACEOF
21352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021353if { (ac_try="$ac_compile"
21354case "(($ac_try" in
21355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21356 *) ac_try_echo=$ac_try;;
21357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021361 grep -v '^ *+' conftest.er1 >conftest.err
21362 rm -f conftest.er1
21363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021365 (exit $ac_status); } && {
21366 test -z "$ac_c_werror_flag" ||
21367 test ! -s conftest.err
21368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021369 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021370else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021372sed 's/^/| /' conftest.$ac_ext >&5
21373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021375/* confdefs.h. */
21376_ACEOF
21377cat confdefs.h >>conftest.$ac_ext
21378cat >>conftest.$ac_ext <<_ACEOF
21379/* end confdefs.h. */
21380$ac_includes_default
21381int
21382main ()
21383{
21384static struct stat ac_aggr;
21385if (sizeof ac_aggr.st_blocks)
21386return 0;
21387 ;
21388 return 0;
21389}
21390_ACEOF
21391rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021392if { (ac_try="$ac_compile"
21393case "(($ac_try" in
21394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21395 *) ac_try_echo=$ac_try;;
21396esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021398 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021400 grep -v '^ *+' conftest.er1 >conftest.err
21401 rm -f conftest.er1
21402 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021404 (exit $ac_status); } && {
21405 test -z "$ac_c_werror_flag" ||
21406 test ! -s conftest.err
21407 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021408 ac_cv_member_struct_stat_st_blocks=yes
21409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021411sed 's/^/| /' conftest.$ac_ext >&5
21412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415
21416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418
21419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021420fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021421{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21422echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21423if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021424
Martin v. Löwis11437992002-04-12 09:54:03 +000021425cat >>confdefs.h <<_ACEOF
21426#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21427_ACEOF
21428
21429
21430cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021431#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021432_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021433
21434else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021435 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021436 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021437 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21438 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021439esac
21440
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021441fi
21442
Michael W. Hudson54241132001-12-07 15:38:26 +000021443
Martin v. Löwis11437992002-04-12 09:54:03 +000021444
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021445{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21446echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021447if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021449else
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021451/* confdefs.h. */
21452_ACEOF
21453cat confdefs.h >>conftest.$ac_ext
21454cat >>conftest.$ac_ext <<_ACEOF
21455/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021456#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021457int
21458main ()
21459{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021460return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021461 ;
21462 return 0;
21463}
21464_ACEOF
21465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466if { (ac_try="$ac_compile"
21467case "(($ac_try" in
21468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21469 *) ac_try_echo=$ac_try;;
21470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021474 grep -v '^ *+' conftest.er1 >conftest.err
21475 rm -f conftest.er1
21476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021478 (exit $ac_status); } && {
21479 test -z "$ac_c_werror_flag" ||
21480 test ! -s conftest.err
21481 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021482 ac_cv_header_time_altzone=yes
21483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021485sed 's/^/| /' conftest.$ac_ext >&5
21486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021487 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021488fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21491fi
21492
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021493{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21494echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021495if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021496
21497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021498#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021500
21501fi
21502
Guido van Rossumda88dad1995-01-26 00:46:29 +000021503was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021504{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21505echo $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 +000021506cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021507/* confdefs.h. */
21508_ACEOF
21509cat confdefs.h >>conftest.$ac_ext
21510cat >>conftest.$ac_ext <<_ACEOF
21511/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021512
21513#include <sys/types.h>
21514#include <sys/select.h>
21515#include <sys/time.h>
21516
Martin v. Löwis11437992002-04-12 09:54:03 +000021517int
21518main ()
21519{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021520;
Martin v. Löwis11437992002-04-12 09:54:03 +000021521 ;
21522 return 0;
21523}
21524_ACEOF
21525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021526if { (ac_try="$ac_compile"
21527case "(($ac_try" in
21528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21529 *) ac_try_echo=$ac_try;;
21530esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021534 grep -v '^ *+' conftest.er1 >conftest.err
21535 rm -f conftest.er1
21536 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021538 (exit $ac_status); } && {
21539 test -z "$ac_c_werror_flag" ||
21540 test ! -s conftest.err
21541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021542
21543
21544cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021545#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021546_ACEOF
21547
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021548 was_it_defined=yes
21549
Guido van Rossumf78abae1997-01-21 22:02:36 +000021550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021552sed 's/^/| /' conftest.$ac_ext >&5
21553
Thomas Wouters477c8d52006-05-27 19:21:47 +000021554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021555fi
21556
21557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021558{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21559echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021560
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021561{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21562echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021563if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021564 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021565else
Martin v. Löwis11437992002-04-12 09:54:03 +000021566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021567/* confdefs.h. */
21568_ACEOF
21569cat confdefs.h >>conftest.$ac_ext
21570cat >>conftest.$ac_ext <<_ACEOF
21571/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021572
21573# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021574int
21575main ()
21576{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021577struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 ;
21579 return 0;
21580}
21581_ACEOF
21582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021583if { (ac_try="$ac_compile"
21584case "(($ac_try" in
21585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21586 *) ac_try_echo=$ac_try;;
21587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021591 grep -v '^ *+' conftest.er1 >conftest.err
21592 rm -f conftest.er1
21593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021595 (exit $ac_status); } && {
21596 test -z "$ac_c_werror_flag" ||
21597 test ! -s conftest.err
21598 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021599 ac_cv_struct_addrinfo=yes
21600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021602sed 's/^/| /' conftest.$ac_ext >&5
21603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021604 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021605fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21608fi
21609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021610{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21611echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021612if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021613
21614cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021615#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021616_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021617
21618fi
21619
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021620{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21621echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021622if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021624else
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021626/* confdefs.h. */
21627_ACEOF
21628cat confdefs.h >>conftest.$ac_ext
21629cat >>conftest.$ac_ext <<_ACEOF
21630/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021631
21632# include <sys/types.h>
21633# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021634int
21635main ()
21636{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021637struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021638 ;
21639 return 0;
21640}
21641_ACEOF
21642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021643if { (ac_try="$ac_compile"
21644case "(($ac_try" in
21645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21646 *) ac_try_echo=$ac_try;;
21647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021651 grep -v '^ *+' conftest.er1 >conftest.err
21652 rm -f conftest.er1
21653 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021655 (exit $ac_status); } && {
21656 test -z "$ac_c_werror_flag" ||
21657 test ! -s conftest.err
21658 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021659 ac_cv_struct_sockaddr_storage=yes
21660else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021662sed 's/^/| /' conftest.$ac_ext >&5
21663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021664 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021665fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21668fi
21669
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021670{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21671echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021672if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021673
21674cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021675#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021676_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021677
21678fi
21679
Guido van Rossum627b2d71993-12-24 10:39:16 +000021680# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021681
Michael W. Hudson54241132001-12-07 15:38:26 +000021682
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021683{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21684echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021685if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021686 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021687else
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021689/* confdefs.h. */
21690_ACEOF
21691cat confdefs.h >>conftest.$ac_ext
21692cat >>conftest.$ac_ext <<_ACEOF
21693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021694$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021695int
21696main ()
21697{
21698static int test_array [1 - 2 * !(((char) -1) < 0)];
21699test_array [0] = 0
21700
21701 ;
21702 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021703}
Martin v. Löwis11437992002-04-12 09:54:03 +000021704_ACEOF
21705rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021706if { (ac_try="$ac_compile"
21707case "(($ac_try" in
21708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21709 *) ac_try_echo=$ac_try;;
21710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021714 grep -v '^ *+' conftest.er1 >conftest.err
21715 rm -f conftest.er1
21716 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021718 (exit $ac_status); } && {
21719 test -z "$ac_c_werror_flag" ||
21720 test ! -s conftest.err
21721 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021722 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021725sed 's/^/| /' conftest.$ac_ext >&5
21726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021727 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729
21730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021731fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021732{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21733echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021734if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021735 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021736#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021738
21739fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021740
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021741{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21742echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021743if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021744 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021745else
21746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021747/* confdefs.h. */
21748_ACEOF
21749cat confdefs.h >>conftest.$ac_ext
21750cat >>conftest.$ac_ext <<_ACEOF
21751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021752
Martin v. Löwis11437992002-04-12 09:54:03 +000021753int
21754main ()
21755{
21756/* FIXME: Include the comments suggested by Paul. */
21757#ifndef __cplusplus
21758 /* Ultrix mips cc rejects this. */
21759 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021760 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021761 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762 char const *const *pcpcc;
21763 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 /* NEC SVR4.0.2 mips cc rejects this. */
21765 struct point {int x, y;};
21766 static struct point const zero = {0,0};
21767 /* AIX XL C 1.02.0.0 rejects this.
21768 It does not let you subtract one const X* pointer from another in
21769 an arm of an if-expression whose if-part is not a constant
21770 expression */
21771 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021772 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021774 ++pcpcc;
21775 ppc = (char**) pcpcc;
21776 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 { /* SCO 3.2v4 cc rejects this. */
21778 char *t;
21779 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021780
Martin v. Löwis11437992002-04-12 09:54:03 +000021781 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021782 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021783 }
21784 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21785 int x[] = {25, 17};
21786 const int *foo = &x[0];
21787 ++foo;
21788 }
21789 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21790 typedef const int *iptr;
21791 iptr p = 0;
21792 ++p;
21793 }
21794 { /* AIX XL C 1.02.0.0 rejects this saying
21795 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21796 struct s { int j; const int *ap[3]; };
21797 struct s *b; b->j = 5;
21798 }
21799 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21800 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021801 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021802 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021803 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021804#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021805
Martin v. Löwis11437992002-04-12 09:54:03 +000021806 ;
21807 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021808}
Martin v. Löwis11437992002-04-12 09:54:03 +000021809_ACEOF
21810rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021811if { (ac_try="$ac_compile"
21812case "(($ac_try" in
21813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21814 *) ac_try_echo=$ac_try;;
21815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021819 grep -v '^ *+' conftest.er1 >conftest.err
21820 rm -f conftest.er1
21821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021823 (exit $ac_status); } && {
21824 test -z "$ac_c_werror_flag" ||
21825 test ! -s conftest.err
21826 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021827 ac_cv_c_const=yes
21828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021830sed 's/^/| /' conftest.$ac_ext >&5
21831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834
21835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021837{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21838echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021839if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021840
21841cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021842#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021843_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021844
21845fi
21846
Michael W. Hudson54241132001-12-07 15:38:26 +000021847
Guido van Rossumda88dad1995-01-26 00:46:29 +000021848works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021849{ echo "$as_me:$LINENO: checking for working volatile" >&5
21850echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021852/* confdefs.h. */
21853_ACEOF
21854cat confdefs.h >>conftest.$ac_ext
21855cat >>conftest.$ac_ext <<_ACEOF
21856/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021857
Martin v. Löwis11437992002-04-12 09:54:03 +000021858int
21859main ()
21860{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021861volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 ;
21863 return 0;
21864}
21865_ACEOF
21866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021867if { (ac_try="$ac_compile"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021875 grep -v '^ *+' conftest.er1 >conftest.err
21876 rm -f conftest.er1
21877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021879 (exit $ac_status); } && {
21880 test -z "$ac_c_werror_flag" ||
21881 test ! -s conftest.err
21882 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021883 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021886sed 's/^/| /' conftest.$ac_ext >&5
21887
Martin v. Löwis11437992002-04-12 09:54:03 +000021888
21889cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021890#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021891_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021892
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021893
Guido van Rossum627b2d71993-12-24 10:39:16 +000021894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021895
21896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021897{ echo "$as_me:$LINENO: result: $works" >&5
21898echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021899
Guido van Rossumda88dad1995-01-26 00:46:29 +000021900works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021901{ echo "$as_me:$LINENO: checking for working signed char" >&5
21902echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021904/* confdefs.h. */
21905_ACEOF
21906cat confdefs.h >>conftest.$ac_ext
21907cat >>conftest.$ac_ext <<_ACEOF
21908/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021909
Martin v. Löwis11437992002-04-12 09:54:03 +000021910int
21911main ()
21912{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021913signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021914 ;
21915 return 0;
21916}
21917_ACEOF
21918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021919if { (ac_try="$ac_compile"
21920case "(($ac_try" in
21921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21922 *) ac_try_echo=$ac_try;;
21923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021927 grep -v '^ *+' conftest.er1 >conftest.err
21928 rm -f conftest.er1
21929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021931 (exit $ac_status); } && {
21932 test -z "$ac_c_werror_flag" ||
21933 test ! -s conftest.err
21934 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021935 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021938sed 's/^/| /' conftest.$ac_ext >&5
21939
Martin v. Löwis11437992002-04-12 09:54:03 +000021940
21941cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021942#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021943_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021944
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021945
Guido van Rossum7f43da71994-08-01 12:15:30 +000021946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021947
21948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021949{ echo "$as_me:$LINENO: result: $works" >&5
21950echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021951
Guido van Rossumda88dad1995-01-26 00:46:29 +000021952have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021953{ echo "$as_me:$LINENO: checking for prototypes" >&5
21954echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021956/* confdefs.h. */
21957_ACEOF
21958cat confdefs.h >>conftest.$ac_ext
21959cat >>conftest.$ac_ext <<_ACEOF
21960/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021961int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021962int
21963main ()
21964{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021965return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 ;
21967 return 0;
21968}
21969_ACEOF
21970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021971if { (ac_try="$ac_compile"
21972case "(($ac_try" in
21973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21974 *) ac_try_echo=$ac_try;;
21975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021979 grep -v '^ *+' conftest.er1 >conftest.err
21980 rm -f conftest.er1
21981 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021983 (exit $ac_status); } && {
21984 test -z "$ac_c_werror_flag" ||
21985 test ! -s conftest.err
21986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021987
21988
21989cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021990#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021991_ACEOF
21992
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021993 have_prototypes=yes
21994
Guido van Rossumf78abae1997-01-21 22:02:36 +000021995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021997sed 's/^/| /' conftest.$ac_ext >&5
21998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021999
Guido van Rossum7f43da71994-08-01 12:15:30 +000022000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022001
22002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022003{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22004echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022005
Guido van Rossumda88dad1995-01-26 00:46:29 +000022006works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022007{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22008echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022010/* confdefs.h. */
22011_ACEOF
22012cat confdefs.h >>conftest.$ac_ext
22013cat >>conftest.$ac_ext <<_ACEOF
22014/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022015
22016#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022017int foo(int x, ...) {
22018 va_list va;
22019 va_start(va, x);
22020 va_arg(va, int);
22021 va_arg(va, char *);
22022 va_arg(va, double);
22023 return 0;
22024}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022025
Martin v. Löwis11437992002-04-12 09:54:03 +000022026int
22027main ()
22028{
Guido van Rossum90eea071996-08-30 20:58:57 +000022029return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022030 ;
22031 return 0;
22032}
22033_ACEOF
22034rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022035if { (ac_try="$ac_compile"
22036case "(($ac_try" in
22037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22038 *) ac_try_echo=$ac_try;;
22039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022043 grep -v '^ *+' conftest.er1 >conftest.err
22044 rm -f conftest.er1
22045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022047 (exit $ac_status); } && {
22048 test -z "$ac_c_werror_flag" ||
22049 test ! -s conftest.err
22050 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022051
22052
22053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022054#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022055_ACEOF
22056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022057 works=yes
22058
Guido van Rossumf78abae1997-01-21 22:02:36 +000022059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022061sed 's/^/| /' conftest.$ac_ext >&5
22062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022063
Guido van Rossum627b2d71993-12-24 10:39:16 +000022064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022065
22066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022067{ echo "$as_me:$LINENO: result: $works" >&5
22068echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022069
Martin v. Löwisd6320502004-08-12 13:45:08 +000022070# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022071{ echo "$as_me:$LINENO: checking for socketpair" >&5
22072echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022073cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022074/* confdefs.h. */
22075_ACEOF
22076cat confdefs.h >>conftest.$ac_ext
22077cat >>conftest.$ac_ext <<_ACEOF
22078/* end confdefs.h. */
22079
22080#include <sys/types.h>
22081#include <sys/socket.h>
22082
22083int
22084main ()
22085{
22086void *x=socketpair
22087 ;
22088 return 0;
22089}
22090_ACEOF
22091rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022092if { (ac_try="$ac_compile"
22093case "(($ac_try" in
22094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22095 *) ac_try_echo=$ac_try;;
22096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022100 grep -v '^ *+' conftest.er1 >conftest.err
22101 rm -f conftest.er1
22102 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104 (exit $ac_status); } && {
22105 test -z "$ac_c_werror_flag" ||
22106 test ! -s conftest.err
22107 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022108
22109cat >>confdefs.h <<\_ACEOF
22110#define HAVE_SOCKETPAIR 1
22111_ACEOF
22112
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022113 { echo "$as_me:$LINENO: result: yes" >&5
22114echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022116 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022117sed 's/^/| /' conftest.$ac_ext >&5
22118
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022119 { echo "$as_me:$LINENO: result: no" >&5
22120echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022121
22122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022123
22124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022125
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022126# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022127{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22128echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022130/* confdefs.h. */
22131_ACEOF
22132cat confdefs.h >>conftest.$ac_ext
22133cat >>conftest.$ac_ext <<_ACEOF
22134/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022135#include <sys/types.h>
22136#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022137int
22138main ()
22139{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022140struct sockaddr x;
22141x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022142 ;
22143 return 0;
22144}
22145_ACEOF
22146rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022147if { (ac_try="$ac_compile"
22148case "(($ac_try" in
22149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22150 *) ac_try_echo=$ac_try;;
22151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022155 grep -v '^ *+' conftest.er1 >conftest.err
22156 rm -f conftest.er1
22157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022159 (exit $ac_status); } && {
22160 test -z "$ac_c_werror_flag" ||
22161 test ! -s conftest.err
22162 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022163 { echo "$as_me:$LINENO: result: yes" >&5
22164echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022165
22166cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022167#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022168_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022169
22170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022172sed 's/^/| /' conftest.$ac_ext >&5
22173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022174 { echo "$as_me:$LINENO: result: no" >&5
22175echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022177
22178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022179
Guido van Rossumda88dad1995-01-26 00:46:29 +000022180va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022181{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22182echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022184/* confdefs.h. */
22185_ACEOF
22186cat confdefs.h >>conftest.$ac_ext
22187cat >>conftest.$ac_ext <<_ACEOF
22188/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189
22190#ifdef HAVE_STDARG_PROTOTYPES
22191#include <stdarg.h>
22192#else
22193#include <varargs.h>
22194#endif
22195
Martin v. Löwis11437992002-04-12 09:54:03 +000022196int
22197main ()
22198{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022199va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 ;
22201 return 0;
22202}
22203_ACEOF
22204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022205if { (ac_try="$ac_compile"
22206case "(($ac_try" in
22207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22208 *) ac_try_echo=$ac_try;;
22209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022213 grep -v '^ *+' conftest.er1 >conftest.err
22214 rm -f conftest.er1
22215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022217 (exit $ac_status); } && {
22218 test -z "$ac_c_werror_flag" ||
22219 test ! -s conftest.err
22220 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022221 :
22222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022224sed 's/^/| /' conftest.$ac_ext >&5
22225
Martin v. Löwis11437992002-04-12 09:54:03 +000022226
22227
22228cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022229#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022230_ACEOF
22231
Guido van Rossumda88dad1995-01-26 00:46:29 +000022232 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022233
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235
22236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022237{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22238echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022239
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022240# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022241
22242
22243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022244{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22245echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022246if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022248else
Martin v. Löwis11437992002-04-12 09:54:03 +000022249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022250/* confdefs.h. */
22251_ACEOF
22252cat confdefs.h >>conftest.$ac_ext
22253cat >>conftest.$ac_ext <<_ACEOF
22254/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022255/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22256 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22257#define gethostbyname_r innocuous_gethostbyname_r
22258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022259/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022260 which can conflict with char gethostbyname_r (); below.
22261 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022262 <limits.h> exists even on freestanding compilers. */
22263
22264#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022265# include <limits.h>
22266#else
22267# include <assert.h>
22268#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022269
22270#undef gethostbyname_r
22271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022272/* Override any GCC internal prototype to avoid an error.
22273 Use char because int might match the return type of a GCC
22274 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022275#ifdef __cplusplus
22276extern "C"
22277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022278char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022279/* The GNU C library defines this for functions which it implements
22280 to always fail with ENOSYS. Some functions are actually named
22281 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022282#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022283choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022284#endif
22285
Skip Montanaro6dead952003-09-25 14:50:04 +000022286int
22287main ()
22288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022290 ;
22291 return 0;
22292}
22293_ACEOF
22294rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022295if { (ac_try="$ac_link"
22296case "(($ac_try" in
22297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22298 *) ac_try_echo=$ac_try;;
22299esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022303 grep -v '^ *+' conftest.er1 >conftest.err
22304 rm -f conftest.er1
22305 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022307 (exit $ac_status); } && {
22308 test -z "$ac_c_werror_flag" ||
22309 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022310 } && test -s conftest$ac_exeext &&
22311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022312 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022315sed 's/^/| /' conftest.$ac_ext >&5
22316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022317 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022319
22320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022321 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022322fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022323{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22324echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22325if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022326
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022328#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022329_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022331 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22332echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022333 OLD_CFLAGS=$CFLAGS
22334 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022336/* confdefs.h. */
22337_ACEOF
22338cat confdefs.h >>conftest.$ac_ext
22339cat >>conftest.$ac_ext <<_ACEOF
22340/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022341
22342# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022343
Martin v. Löwis11437992002-04-12 09:54:03 +000022344int
22345main ()
22346{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022347
22348 char *name;
22349 struct hostent *he, *res;
22350 char buffer[2048];
22351 int buflen = 2048;
22352 int h_errnop;
22353
22354 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022355
22356 ;
22357 return 0;
22358}
22359_ACEOF
22360rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022361if { (ac_try="$ac_compile"
22362case "(($ac_try" in
22363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22364 *) ac_try_echo=$ac_try;;
22365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022369 grep -v '^ *+' conftest.er1 >conftest.err
22370 rm -f conftest.er1
22371 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022373 (exit $ac_status); } && {
22374 test -z "$ac_c_werror_flag" ||
22375 test ! -s conftest.err
22376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022377
22378 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022379#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022380_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022381
Martin v. Löwis11437992002-04-12 09:54:03 +000022382
22383cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022384#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022385_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022386
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022387 { echo "$as_me:$LINENO: result: yes" >&5
22388echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022390else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022392sed 's/^/| /' conftest.$ac_ext >&5
22393
Martin v. Löwis11437992002-04-12 09:54:03 +000022394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022395 { echo "$as_me:$LINENO: result: no" >&5
22396echo "${ECHO_T}no" >&6; }
22397 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22398echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022400/* confdefs.h. */
22401_ACEOF
22402cat confdefs.h >>conftest.$ac_ext
22403cat >>conftest.$ac_ext <<_ACEOF
22404/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022405
22406# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022407
Martin v. Löwis11437992002-04-12 09:54:03 +000022408int
22409main ()
22410{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022411
22412 char *name;
22413 struct hostent *he;
22414 char buffer[2048];
22415 int buflen = 2048;
22416 int h_errnop;
22417
22418 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022419
22420 ;
22421 return 0;
22422}
22423_ACEOF
22424rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022425if { (ac_try="$ac_compile"
22426case "(($ac_try" in
22427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22428 *) ac_try_echo=$ac_try;;
22429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022433 grep -v '^ *+' conftest.er1 >conftest.err
22434 rm -f conftest.er1
22435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022437 (exit $ac_status); } && {
22438 test -z "$ac_c_werror_flag" ||
22439 test ! -s conftest.err
22440 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022441
22442 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022443#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022444_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022445
Martin v. Löwis11437992002-04-12 09:54:03 +000022446
22447cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022448#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022449_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022450
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022451 { echo "$as_me:$LINENO: result: yes" >&5
22452echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022456sed 's/^/| /' conftest.$ac_ext >&5
22457
Martin v. Löwis11437992002-04-12 09:54:03 +000022458
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022459 { echo "$as_me:$LINENO: result: no" >&5
22460echo "${ECHO_T}no" >&6; }
22461 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22462echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022464/* confdefs.h. */
22465_ACEOF
22466cat confdefs.h >>conftest.$ac_ext
22467cat >>conftest.$ac_ext <<_ACEOF
22468/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022469
22470# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022471
Martin v. Löwis11437992002-04-12 09:54:03 +000022472int
22473main ()
22474{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022475
22476 char *name;
22477 struct hostent *he;
22478 struct hostent_data data;
22479
22480 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022481
22482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022487if { (ac_try="$ac_compile"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022495 grep -v '^ *+' conftest.er1 >conftest.err
22496 rm -f conftest.er1
22497 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022499 (exit $ac_status); } && {
22500 test -z "$ac_c_werror_flag" ||
22501 test ! -s conftest.err
22502 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022503
22504 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022505#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022506_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022507
Martin v. Löwis11437992002-04-12 09:54:03 +000022508
22509cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022510#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022511_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022512
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022513 { echo "$as_me:$LINENO: result: yes" >&5
22514echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022515
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022518sed 's/^/| /' conftest.$ac_ext >&5
22519
Martin v. Löwis11437992002-04-12 09:54:03 +000022520
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022521 { echo "$as_me:$LINENO: result: no" >&5
22522echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022525
22526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022529
22530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022533
22534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022535 CFLAGS=$OLD_CFLAGS
22536
22537else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022538
Martin v. Löwis11437992002-04-12 09:54:03 +000022539
22540for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022541do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022542as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22543{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22544echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022545if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022547else
Martin v. Löwis11437992002-04-12 09:54:03 +000022548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022549/* confdefs.h. */
22550_ACEOF
22551cat confdefs.h >>conftest.$ac_ext
22552cat >>conftest.$ac_ext <<_ACEOF
22553/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022554/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22555 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22556#define $ac_func innocuous_$ac_func
22557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022558/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022559 which can conflict with char $ac_func (); below.
22560 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022561 <limits.h> exists even on freestanding compilers. */
22562
22563#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022564# include <limits.h>
22565#else
22566# include <assert.h>
22567#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022568
22569#undef $ac_func
22570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022571/* Override any GCC internal prototype to avoid an error.
22572 Use char because int might match the return type of a GCC
22573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022574#ifdef __cplusplus
22575extern "C"
22576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022577char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022578/* The GNU C library defines this for functions which it implements
22579 to always fail with ENOSYS. Some functions are actually named
22580 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022581#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022582choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022583#endif
22584
Skip Montanaro6dead952003-09-25 14:50:04 +000022585int
22586main ()
22587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022588return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 ;
22590 return 0;
22591}
22592_ACEOF
22593rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022594if { (ac_try="$ac_link"
22595case "(($ac_try" in
22596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22597 *) ac_try_echo=$ac_try;;
22598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022600 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022602 grep -v '^ *+' conftest.er1 >conftest.err
22603 rm -f conftest.er1
22604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022606 (exit $ac_status); } && {
22607 test -z "$ac_c_werror_flag" ||
22608 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022609 } && test -s conftest$ac_exeext &&
22610 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022611 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022614sed 's/^/| /' conftest.$ac_ext >&5
22615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022616 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022618
22619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022620 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022621fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022622ac_res=`eval echo '${'$as_ac_var'}'`
22623 { echo "$as_me:$LINENO: result: $ac_res" >&5
22624echo "${ECHO_T}$ac_res" >&6; }
22625if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022626 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022627#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022628_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022630fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022631done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022632
Michael W. Hudson54241132001-12-07 15:38:26 +000022633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022634fi
22635
Michael W. Hudson54241132001-12-07 15:38:26 +000022636
22637
22638
22639
22640
22641
Guido van Rossum627b2d71993-12-24 10:39:16 +000022642# checks for system services
22643# (none yet)
22644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022645# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022646{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22647echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022648if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022649 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022650else
Martin v. Löwis11437992002-04-12 09:54:03 +000022651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022652/* confdefs.h. */
22653_ACEOF
22654cat confdefs.h >>conftest.$ac_ext
22655cat >>conftest.$ac_ext <<_ACEOF
22656/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022657/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22658 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22659#define __fpu_control innocuous___fpu_control
22660
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022661/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022662 which can conflict with char __fpu_control (); below.
22663 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022664 <limits.h> exists even on freestanding compilers. */
22665
22666#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022667# include <limits.h>
22668#else
22669# include <assert.h>
22670#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022671
22672#undef __fpu_control
22673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022674/* Override any GCC internal prototype to avoid an error.
22675 Use char because int might match the return type of a GCC
22676 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022677#ifdef __cplusplus
22678extern "C"
22679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022680char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022681/* The GNU C library defines this for functions which it implements
22682 to always fail with ENOSYS. Some functions are actually named
22683 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022684#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022685choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022686#endif
22687
Skip Montanaro6dead952003-09-25 14:50:04 +000022688int
22689main ()
22690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022691return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022692 ;
22693 return 0;
22694}
22695_ACEOF
22696rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022697if { (ac_try="$ac_link"
22698case "(($ac_try" in
22699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22700 *) ac_try_echo=$ac_try;;
22701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022703 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022705 grep -v '^ *+' conftest.er1 >conftest.err
22706 rm -f conftest.er1
22707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022709 (exit $ac_status); } && {
22710 test -z "$ac_c_werror_flag" ||
22711 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022712 } && test -s conftest$ac_exeext &&
22713 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022714 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022717sed 's/^/| /' conftest.$ac_ext >&5
22718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022719 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022721
22722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022723 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022724fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022725{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22726echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22727if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022728 :
22729else
Martin v. Löwis11437992002-04-12 09:54:03 +000022730
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022731{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22732echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022733if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022735else
Martin v. Löwis11437992002-04-12 09:54:03 +000022736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022737LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022739/* confdefs.h. */
22740_ACEOF
22741cat confdefs.h >>conftest.$ac_ext
22742cat >>conftest.$ac_ext <<_ACEOF
22743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022745/* Override any GCC internal prototype to avoid an error.
22746 Use char because int might match the return type of a GCC
22747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022748#ifdef __cplusplus
22749extern "C"
22750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022751char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022752int
22753main ()
22754{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022755return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022756 ;
22757 return 0;
22758}
22759_ACEOF
22760rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022761if { (ac_try="$ac_link"
22762case "(($ac_try" in
22763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22764 *) ac_try_echo=$ac_try;;
22765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022767 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022769 grep -v '^ *+' conftest.er1 >conftest.err
22770 rm -f conftest.er1
22771 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022773 (exit $ac_status); } && {
22774 test -z "$ac_c_werror_flag" ||
22775 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022776 } && test -s conftest$ac_exeext &&
22777 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022781sed 's/^/| /' conftest.$ac_ext >&5
22782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022783 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022785
22786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022789fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022790{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22791echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22792if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022793 cat >>confdefs.h <<_ACEOF
22794#define HAVE_LIBIEEE 1
22795_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022797 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022798
Guido van Rossum627b2d71993-12-24 10:39:16 +000022799fi
22800
Michael W. Hudson54241132001-12-07 15:38:26 +000022801
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022802fi
22803
Michael W. Hudson54241132001-12-07 15:38:26 +000022804
Guido van Rossum7f253911997-05-09 02:42:48 +000022805# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022806{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22807echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022810if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022812if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022813then
22814
22815cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022816#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022817_ACEOF
22818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022819 { echo "$as_me:$LINENO: result: yes" >&5
22820echo "${ECHO_T}yes" >&6; }
22821else { echo "$as_me:$LINENO: result: no" >&5
22822echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022823fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022825 { echo "$as_me:$LINENO: result: no" >&5
22826echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022827fi
22828
Guido van Rossum7f253911997-05-09 02:42:48 +000022829
Guido van Rossum7f43da71994-08-01 12:15:30 +000022830# check for --with-libm=...
22831
Guido van Rossum563e7081996-09-10 18:20:48 +000022832case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022833Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022834*) LIBM=-lm
22835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022836{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22837echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022839# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022840if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022841 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022842if test "$withval" = no
22843then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022844 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22845echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022846elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022847then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022848 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22849echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22850else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22851echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022852 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022853fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022855 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22856echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022857fi
22858
Guido van Rossum7f43da71994-08-01 12:15:30 +000022859
22860# check for --with-libc=...
22861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022862{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22863echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022865# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022866if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022867 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022868if test "$withval" = no
22869then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022870 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22871echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022872elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022873then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022874 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22875echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22876else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22877echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022879fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022881 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22882echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022883fi
22884
Guido van Rossum7f43da71994-08-01 12:15:30 +000022885
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022886# **************************************************
22887# * Check for various properties of floating point *
22888# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022890{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22891echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022892if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022893 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022894else
22895
22896if test "$cross_compiling" = yes; then
22897 ac_cv_little_endian_double=no
22898else
22899 cat >conftest.$ac_ext <<_ACEOF
22900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
22905
22906#include <string.h>
22907int main() {
22908 double x = 9006104071832581.0;
22909 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22910 return 0;
22911 else
22912 return 1;
22913}
22914
22915_ACEOF
22916rm -f conftest$ac_exeext
22917if { (ac_try="$ac_link"
22918case "(($ac_try" in
22919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22920 *) ac_try_echo=$ac_try;;
22921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022923 (eval "$ac_link") 2>&5
22924 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22927 { (case "(($ac_try" in
22928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22929 *) ac_try_echo=$ac_try;;
22930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022932 (eval "$ac_try") 2>&5
22933 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022935 (exit $ac_status); }; }; then
22936 ac_cv_little_endian_double=yes
22937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022938 echo "$as_me: program exited with status $ac_status" >&5
22939echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022940sed 's/^/| /' conftest.$ac_ext >&5
22941
22942( exit $ac_status )
22943ac_cv_little_endian_double=no
22944fi
22945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22946fi
22947
22948
22949fi
22950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022951{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22952echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022953if test "$ac_cv_little_endian_double" = yes
22954then
22955
22956cat >>confdefs.h <<\_ACEOF
22957#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22958_ACEOF
22959
22960fi
22961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022962{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22963echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022964if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022965 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022966else
22967
22968if test "$cross_compiling" = yes; then
22969 ac_cv_big_endian_double=no
22970else
22971 cat >conftest.$ac_ext <<_ACEOF
22972/* confdefs.h. */
22973_ACEOF
22974cat confdefs.h >>conftest.$ac_ext
22975cat >>conftest.$ac_ext <<_ACEOF
22976/* end confdefs.h. */
22977
22978#include <string.h>
22979int main() {
22980 double x = 9006104071832581.0;
22981 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22982 return 0;
22983 else
22984 return 1;
22985}
22986
22987_ACEOF
22988rm -f conftest$ac_exeext
22989if { (ac_try="$ac_link"
22990case "(($ac_try" in
22991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22992 *) ac_try_echo=$ac_try;;
22993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022995 (eval "$ac_link") 2>&5
22996 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22999 { (case "(($ac_try" in
23000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23001 *) ac_try_echo=$ac_try;;
23002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023004 (eval "$ac_try") 2>&5
23005 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023007 (exit $ac_status); }; }; then
23008 ac_cv_big_endian_double=yes
23009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023010 echo "$as_me: program exited with status $ac_status" >&5
23011echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023012sed 's/^/| /' conftest.$ac_ext >&5
23013
23014( exit $ac_status )
23015ac_cv_big_endian_double=no
23016fi
23017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23018fi
23019
23020
23021fi
23022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023023{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23024echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023025if test "$ac_cv_big_endian_double" = yes
23026then
23027
23028cat >>confdefs.h <<\_ACEOF
23029#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23030_ACEOF
23031
23032fi
23033
23034# Some ARM platforms use a mixed-endian representation for doubles.
23035# While Python doesn't currently have full support for these platforms
23036# (see e.g., issue 1762561), we can at least make sure that float <-> string
23037# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023038{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23039echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023040if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023041 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023042else
23043
23044if test "$cross_compiling" = yes; then
23045 ac_cv_mixed_endian_double=no
23046else
23047 cat >conftest.$ac_ext <<_ACEOF
23048/* confdefs.h. */
23049_ACEOF
23050cat confdefs.h >>conftest.$ac_ext
23051cat >>conftest.$ac_ext <<_ACEOF
23052/* end confdefs.h. */
23053
23054#include <string.h>
23055int main() {
23056 double x = 9006104071832581.0;
23057 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23058 return 0;
23059 else
23060 return 1;
23061}
23062
23063_ACEOF
23064rm -f conftest$ac_exeext
23065if { (ac_try="$ac_link"
23066case "(($ac_try" in
23067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23068 *) ac_try_echo=$ac_try;;
23069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023071 (eval "$ac_link") 2>&5
23072 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23075 { (case "(($ac_try" in
23076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23077 *) ac_try_echo=$ac_try;;
23078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023080 (eval "$ac_try") 2>&5
23081 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023083 (exit $ac_status); }; }; then
23084 ac_cv_mixed_endian_double=yes
23085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023086 echo "$as_me: program exited with status $ac_status" >&5
23087echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023088sed 's/^/| /' conftest.$ac_ext >&5
23089
23090( exit $ac_status )
23091ac_cv_mixed_endian_double=no
23092fi
23093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23094fi
23095
23096
23097fi
23098
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023099{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23100echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023101if test "$ac_cv_mixed_endian_double" = yes
23102then
23103
23104cat >>confdefs.h <<\_ACEOF
23105#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23106_ACEOF
23107
23108fi
23109
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023110# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023111# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023112# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023113# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023114# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023115# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023116
23117# This inline assembler syntax may also work for suncc and icc,
23118# so we try it on all platforms.
23119
23120{ 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 +000023121echo $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 +000023122cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023123/* confdefs.h. */
23124_ACEOF
23125cat confdefs.h >>conftest.$ac_ext
23126cat >>conftest.$ac_ext <<_ACEOF
23127/* end confdefs.h. */
23128
23129int
23130main ()
23131{
23132
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023133 unsigned short cw;
23134 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23135 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023136
23137 ;
23138 return 0;
23139}
23140_ACEOF
23141rm -f conftest.$ac_objext
23142if { (ac_try="$ac_compile"
23143case "(($ac_try" in
23144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23145 *) ac_try_echo=$ac_try;;
23146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023148 (eval "$ac_compile") 2>conftest.er1
23149 ac_status=$?
23150 grep -v '^ *+' conftest.er1 >conftest.err
23151 rm -f conftest.er1
23152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023154 (exit $ac_status); } && {
23155 test -z "$ac_c_werror_flag" ||
23156 test ! -s conftest.err
23157 } && test -s conftest.$ac_objext; then
23158 have_gcc_asm_for_x87=yes
23159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023160 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023161sed 's/^/| /' conftest.$ac_ext >&5
23162
23163 have_gcc_asm_for_x87=no
23164fi
23165
23166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023167{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023168echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023169if test "$have_gcc_asm_for_x87" = yes
23170then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023171
23172cat >>confdefs.h <<\_ACEOF
23173#define HAVE_GCC_ASM_FOR_X87 1
23174_ACEOF
23175
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023177
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023178# Detect whether system arithmetic is subject to x87-style double
23179# rounding issues. The result of this test has little meaning on non
23180# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23181# mode is round-to-nearest and double rounding issues are present, and
23182# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023183{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23184echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023185# $BASECFLAGS may affect the result
23186ac_save_cc="$CC"
23187CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023188if test "$cross_compiling" = yes; then
23189 ac_cv_x87_double_rounding=no
23190else
23191 cat >conftest.$ac_ext <<_ACEOF
23192/* confdefs.h. */
23193_ACEOF
23194cat confdefs.h >>conftest.$ac_ext
23195cat >>conftest.$ac_ext <<_ACEOF
23196/* end confdefs.h. */
23197
23198#include <stdlib.h>
23199#include <math.h>
23200int main() {
23201 volatile double x, y, z;
23202 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23203 x = 0.99999999999999989; /* 1-2**-53 */
23204 y = 1./x;
23205 if (y != 1.)
23206 exit(0);
23207 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23208 x = 1e16;
23209 y = 2.99999;
23210 z = x + y;
23211 if (z != 1e16+4.)
23212 exit(0);
23213 /* both tests show evidence of double rounding */
23214 exit(1);
23215}
23216
23217_ACEOF
23218rm -f conftest$ac_exeext
23219if { (ac_try="$ac_link"
23220case "(($ac_try" in
23221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23222 *) ac_try_echo=$ac_try;;
23223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023225 (eval "$ac_link") 2>&5
23226 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023228 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23229 { (case "(($ac_try" in
23230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23231 *) ac_try_echo=$ac_try;;
23232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023234 (eval "$ac_try") 2>&5
23235 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023237 (exit $ac_status); }; }; then
23238 ac_cv_x87_double_rounding=no
23239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023240 echo "$as_me: program exited with status $ac_status" >&5
23241echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023242sed 's/^/| /' conftest.$ac_ext >&5
23243
23244( exit $ac_status )
23245ac_cv_x87_double_rounding=yes
23246fi
23247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23248fi
23249
23250
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023251CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23253echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023254if test "$ac_cv_x87_double_rounding" = yes
23255then
23256
23257cat >>confdefs.h <<\_ACEOF
23258#define X87_DOUBLE_ROUNDING 1
23259_ACEOF
23260
23261fi
23262
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023263# ************************************
23264# * Check for mathematical functions *
23265# ************************************
23266
23267LIBS_SAVE=$LIBS
23268LIBS="$LIBS $LIBM"
23269
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023270# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23271# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023272{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23273echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023274if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023275 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023276else
23277
23278if test "$cross_compiling" = yes; then
23279 ac_cv_tanh_preserves_zero_sign=no
23280else
23281 cat >conftest.$ac_ext <<_ACEOF
23282/* confdefs.h. */
23283_ACEOF
23284cat confdefs.h >>conftest.$ac_ext
23285cat >>conftest.$ac_ext <<_ACEOF
23286/* end confdefs.h. */
23287
23288#include <math.h>
23289#include <stdlib.h>
23290int main() {
23291 /* return 0 if either negative zeros don't exist
23292 on this platform or if negative zeros exist
23293 and tanh(-0.) == -0. */
23294 if (atan2(0., -1.) == atan2(-0., -1.) ||
23295 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23296 else exit(1);
23297}
23298
23299_ACEOF
23300rm -f conftest$ac_exeext
23301if { (ac_try="$ac_link"
23302case "(($ac_try" in
23303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23304 *) ac_try_echo=$ac_try;;
23305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023307 (eval "$ac_link") 2>&5
23308 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23311 { (case "(($ac_try" in
23312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23313 *) ac_try_echo=$ac_try;;
23314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023316 (eval "$ac_try") 2>&5
23317 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023319 (exit $ac_status); }; }; then
23320 ac_cv_tanh_preserves_zero_sign=yes
23321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023322 echo "$as_me: program exited with status $ac_status" >&5
23323echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023324sed 's/^/| /' conftest.$ac_ext >&5
23325
23326( exit $ac_status )
23327ac_cv_tanh_preserves_zero_sign=no
23328fi
23329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23330fi
23331
23332
23333fi
23334
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023335{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23336echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023337if test "$ac_cv_tanh_preserves_zero_sign" = yes
23338then
23339
23340cat >>confdefs.h <<\_ACEOF
23341#define TANH_PRESERVES_ZERO_SIGN 1
23342_ACEOF
23343
23344fi
23345
23346
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023347
Michael W. Hudson54241132001-12-07 15:38:26 +000023348
Christian Heimes99170a52007-12-19 02:07:34 +000023349
23350
23351
23352
23353
Mark Dickinsonf2537862009-04-18 13:58:18 +000023354
Mark Dickinson9c113362009-09-05 10:36:23 +000023355for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23356do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23358{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023360if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023361 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023362else
23363 cat >conftest.$ac_ext <<_ACEOF
23364/* confdefs.h. */
23365_ACEOF
23366cat confdefs.h >>conftest.$ac_ext
23367cat >>conftest.$ac_ext <<_ACEOF
23368/* end confdefs.h. */
23369/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23370 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23371#define $ac_func innocuous_$ac_func
23372
23373/* System header to define __stub macros and hopefully few prototypes,
23374 which can conflict with char $ac_func (); below.
23375 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23376 <limits.h> exists even on freestanding compilers. */
23377
23378#ifdef __STDC__
23379# include <limits.h>
23380#else
23381# include <assert.h>
23382#endif
23383
23384#undef $ac_func
23385
23386/* Override any GCC internal prototype to avoid an error.
23387 Use char because int might match the return type of a GCC
23388 builtin and then its argument prototype would still apply. */
23389#ifdef __cplusplus
23390extern "C"
23391#endif
23392char $ac_func ();
23393/* The GNU C library defines this for functions which it implements
23394 to always fail with ENOSYS. Some functions are actually named
23395 something starting with __ and the normal name is an alias. */
23396#if defined __stub_$ac_func || defined __stub___$ac_func
23397choke me
23398#endif
23399
23400int
23401main ()
23402{
23403return $ac_func ();
23404 ;
23405 return 0;
23406}
23407_ACEOF
23408rm -f conftest.$ac_objext conftest$ac_exeext
23409if { (ac_try="$ac_link"
23410case "(($ac_try" in
23411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23412 *) ac_try_echo=$ac_try;;
23413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023415 (eval "$ac_link") 2>conftest.er1
23416 ac_status=$?
23417 grep -v '^ *+' conftest.er1 >conftest.err
23418 rm -f conftest.er1
23419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023421 (exit $ac_status); } && {
23422 test -z "$ac_c_werror_flag" ||
23423 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023424 } && test -s conftest$ac_exeext &&
23425 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023426 eval "$as_ac_var=yes"
23427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023428 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023429sed 's/^/| /' conftest.$ac_ext >&5
23430
23431 eval "$as_ac_var=no"
23432fi
23433
23434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23435 conftest$ac_exeext conftest.$ac_ext
23436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023437ac_res=`eval echo '${'$as_ac_var'}'`
23438 { echo "$as_me:$LINENO: result: $ac_res" >&5
23439echo "${ECHO_T}$ac_res" >&6; }
23440if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023441 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023442#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023443_ACEOF
23444
23445fi
23446done
23447
23448
23449
23450
23451
23452
23453for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023454do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23456{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023458if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023459 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023460else
23461 cat >conftest.$ac_ext <<_ACEOF
23462/* confdefs.h. */
23463_ACEOF
23464cat confdefs.h >>conftest.$ac_ext
23465cat >>conftest.$ac_ext <<_ACEOF
23466/* end confdefs.h. */
23467/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23468 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23469#define $ac_func innocuous_$ac_func
23470
23471/* System header to define __stub macros and hopefully few prototypes,
23472 which can conflict with char $ac_func (); below.
23473 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23474 <limits.h> exists even on freestanding compilers. */
23475
23476#ifdef __STDC__
23477# include <limits.h>
23478#else
23479# include <assert.h>
23480#endif
23481
23482#undef $ac_func
23483
23484/* Override any GCC internal prototype to avoid an error.
23485 Use char because int might match the return type of a GCC
23486 builtin and then its argument prototype would still apply. */
23487#ifdef __cplusplus
23488extern "C"
23489#endif
23490char $ac_func ();
23491/* The GNU C library defines this for functions which it implements
23492 to always fail with ENOSYS. Some functions are actually named
23493 something starting with __ and the normal name is an alias. */
23494#if defined __stub_$ac_func || defined __stub___$ac_func
23495choke me
23496#endif
23497
23498int
23499main ()
23500{
23501return $ac_func ();
23502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext conftest$ac_exeext
23507if { (ac_try="$ac_link"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023513 (eval "$ac_link") 2>conftest.er1
23514 ac_status=$?
23515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023522 } && test -s conftest$ac_exeext &&
23523 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023524 eval "$as_ac_var=yes"
23525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023526 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023527sed 's/^/| /' conftest.$ac_ext >&5
23528
23529 eval "$as_ac_var=no"
23530fi
23531
23532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23533 conftest$ac_exeext conftest.$ac_ext
23534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023535ac_res=`eval echo '${'$as_ac_var'}'`
23536 { echo "$as_me:$LINENO: result: $ac_res" >&5
23537echo "${ECHO_T}$ac_res" >&6; }
23538if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023539 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023541_ACEOF
23542
23543fi
23544done
23545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023546{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23547echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023548if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023549 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023550else
23551 cat >conftest.$ac_ext <<_ACEOF
23552/* confdefs.h. */
23553_ACEOF
23554cat confdefs.h >>conftest.$ac_ext
23555cat >>conftest.$ac_ext <<_ACEOF
23556/* end confdefs.h. */
23557#include <math.h>
23558
23559int
23560main ()
23561{
23562#ifndef isinf
23563 (void) isinf;
23564#endif
23565
23566 ;
23567 return 0;
23568}
23569_ACEOF
23570rm -f conftest.$ac_objext
23571if { (ac_try="$ac_compile"
23572case "(($ac_try" in
23573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23574 *) ac_try_echo=$ac_try;;
23575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023577 (eval "$ac_compile") 2>conftest.er1
23578 ac_status=$?
23579 grep -v '^ *+' conftest.er1 >conftest.err
23580 rm -f conftest.er1
23581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023583 (exit $ac_status); } && {
23584 test -z "$ac_c_werror_flag" ||
23585 test ! -s conftest.err
23586 } && test -s conftest.$ac_objext; then
23587 ac_cv_have_decl_isinf=yes
23588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023589 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023590sed 's/^/| /' conftest.$ac_ext >&5
23591
23592 ac_cv_have_decl_isinf=no
23593fi
23594
23595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23596fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23598echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23599if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023600
23601cat >>confdefs.h <<_ACEOF
23602#define HAVE_DECL_ISINF 1
23603_ACEOF
23604
23605
23606else
23607 cat >>confdefs.h <<_ACEOF
23608#define HAVE_DECL_ISINF 0
23609_ACEOF
23610
23611
23612fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023613{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23614echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023615if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023616 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023617else
23618 cat >conftest.$ac_ext <<_ACEOF
23619/* confdefs.h. */
23620_ACEOF
23621cat confdefs.h >>conftest.$ac_ext
23622cat >>conftest.$ac_ext <<_ACEOF
23623/* end confdefs.h. */
23624#include <math.h>
23625
23626int
23627main ()
23628{
23629#ifndef isnan
23630 (void) isnan;
23631#endif
23632
23633 ;
23634 return 0;
23635}
23636_ACEOF
23637rm -f conftest.$ac_objext
23638if { (ac_try="$ac_compile"
23639case "(($ac_try" in
23640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23641 *) ac_try_echo=$ac_try;;
23642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023644 (eval "$ac_compile") 2>conftest.er1
23645 ac_status=$?
23646 grep -v '^ *+' conftest.er1 >conftest.err
23647 rm -f conftest.er1
23648 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023650 (exit $ac_status); } && {
23651 test -z "$ac_c_werror_flag" ||
23652 test ! -s conftest.err
23653 } && test -s conftest.$ac_objext; then
23654 ac_cv_have_decl_isnan=yes
23655else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023656 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023657sed 's/^/| /' conftest.$ac_ext >&5
23658
23659 ac_cv_have_decl_isnan=no
23660fi
23661
23662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23663fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023664{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23665echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23666if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023667
23668cat >>confdefs.h <<_ACEOF
23669#define HAVE_DECL_ISNAN 1
23670_ACEOF
23671
23672
23673else
23674 cat >>confdefs.h <<_ACEOF
23675#define HAVE_DECL_ISNAN 0
23676_ACEOF
23677
23678
23679fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023680{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23681echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023682if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023683 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023684else
23685 cat >conftest.$ac_ext <<_ACEOF
23686/* confdefs.h. */
23687_ACEOF
23688cat confdefs.h >>conftest.$ac_ext
23689cat >>conftest.$ac_ext <<_ACEOF
23690/* end confdefs.h. */
23691#include <math.h>
23692
23693int
23694main ()
23695{
23696#ifndef isfinite
23697 (void) isfinite;
23698#endif
23699
23700 ;
23701 return 0;
23702}
23703_ACEOF
23704rm -f conftest.$ac_objext
23705if { (ac_try="$ac_compile"
23706case "(($ac_try" in
23707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23708 *) ac_try_echo=$ac_try;;
23709esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023711 (eval "$ac_compile") 2>conftest.er1
23712 ac_status=$?
23713 grep -v '^ *+' conftest.er1 >conftest.err
23714 rm -f conftest.er1
23715 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023717 (exit $ac_status); } && {
23718 test -z "$ac_c_werror_flag" ||
23719 test ! -s conftest.err
23720 } && test -s conftest.$ac_objext; then
23721 ac_cv_have_decl_isfinite=yes
23722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023723 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023724sed 's/^/| /' conftest.$ac_ext >&5
23725
23726 ac_cv_have_decl_isfinite=no
23727fi
23728
23729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23730fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023731{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23732echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23733if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023734
23735cat >>confdefs.h <<_ACEOF
23736#define HAVE_DECL_ISFINITE 1
23737_ACEOF
23738
23739
23740else
23741 cat >>confdefs.h <<_ACEOF
23742#define HAVE_DECL_ISFINITE 0
23743_ACEOF
23744
23745
23746fi
23747
23748
Christian Heimes99170a52007-12-19 02:07:34 +000023749
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023750LIBS=$LIBS_SAVE
23751
Mark Dickinsona614f042009-11-28 12:48:43 +000023752# For multiprocessing module, check that sem_open
23753# actually works. For FreeBSD versions <= 7.2,
23754# the kernel module that provides POSIX semaphores
23755# isn't loaded by default, so an attempt to call
23756# sem_open results in a 'Signal 12' error.
23757{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23758echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23759if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23760 echo $ECHO_N "(cached) $ECHO_C" >&6
23761else
23762 if test "$cross_compiling" = yes; then
23763 ac_cv_posix_semaphores_enabled=yes
23764else
23765 cat >conftest.$ac_ext <<_ACEOF
23766/* confdefs.h. */
23767_ACEOF
23768cat confdefs.h >>conftest.$ac_ext
23769cat >>conftest.$ac_ext <<_ACEOF
23770/* end confdefs.h. */
23771
23772#include <unistd.h>
23773#include <fcntl.h>
23774#include <stdio.h>
23775#include <semaphore.h>
23776#include <sys/stat.h>
23777
23778int main(void) {
23779 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23780 if (a == SEM_FAILED) {
23781 perror("sem_open");
23782 return 1;
23783 }
23784 sem_close(a);
23785 return 0;
23786}
23787
23788_ACEOF
23789rm -f conftest$ac_exeext
23790if { (ac_try="$ac_link"
23791case "(($ac_try" in
23792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23793 *) ac_try_echo=$ac_try;;
23794esac
23795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23796 (eval "$ac_link") 2>&5
23797 ac_status=$?
23798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23800 { (case "(($ac_try" in
23801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23802 *) ac_try_echo=$ac_try;;
23803esac
23804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23805 (eval "$ac_try") 2>&5
23806 ac_status=$?
23807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23808 (exit $ac_status); }; }; then
23809 ac_cv_posix_semaphores_enabled=yes
23810else
23811 echo "$as_me: program exited with status $ac_status" >&5
23812echo "$as_me: failed program was:" >&5
23813sed 's/^/| /' conftest.$ac_ext >&5
23814
23815( exit $ac_status )
23816ac_cv_posix_semaphores_enabled=no
23817fi
23818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23819fi
23820
23821
23822
23823fi
23824
23825{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23826echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23827if test $ac_cv_posix_semaphores_enabled = no
23828then
23829
23830cat >>confdefs.h <<\_ACEOF
23831#define POSIX_SEMAPHORES_NOT_ENABLED 1
23832_ACEOF
23833
23834fi
23835
Mark Dickinson10683072009-04-18 21:18:19 +000023836# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023837{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23838echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023839if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023840 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023841else
23842 if test "$cross_compiling" = yes; then
23843 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023844else
23845 cat >conftest.$ac_ext <<_ACEOF
23846/* confdefs.h. */
23847_ACEOF
23848cat confdefs.h >>conftest.$ac_ext
23849cat >>conftest.$ac_ext <<_ACEOF
23850/* end confdefs.h. */
23851
23852#include <unistd.h>
23853#include <fcntl.h>
23854#include <stdio.h>
23855#include <semaphore.h>
23856#include <sys/stat.h>
23857
23858int main(void){
23859 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23860 int count;
23861 int res;
23862 if(a==SEM_FAILED){
23863 perror("sem_open");
23864 return 1;
23865
23866 }
23867 res = sem_getvalue(a, &count);
23868 sem_close(a);
23869 return res==-1 ? 1 : 0;
23870}
23871
Mark Dickinson10683072009-04-18 21:18:19 +000023872_ACEOF
23873rm -f conftest$ac_exeext
23874if { (ac_try="$ac_link"
23875case "(($ac_try" in
23876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23877 *) ac_try_echo=$ac_try;;
23878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023880 (eval "$ac_link") 2>&5
23881 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23884 { (case "(($ac_try" in
23885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23886 *) ac_try_echo=$ac_try;;
23887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023889 (eval "$ac_try") 2>&5
23890 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023892 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023893 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023894else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023895 echo "$as_me: program exited with status $ac_status" >&5
23896echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023897sed 's/^/| /' conftest.$ac_ext >&5
23898
23899( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023900ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023901fi
23902rm -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 +000023903fi
23904
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023905
23906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023907fi
23908
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023909{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23910echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023911if test $ac_cv_broken_sem_getvalue = yes
23912then
23913
23914cat >>confdefs.h <<\_ACEOF
23915#define HAVE_BROKEN_SEM_GETVALUE 1
23916_ACEOF
23917
23918fi
23919
Mark Dickinsonbd792642009-03-18 20:06:12 +000023920# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023921{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23922echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023923# Check whether --enable-big-digits was given.
23924if test "${enable_big_digits+set}" = set; then
23925 enableval=$enable_big_digits; case $enable_big_digits in
23926yes)
23927 enable_big_digits=30 ;;
23928no)
23929 enable_big_digits=15 ;;
2393015|30)
23931 ;;
23932*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023933 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23934echo "$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 +000023935 { (exit 1); exit 1; }; } ;;
23936esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023937{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23938echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023939
23940cat >>confdefs.h <<_ACEOF
23941#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23942_ACEOF
23943
23944
23945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023946 { echo "$as_me:$LINENO: result: no value specified" >&5
23947echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023948fi
23949
23950
Guido van Rossumef2255b2000-03-10 22:30:29 +000023951# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023952if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023953 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23954echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023955if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023958{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23959echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023960else
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023962{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23963echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023965/* confdefs.h. */
23966_ACEOF
23967cat confdefs.h >>conftest.$ac_ext
23968cat >>conftest.$ac_ext <<_ACEOF
23969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023970$ac_includes_default
23971#include <wchar.h>
23972_ACEOF
23973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023974if { (ac_try="$ac_compile"
23975case "(($ac_try" in
23976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23977 *) ac_try_echo=$ac_try;;
23978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023982 grep -v '^ *+' conftest.er1 >conftest.err
23983 rm -f conftest.er1
23984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023986 (exit $ac_status); } && {
23987 test -z "$ac_c_werror_flag" ||
23988 test ! -s conftest.err
23989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023990 ac_header_compiler=yes
23991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023993sed 's/^/| /' conftest.$ac_ext >&5
23994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023995 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023997
23998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023999{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24000echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
24002# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024003{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24004echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024006/* confdefs.h. */
24007_ACEOF
24008cat confdefs.h >>conftest.$ac_ext
24009cat >>conftest.$ac_ext <<_ACEOF
24010/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024011#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024012_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013if { (ac_try="$ac_cpp conftest.$ac_ext"
24014case "(($ac_try" in
24015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24016 *) ac_try_echo=$ac_try;;
24017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024019 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024020 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024021 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024022 rm -f conftest.er1
24023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024025 (exit $ac_status); } >/dev/null && {
24026 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24027 test ! -s conftest.err
24028 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024029 ac_header_preproc=yes
24030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024032sed 's/^/| /' conftest.$ac_ext >&5
24033
Martin v. Löwis11437992002-04-12 09:54:03 +000024034 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024036
Martin v. Löwis11437992002-04-12 09:54:03 +000024037rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024038{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24039echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024040
24041# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024042case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24043 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024044 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24045echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24046 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24047echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024048 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024049 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024050 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024051 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24052echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24053 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24054echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24055 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24056echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24057 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24058echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24059 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24060echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24061 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24062echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024063 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024064## -------------------------------------- ##
24065## Report this to http://bugs.python.org/ ##
24066## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024067_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024068 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024069 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024071{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24072echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024073if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024074 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024075else
24076 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024077fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024078{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24079echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024080
24081fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024082if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024083
24084
24085cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024086#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024087_ACEOF
24088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024089 wchar_h="yes"
24090
Guido van Rossumef2255b2000-03-10 22:30:29 +000024091else
Martin v. Löwis11437992002-04-12 09:54:03 +000024092 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024093
24094fi
24095
Michael W. Hudson54241132001-12-07 15:38:26 +000024096
Martin v. Löwis11437992002-04-12 09:54:03 +000024097
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024098# determine wchar_t size
24099if test "$wchar_h" = yes
24100then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024101 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24102echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24103if test "${ac_cv_type_wchar_t+set}" = set; then
24104 echo $ECHO_N "(cached) $ECHO_C" >&6
24105else
24106 cat >conftest.$ac_ext <<_ACEOF
24107/* confdefs.h. */
24108_ACEOF
24109cat confdefs.h >>conftest.$ac_ext
24110cat >>conftest.$ac_ext <<_ACEOF
24111/* end confdefs.h. */
24112#include <wchar.h>
24113
24114typedef wchar_t ac__type_new_;
24115int
24116main ()
24117{
24118if ((ac__type_new_ *) 0)
24119 return 0;
24120if (sizeof (ac__type_new_))
24121 return 0;
24122 ;
24123 return 0;
24124}
24125_ACEOF
24126rm -f conftest.$ac_objext
24127if { (ac_try="$ac_compile"
24128case "(($ac_try" in
24129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24130 *) ac_try_echo=$ac_try;;
24131esac
24132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24133 (eval "$ac_compile") 2>conftest.er1
24134 ac_status=$?
24135 grep -v '^ *+' conftest.er1 >conftest.err
24136 rm -f conftest.er1
24137 cat conftest.err >&5
24138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24139 (exit $ac_status); } && {
24140 test -z "$ac_c_werror_flag" ||
24141 test ! -s conftest.err
24142 } && test -s conftest.$ac_objext; then
24143 ac_cv_type_wchar_t=yes
24144else
24145 echo "$as_me: failed program was:" >&5
24146sed 's/^/| /' conftest.$ac_ext >&5
24147
24148 ac_cv_type_wchar_t=no
24149fi
24150
24151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24152fi
24153{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24154echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24155
24156# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24159# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024160{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24161echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024162if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024163 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024164else
Martin v. Löwis11437992002-04-12 09:54:03 +000024165 if test "$cross_compiling" = yes; then
24166 # Depending upon the size, compute the lo and hi bounds.
24167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024168/* confdefs.h. */
24169_ACEOF
24170cat confdefs.h >>conftest.$ac_ext
24171cat >>conftest.$ac_ext <<_ACEOF
24172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024173#include <wchar.h>
24174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024175 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024176int
24177main ()
24178{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024180test_array [0] = 0
24181
24182 ;
24183 return 0;
24184}
24185_ACEOF
24186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024187if { (ac_try="$ac_compile"
24188case "(($ac_try" in
24189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24190 *) ac_try_echo=$ac_try;;
24191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024195 grep -v '^ *+' conftest.er1 >conftest.err
24196 rm -f conftest.er1
24197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024199 (exit $ac_status); } && {
24200 test -z "$ac_c_werror_flag" ||
24201 test ! -s conftest.err
24202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 ac_lo=0 ac_mid=0
24204 while :; do
24205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024206/* confdefs.h. */
24207_ACEOF
24208cat confdefs.h >>conftest.$ac_ext
24209cat >>conftest.$ac_ext <<_ACEOF
24210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024211#include <wchar.h>
24212
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024213 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024214int
24215main ()
24216{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024218test_array [0] = 0
24219
24220 ;
24221 return 0;
24222}
24223_ACEOF
24224rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024225if { (ac_try="$ac_compile"
24226case "(($ac_try" in
24227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24228 *) ac_try_echo=$ac_try;;
24229esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024233 grep -v '^ *+' conftest.er1 >conftest.err
24234 rm -f conftest.er1
24235 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024237 (exit $ac_status); } && {
24238 test -z "$ac_c_werror_flag" ||
24239 test ! -s conftest.err
24240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024241 ac_hi=$ac_mid; break
24242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024244sed 's/^/| /' conftest.$ac_ext >&5
24245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024246 ac_lo=`expr $ac_mid + 1`
24247 if test $ac_lo -le $ac_mid; then
24248 ac_lo= ac_hi=
24249 break
24250 fi
24251 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024253
24254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024255 done
24256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024258sed 's/^/| /' conftest.$ac_ext >&5
24259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024261/* confdefs.h. */
24262_ACEOF
24263cat confdefs.h >>conftest.$ac_ext
24264cat >>conftest.$ac_ext <<_ACEOF
24265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024266#include <wchar.h>
24267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024268 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024269int
24270main ()
24271{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024273test_array [0] = 0
24274
24275 ;
24276 return 0;
24277}
24278_ACEOF
24279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280if { (ac_try="$ac_compile"
24281case "(($ac_try" in
24282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24283 *) ac_try_echo=$ac_try;;
24284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024288 grep -v '^ *+' conftest.er1 >conftest.err
24289 rm -f conftest.er1
24290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024292 (exit $ac_status); } && {
24293 test -z "$ac_c_werror_flag" ||
24294 test ! -s conftest.err
24295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024296 ac_hi=-1 ac_mid=-1
24297 while :; do
24298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024299/* confdefs.h. */
24300_ACEOF
24301cat confdefs.h >>conftest.$ac_ext
24302cat >>conftest.$ac_ext <<_ACEOF
24303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024304#include <wchar.h>
24305
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024306 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024307int
24308main ()
24309{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024311test_array [0] = 0
24312
24313 ;
24314 return 0;
24315}
24316_ACEOF
24317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024318if { (ac_try="$ac_compile"
24319case "(($ac_try" in
24320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24321 *) ac_try_echo=$ac_try;;
24322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024326 grep -v '^ *+' conftest.er1 >conftest.err
24327 rm -f conftest.er1
24328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024330 (exit $ac_status); } && {
24331 test -z "$ac_c_werror_flag" ||
24332 test ! -s conftest.err
24333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024334 ac_lo=$ac_mid; break
24335else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024337sed 's/^/| /' conftest.$ac_ext >&5
24338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024339 ac_hi=`expr '(' $ac_mid ')' - 1`
24340 if test $ac_mid -le $ac_hi; then
24341 ac_lo= ac_hi=
24342 break
24343 fi
24344 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024346
24347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 done
24349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024351sed 's/^/| /' conftest.$ac_ext >&5
24352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024355
24356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024358
24359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024360# Binary search between lo and hi bounds.
24361while test "x$ac_lo" != "x$ac_hi"; do
24362 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024364/* confdefs.h. */
24365_ACEOF
24366cat confdefs.h >>conftest.$ac_ext
24367cat >>conftest.$ac_ext <<_ACEOF
24368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024369#include <wchar.h>
24370
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024371 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024372int
24373main ()
24374{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024376test_array [0] = 0
24377
24378 ;
24379 return 0;
24380}
24381_ACEOF
24382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383if { (ac_try="$ac_compile"
24384case "(($ac_try" in
24385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24386 *) ac_try_echo=$ac_try;;
24387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024391 grep -v '^ *+' conftest.er1 >conftest.err
24392 rm -f conftest.er1
24393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024395 (exit $ac_status); } && {
24396 test -z "$ac_c_werror_flag" ||
24397 test ! -s conftest.err
24398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024399 ac_hi=$ac_mid
24400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024402sed 's/^/| /' conftest.$ac_ext >&5
24403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406
24407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024408done
24409case $ac_lo in
24410?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024411'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024413See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024414echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024415See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024416 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417 else
24418 ac_cv_sizeof_wchar_t=0
24419 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024420esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024421else
Martin v. Löwis11437992002-04-12 09:54:03 +000024422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024423/* confdefs.h. */
24424_ACEOF
24425cat confdefs.h >>conftest.$ac_ext
24426cat >>conftest.$ac_ext <<_ACEOF
24427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024428#include <wchar.h>
24429
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024430 typedef wchar_t ac__type_sizeof_;
24431static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24432static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024433#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024434#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024435int
24436main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024437{
Martin v. Löwis11437992002-04-12 09:54:03 +000024438
24439 FILE *f = fopen ("conftest.val", "w");
24440 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024441 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024442 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024443 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024444 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024445 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024446 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024447 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024448 }
24449 else
24450 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024451 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024453 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024454 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024455 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024456 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024457
24458 ;
24459 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024460}
Martin v. Löwis11437992002-04-12 09:54:03 +000024461_ACEOF
24462rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024463if { (ac_try="$ac_link"
24464case "(($ac_try" in
24465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24466 *) ac_try_echo=$ac_try;;
24467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024469 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024470 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024473 { (case "(($ac_try" in
24474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24475 *) ac_try_echo=$ac_try;;
24476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024478 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024479 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024481 (exit $ac_status); }; }; then
24482 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024484 echo "$as_me: program exited with status $ac_status" >&5
24485echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024486sed 's/^/| /' conftest.$ac_ext >&5
24487
Martin v. Löwis11437992002-04-12 09:54:03 +000024488( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024489if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024490 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024491See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024492echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024493See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024494 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024495 else
24496 ac_cv_sizeof_wchar_t=0
24497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024499rm -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 +000024500fi
24501rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024502fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024503{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24504echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024505
24506
24507
Martin v. Löwis11437992002-04-12 09:54:03 +000024508cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024509#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024510_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024511
Michael W. Hudson54241132001-12-07 15:38:26 +000024512
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024513fi
24514
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024515{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24516echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024517have_ucs4_tcl=no
24518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024519/* confdefs.h. */
24520_ACEOF
24521cat confdefs.h >>conftest.$ac_ext
24522cat >>conftest.$ac_ext <<_ACEOF
24523/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024524
24525#include <tcl.h>
24526#if TCL_UTF_MAX != 6
24527# error "NOT UCS4_TCL"
24528#endif
24529int
24530main ()
24531{
24532
24533 ;
24534 return 0;
24535}
24536_ACEOF
24537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024538if { (ac_try="$ac_compile"
24539case "(($ac_try" in
24540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24541 *) ac_try_echo=$ac_try;;
24542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024546 grep -v '^ *+' conftest.er1 >conftest.err
24547 rm -f conftest.er1
24548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024550 (exit $ac_status); } && {
24551 test -z "$ac_c_werror_flag" ||
24552 test ! -s conftest.err
24553 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024554
24555
24556cat >>confdefs.h <<\_ACEOF
24557#define HAVE_UCS4_TCL 1
24558_ACEOF
24559
24560 have_ucs4_tcl=yes
24561
24562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024564sed 's/^/| /' conftest.$ac_ext >&5
24565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024566
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024568
24569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024570{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24571echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024572
Skip Montanaro6dead952003-09-25 14:50:04 +000024573# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024574if test "$wchar_h" = yes
24575then
24576 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024577 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24578echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024579 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024580 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024581else
24582
24583 if test "$cross_compiling" = yes; then
24584 ac_cv_wchar_t_signed=yes
24585else
24586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024587/* confdefs.h. */
24588_ACEOF
24589cat confdefs.h >>conftest.$ac_ext
24590cat >>conftest.$ac_ext <<_ACEOF
24591/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024592
24593 #include <wchar.h>
24594 int main()
24595 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024596 /* Success: exit code 0 */
24597 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024598 }
24599
24600_ACEOF
24601rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024602if { (ac_try="$ac_link"
24603case "(($ac_try" in
24604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24605 *) ac_try_echo=$ac_try;;
24606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024608 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024609 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024612 { (case "(($ac_try" in
24613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24614 *) ac_try_echo=$ac_try;;
24615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024617 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024618 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024620 (exit $ac_status); }; }; then
24621 ac_cv_wchar_t_signed=yes
24622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024623 echo "$as_me: program exited with status $ac_status" >&5
24624echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024625sed 's/^/| /' conftest.$ac_ext >&5
24626
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024627( exit $ac_status )
24628ac_cv_wchar_t_signed=no
24629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630rm -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 +000024631fi
24632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024633
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024634fi
24635
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024636 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24637echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638fi
24639
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024640{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24641echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024642
24643# Check whether --with-wide-unicode was given.
24644if test "${with_wide_unicode+set}" = set; then
24645 withval=$with_wide_unicode;
24646if test "$withval" != no
24647then unicode_size="4"
24648else unicode_size="2"
24649fi
24650
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024651else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024652
Georg Brandl52d168a2008-01-07 18:10:24 +000024653case "$have_ucs4_tcl" in
24654 yes) unicode_size="4" ;;
24655 *) unicode_size="2" ;;
24656esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024657
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024658fi
24659
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024660
24661
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024662
Georg Brandl52d168a2008-01-07 18:10:24 +000024663case "$unicode_size" in
24664 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024665#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024666_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024667 ;;
24668 *) cat >>confdefs.h <<\_ACEOF
24669#define Py_UNICODE_SIZE 2
24670_ACEOF
24671 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024672esac
24673
Michael W. Hudson54241132001-12-07 15:38:26 +000024674
Martin v. Löwis11437992002-04-12 09:54:03 +000024675
24676
Georg Brandl52d168a2008-01-07 18:10:24 +000024677# wchar_t is only usable if it maps to an unsigned type
24678if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024679 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024680then
24681 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024682
Martin v. Löwis11437992002-04-12 09:54:03 +000024683cat >>confdefs.h <<\_ACEOF
24684#define HAVE_USABLE_WCHAR_T 1
24685_ACEOF
24686
Georg Brandl52d168a2008-01-07 18:10:24 +000024687 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024688#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024689_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024690
Georg Brandl52d168a2008-01-07 18:10:24 +000024691elif test "$ac_cv_sizeof_short" = "$unicode_size"
24692then
24693 PY_UNICODE_TYPE="unsigned short"
24694 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024695#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024696_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024697
Georg Brandl52d168a2008-01-07 18:10:24 +000024698elif test "$ac_cv_sizeof_long" = "$unicode_size"
24699then
24700 PY_UNICODE_TYPE="unsigned long"
24701 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024702#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024703_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024704
Georg Brandl52d168a2008-01-07 18:10:24 +000024705else
24706 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024708{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24709echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024710
24711# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024712{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24713echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024714if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024716else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024717 # See if sys/param.h defines the BYTE_ORDER macro.
24718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024719/* confdefs.h. */
24720_ACEOF
24721cat confdefs.h >>conftest.$ac_ext
24722cat >>conftest.$ac_ext <<_ACEOF
24723/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024724#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024725#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024726
Martin v. Löwis11437992002-04-12 09:54:03 +000024727int
24728main ()
24729{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24731 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24732 bogus endian macros
24733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024734
24735 ;
24736 return 0;
24737}
24738_ACEOF
24739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024740if { (ac_try="$ac_compile"
24741case "(($ac_try" in
24742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743 *) ac_try_echo=$ac_try;;
24744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024748 grep -v '^ *+' conftest.er1 >conftest.err
24749 rm -f conftest.er1
24750 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024752 (exit $ac_status); } && {
24753 test -z "$ac_c_werror_flag" ||
24754 test ! -s conftest.err
24755 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024756 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024758/* confdefs.h. */
24759_ACEOF
24760cat confdefs.h >>conftest.$ac_ext
24761cat >>conftest.$ac_ext <<_ACEOF
24762/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024763#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024764#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024765
Martin v. Löwis11437992002-04-12 09:54:03 +000024766int
24767main ()
24768{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024769#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024770 not big endian
24771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024772
24773 ;
24774 return 0;
24775}
24776_ACEOF
24777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024778if { (ac_try="$ac_compile"
24779case "(($ac_try" in
24780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24781 *) ac_try_echo=$ac_try;;
24782esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024786 grep -v '^ *+' conftest.er1 >conftest.err
24787 rm -f conftest.er1
24788 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024790 (exit $ac_status); } && {
24791 test -z "$ac_c_werror_flag" ||
24792 test ! -s conftest.err
24793 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024794 ac_cv_c_bigendian=yes
24795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024797sed 's/^/| /' conftest.$ac_ext >&5
24798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024799 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024801
24802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024803else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024805sed 's/^/| /' conftest.$ac_ext >&5
24806
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024807 # It does not; compile a test program.
24808if test "$cross_compiling" = yes; then
24809 # try to guess the endianness by grepping values into an object file
24810 ac_cv_c_bigendian=unknown
24811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024812/* confdefs.h. */
24813_ACEOF
24814cat confdefs.h >>conftest.$ac_ext
24815cat >>conftest.$ac_ext <<_ACEOF
24816/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24818short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24819void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24820short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24821short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24822void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024823int
24824main ()
24825{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024827 ;
24828 return 0;
24829}
24830_ACEOF
24831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024832if { (ac_try="$ac_compile"
24833case "(($ac_try" in
24834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24835 *) ac_try_echo=$ac_try;;
24836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024840 grep -v '^ *+' conftest.er1 >conftest.err
24841 rm -f conftest.er1
24842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844 (exit $ac_status); } && {
24845 test -z "$ac_c_werror_flag" ||
24846 test ! -s conftest.err
24847 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024848 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024849 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024851if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24852 if test "$ac_cv_c_bigendian" = unknown; then
24853 ac_cv_c_bigendian=no
24854 else
24855 # finding both strings is unlikely to happen, but who knows?
24856 ac_cv_c_bigendian=unknown
24857 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024858fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024861sed 's/^/| /' conftest.$ac_ext >&5
24862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024863
Martin v. Löwis11437992002-04-12 09:54:03 +000024864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024865
24866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024867else
24868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024869/* confdefs.h. */
24870_ACEOF
24871cat confdefs.h >>conftest.$ac_ext
24872cat >>conftest.$ac_ext <<_ACEOF
24873/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024875int
24876main ()
24877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024879 /* Are we little or big endian? From Harbison&Steele. */
24880 union
24881 {
24882 long int l;
24883 char c[sizeof (long int)];
24884 } u;
24885 u.l = 1;
24886 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024887
24888 ;
24889 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024890}
Martin v. Löwis11437992002-04-12 09:54:03 +000024891_ACEOF
24892rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024893if { (ac_try="$ac_link"
24894case "(($ac_try" in
24895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24896 *) ac_try_echo=$ac_try;;
24897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024900 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024903 { (case "(($ac_try" in
24904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24905 *) ac_try_echo=$ac_try;;
24906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024911 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024912 ac_cv_c_bigendian=no
24913else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024914 echo "$as_me: program exited with status $ac_status" >&5
24915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024916sed 's/^/| /' conftest.$ac_ext >&5
24917
Martin v. Löwis11437992002-04-12 09:54:03 +000024918( exit $ac_status )
24919ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921rm -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 +000024922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024923
24924
Martin v. Löwis11437992002-04-12 09:54:03 +000024925fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024926
24927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24928fi
24929{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24930echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24931case $ac_cv_c_bigendian in
24932 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024933
24934cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024935#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024936_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024937 ;;
24938 no)
24939 ;;
24940 *)
24941 { { echo "$as_me:$LINENO: error: unknown endianness
24942presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24943echo "$as_me: error: unknown endianness
24944presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024945 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024946esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024947
Michael W. Hudson54241132001-12-07 15:38:26 +000024948
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024949# Check whether right shifting a negative integer extends the sign bit
24950# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024951{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24952echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024953if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024954 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024955else
Martin v. Löwis11437992002-04-12 09:54:03 +000024956
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024957if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024958 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024959else
Martin v. Löwis11437992002-04-12 09:54:03 +000024960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024961/* confdefs.h. */
24962_ACEOF
24963cat confdefs.h >>conftest.$ac_ext
24964cat >>conftest.$ac_ext <<_ACEOF
24965/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024966
24967int main()
24968{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024969 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024970}
24971
Martin v. Löwis11437992002-04-12 09:54:03 +000024972_ACEOF
24973rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024974if { (ac_try="$ac_link"
24975case "(($ac_try" in
24976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24977 *) ac_try_echo=$ac_try;;
24978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024980 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024981 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984 { (case "(($ac_try" in
24985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24986 *) ac_try_echo=$ac_try;;
24987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024990 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024992 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024993 ac_cv_rshift_extends_sign=yes
24994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024995 echo "$as_me: program exited with status $ac_status" >&5
24996echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024997sed 's/^/| /' conftest.$ac_ext >&5
24998
Martin v. Löwis11437992002-04-12 09:54:03 +000024999( exit $ac_status )
25000ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002rm -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 +000025003fi
25004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005
25006fi
25007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25009echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025010if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025011then
Martin v. Löwis11437992002-04-12 09:54:03 +000025012
25013cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025014#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025015_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025016
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025017fi
25018
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025019# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025020{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25021echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025022if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025024else
Martin v. Löwis11437992002-04-12 09:54:03 +000025025
25026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025027/* confdefs.h. */
25028_ACEOF
25029cat confdefs.h >>conftest.$ac_ext
25030cat >>conftest.$ac_ext <<_ACEOF
25031/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025032#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025033int
25034main ()
25035{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025036
25037 FILE *f = fopen("/dev/null", "r");
25038 flockfile(f);
25039 getc_unlocked(f);
25040 funlockfile(f);
25041
Martin v. Löwis11437992002-04-12 09:54:03 +000025042 ;
25043 return 0;
25044}
25045_ACEOF
25046rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025047if { (ac_try="$ac_link"
25048case "(($ac_try" in
25049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25050 *) ac_try_echo=$ac_try;;
25051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025053 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025055 grep -v '^ *+' conftest.er1 >conftest.err
25056 rm -f conftest.er1
25057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025059 (exit $ac_status); } && {
25060 test -z "$ac_c_werror_flag" ||
25061 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025062 } && test -s conftest$ac_exeext &&
25063 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025064 ac_cv_have_getc_unlocked=yes
25065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025067sed 's/^/| /' conftest.$ac_ext >&5
25068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025069 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025071
25072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025073 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025074fi
25075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025076{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25077echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025078if test "$ac_cv_have_getc_unlocked" = yes
25079then
Martin v. Löwis11437992002-04-12 09:54:03 +000025080
25081cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025082#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025083_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025084
25085fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025086
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025087# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025088# save the value of LIBS so we don't actually link Python with readline
25089LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025090
Gregory P. Smith18820942008-09-07 06:24:49 +000025091# On some systems we need to link readline to a termcap compatible
25092# library. NOTE: Keep the precedence of listed libraries synchronised
25093# with setup.py.
25094py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025095{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25096echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025097for py_libtermcap in "" ncursesw ncurses curses termcap; do
25098 if test -z "$py_libtermcap"; then
25099 READLINE_LIBS="-lreadline"
25100 else
25101 READLINE_LIBS="-lreadline -l$py_libtermcap"
25102 fi
25103 LIBS="$READLINE_LIBS $LIBS_no_readline"
25104 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025105/* confdefs.h. */
25106_ACEOF
25107cat confdefs.h >>conftest.$ac_ext
25108cat >>conftest.$ac_ext <<_ACEOF
25109/* end confdefs.h. */
25110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111/* Override any GCC internal prototype to avoid an error.
25112 Use char because int might match the return type of a GCC
25113 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025114#ifdef __cplusplus
25115extern "C"
25116#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025117char readline ();
25118int
25119main ()
25120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025121return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025122 ;
25123 return 0;
25124}
25125_ACEOF
25126rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025127if { (ac_try="$ac_link"
25128case "(($ac_try" in
25129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25130 *) ac_try_echo=$ac_try;;
25131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025133 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025134 ac_status=$?
25135 grep -v '^ *+' conftest.er1 >conftest.err
25136 rm -f conftest.er1
25137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025139 (exit $ac_status); } && {
25140 test -z "$ac_c_werror_flag" ||
25141 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025142 } && test -s conftest$ac_exeext &&
25143 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025144 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025145else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025146 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025147sed 's/^/| /' conftest.$ac_ext >&5
25148
Gregory P. Smith18820942008-09-07 06:24:49 +000025149
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025151
25152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025153 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025154 if test $py_cv_lib_readline = yes; then
25155 break
25156 fi
25157done
25158# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25159#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025160if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025161 { echo "$as_me:$LINENO: result: none" >&5
25162echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25165echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025166
25167cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025168#define HAVE_LIBREADLINE 1
25169_ACEOF
25170
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025171fi
25172
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025173# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025174{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25175echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025176if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025178else
25179 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025180LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025181cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025182/* confdefs.h. */
25183_ACEOF
25184cat confdefs.h >>conftest.$ac_ext
25185cat >>conftest.$ac_ext <<_ACEOF
25186/* end confdefs.h. */
25187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188/* Override any GCC internal prototype to avoid an error.
25189 Use char because int might match the return type of a GCC
25190 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025191#ifdef __cplusplus
25192extern "C"
25193#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025194char rl_callback_handler_install ();
25195int
25196main ()
25197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025198return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025199 ;
25200 return 0;
25201}
25202_ACEOF
25203rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025204if { (ac_try="$ac_link"
25205case "(($ac_try" in
25206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25207 *) ac_try_echo=$ac_try;;
25208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025210 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025212 grep -v '^ *+' conftest.er1 >conftest.err
25213 rm -f conftest.er1
25214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025216 (exit $ac_status); } && {
25217 test -z "$ac_c_werror_flag" ||
25218 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025219 } && test -s conftest$ac_exeext &&
25220 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025221 ac_cv_lib_readline_rl_callback_handler_install=yes
25222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025223 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025224sed 's/^/| /' conftest.$ac_ext >&5
25225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025226 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025228
25229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025230 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025231LIBS=$ac_check_lib_save_LIBS
25232fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025233{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25234echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25235if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025236
25237cat >>confdefs.h <<\_ACEOF
25238#define HAVE_RL_CALLBACK 1
25239_ACEOF
25240
25241fi
25242
25243
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025244# check for readline 2.2
25245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025246/* confdefs.h. */
25247_ACEOF
25248cat confdefs.h >>conftest.$ac_ext
25249cat >>conftest.$ac_ext <<_ACEOF
25250/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025251#include <readline/readline.h>
25252_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253if { (ac_try="$ac_cpp conftest.$ac_ext"
25254case "(($ac_try" in
25255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25256 *) ac_try_echo=$ac_try;;
25257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025260 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025261 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025262 rm -f conftest.er1
25263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265 (exit $ac_status); } >/dev/null && {
25266 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25267 test ! -s conftest.err
25268 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025269 have_readline=yes
25270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025272sed 's/^/| /' conftest.$ac_ext >&5
25273
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025274 have_readline=no
25275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025277rm -f conftest.err conftest.$ac_ext
25278if test $have_readline = yes
25279then
25280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025281/* confdefs.h. */
25282_ACEOF
25283cat confdefs.h >>conftest.$ac_ext
25284cat >>conftest.$ac_ext <<_ACEOF
25285/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025286#include <readline/readline.h>
25287
25288_ACEOF
25289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025290 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025291
25292cat >>confdefs.h <<\_ACEOF
25293#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25294_ACEOF
25295
25296fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025297rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025298
Antoine Pitroud5131772009-10-26 19:22:14 +000025299 cat >conftest.$ac_ext <<_ACEOF
25300/* confdefs.h. */
25301_ACEOF
25302cat confdefs.h >>conftest.$ac_ext
25303cat >>conftest.$ac_ext <<_ACEOF
25304/* end confdefs.h. */
25305#include <readline/readline.h>
25306
25307_ACEOF
25308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25309 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25310
25311cat >>confdefs.h <<\_ACEOF
25312#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25313_ACEOF
25314
25315fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025316rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025317
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025318fi
25319
Martin v. Löwis0daad592001-09-30 21:09:59 +000025320# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025321{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25322echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025323if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025325else
Martin v. Löwis11437992002-04-12 09:54:03 +000025326 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025327LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025329/* confdefs.h. */
25330_ACEOF
25331cat confdefs.h >>conftest.$ac_ext
25332cat >>conftest.$ac_ext <<_ACEOF
25333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025335/* Override any GCC internal prototype to avoid an error.
25336 Use char because int might match the return type of a GCC
25337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025338#ifdef __cplusplus
25339extern "C"
25340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025341char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025342int
25343main ()
25344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025345return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025346 ;
25347 return 0;
25348}
25349_ACEOF
25350rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025351if { (ac_try="$ac_link"
25352case "(($ac_try" in
25353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25354 *) ac_try_echo=$ac_try;;
25355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025359 grep -v '^ *+' conftest.er1 >conftest.err
25360 rm -f conftest.er1
25361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025363 (exit $ac_status); } && {
25364 test -z "$ac_c_werror_flag" ||
25365 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025366 } && test -s conftest$ac_exeext &&
25367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025368 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025371sed 's/^/| /' conftest.$ac_ext >&5
25372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025373 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025375
25376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025378LIBS=$ac_check_lib_save_LIBS
25379fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025380{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25381echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25382if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025383
Martin v. Löwis11437992002-04-12 09:54:03 +000025384cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025385#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025386_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025387
Martin v. Löwis0daad592001-09-30 21:09:59 +000025388fi
25389
Michael W. Hudson54241132001-12-07 15:38:26 +000025390
Thomas Wouters89d996e2007-09-08 17:39:28 +000025391# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025392{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25393echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025394if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025395 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025396else
25397 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025398LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025399cat >conftest.$ac_ext <<_ACEOF
25400/* confdefs.h. */
25401_ACEOF
25402cat confdefs.h >>conftest.$ac_ext
25403cat >>conftest.$ac_ext <<_ACEOF
25404/* end confdefs.h. */
25405
25406/* Override any GCC internal prototype to avoid an error.
25407 Use char because int might match the return type of a GCC
25408 builtin and then its argument prototype would still apply. */
25409#ifdef __cplusplus
25410extern "C"
25411#endif
25412char rl_completion_display_matches_hook ();
25413int
25414main ()
25415{
25416return rl_completion_display_matches_hook ();
25417 ;
25418 return 0;
25419}
25420_ACEOF
25421rm -f conftest.$ac_objext conftest$ac_exeext
25422if { (ac_try="$ac_link"
25423case "(($ac_try" in
25424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25425 *) ac_try_echo=$ac_try;;
25426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025428 (eval "$ac_link") 2>conftest.er1
25429 ac_status=$?
25430 grep -v '^ *+' conftest.er1 >conftest.err
25431 rm -f conftest.er1
25432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025434 (exit $ac_status); } && {
25435 test -z "$ac_c_werror_flag" ||
25436 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025437 } && test -s conftest$ac_exeext &&
25438 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025439 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025441 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025442sed 's/^/| /' conftest.$ac_ext >&5
25443
25444 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25445fi
25446
25447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25448 conftest$ac_exeext conftest.$ac_ext
25449LIBS=$ac_check_lib_save_LIBS
25450fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025451{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25452echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25453if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025454
25455cat >>confdefs.h <<\_ACEOF
25456#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25457_ACEOF
25458
25459fi
25460
25461
Martin v. Löwis0daad592001-09-30 21:09:59 +000025462# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025463{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25464echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025465if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025467else
Martin v. Löwis11437992002-04-12 09:54:03 +000025468 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025469LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025471/* confdefs.h. */
25472_ACEOF
25473cat confdefs.h >>conftest.$ac_ext
25474cat >>conftest.$ac_ext <<_ACEOF
25475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025477/* Override any GCC internal prototype to avoid an error.
25478 Use char because int might match the return type of a GCC
25479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025480#ifdef __cplusplus
25481extern "C"
25482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025483char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025484int
25485main ()
25486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025487return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025488 ;
25489 return 0;
25490}
25491_ACEOF
25492rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025493if { (ac_try="$ac_link"
25494case "(($ac_try" in
25495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25496 *) ac_try_echo=$ac_try;;
25497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025499 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025501 grep -v '^ *+' conftest.er1 >conftest.err
25502 rm -f conftest.er1
25503 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025505 (exit $ac_status); } && {
25506 test -z "$ac_c_werror_flag" ||
25507 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025508 } && test -s conftest$ac_exeext &&
25509 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025510 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025511else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025513sed 's/^/| /' conftest.$ac_ext >&5
25514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025515 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025517
25518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025520LIBS=$ac_check_lib_save_LIBS
25521fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025522{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25523echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25524if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025525
Martin v. Löwis11437992002-04-12 09:54:03 +000025526cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025527#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025528_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025529
Guido van Rossum353ae582001-07-10 16:45:32 +000025530fi
25531
Jack Jansendd19cf82001-12-06 22:36:17 +000025532
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025533# also in readline 4.2
25534cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025535/* confdefs.h. */
25536_ACEOF
25537cat confdefs.h >>conftest.$ac_ext
25538cat >>conftest.$ac_ext <<_ACEOF
25539/* end confdefs.h. */
25540#include <readline/readline.h>
25541_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025542if { (ac_try="$ac_cpp conftest.$ac_ext"
25543case "(($ac_try" in
25544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25545 *) ac_try_echo=$ac_try;;
25546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025548 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025549 ac_status=$?
25550 grep -v '^ *+' conftest.er1 >conftest.err
25551 rm -f conftest.er1
25552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554 (exit $ac_status); } >/dev/null && {
25555 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25556 test ! -s conftest.err
25557 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025558 have_readline=yes
25559else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025560 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025561sed 's/^/| /' conftest.$ac_ext >&5
25562
25563 have_readline=no
25564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025565
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025566rm -f conftest.err conftest.$ac_ext
25567if test $have_readline = yes
25568then
25569 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025570/* confdefs.h. */
25571_ACEOF
25572cat confdefs.h >>conftest.$ac_ext
25573cat >>conftest.$ac_ext <<_ACEOF
25574/* end confdefs.h. */
25575#include <readline/readline.h>
25576
25577_ACEOF
25578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25579 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25580
25581cat >>confdefs.h <<\_ACEOF
25582#define HAVE_RL_CATCH_SIGNAL 1
25583_ACEOF
25584
25585fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025586rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025587
25588fi
25589
Martin v. Löwis82bca632006-02-10 20:49:30 +000025590# End of readline checks: restore LIBS
25591LIBS=$LIBS_no_readline
25592
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025593{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25594echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025595if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025596 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025597else
Martin v. Löwis11437992002-04-12 09:54:03 +000025598
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025599if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025600 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025601else
Martin v. Löwis11437992002-04-12 09:54:03 +000025602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025603/* confdefs.h. */
25604_ACEOF
25605cat confdefs.h >>conftest.$ac_ext
25606cat >>conftest.$ac_ext <<_ACEOF
25607/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025608
25609int main()
25610{
25611 int val1 = nice(1);
25612 if (val1 != -1 && val1 == nice(2))
25613 exit(0);
25614 exit(1);
25615}
25616
Martin v. Löwis11437992002-04-12 09:54:03 +000025617_ACEOF
25618rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025619if { (ac_try="$ac_link"
25620case "(($ac_try" in
25621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25622 *) ac_try_echo=$ac_try;;
25623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025625 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025626 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025629 { (case "(($ac_try" in
25630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25631 *) ac_try_echo=$ac_try;;
25632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025634 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025635 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025637 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025638 ac_cv_broken_nice=yes
25639else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025640 echo "$as_me: program exited with status $ac_status" >&5
25641echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025642sed 's/^/| /' conftest.$ac_ext >&5
25643
Martin v. Löwis11437992002-04-12 09:54:03 +000025644( exit $ac_status )
25645ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647rm -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 +000025648fi
25649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025650
25651fi
25652
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025653{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25654echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025655if test "$ac_cv_broken_nice" = yes
25656then
Martin v. Löwis11437992002-04-12 09:54:03 +000025657
25658cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025659#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025660_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025661
25662fi
25663
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025664{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25665echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025666if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025667 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025668else
25669 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025670 ac_cv_broken_poll=no
25671else
25672 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025673/* confdefs.h. */
25674_ACEOF
25675cat confdefs.h >>conftest.$ac_ext
25676cat >>conftest.$ac_ext <<_ACEOF
25677/* end confdefs.h. */
25678
25679#include <poll.h>
25680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025681int main()
25682{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025683 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025684 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025685
25686 close (42);
25687
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025688 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025689 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025690 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025691 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025692 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025693 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025694 return 1;
25695}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025696
25697_ACEOF
25698rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025699if { (ac_try="$ac_link"
25700case "(($ac_try" in
25701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25702 *) ac_try_echo=$ac_try;;
25703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025705 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025706 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025709 { (case "(($ac_try" in
25710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25711 *) ac_try_echo=$ac_try;;
25712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025714 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025715 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025717 (exit $ac_status); }; }; then
25718 ac_cv_broken_poll=yes
25719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025720 echo "$as_me: program exited with status $ac_status" >&5
25721echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025722sed 's/^/| /' conftest.$ac_ext >&5
25723
25724( exit $ac_status )
25725ac_cv_broken_poll=no
25726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727rm -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 +000025728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025729
25730
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025731fi
25732
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025733{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25734echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025735if test "$ac_cv_broken_poll" = yes
25736then
25737
25738cat >>confdefs.h <<\_ACEOF
25739#define HAVE_BROKEN_POLL 1
25740_ACEOF
25741
25742fi
25743
Brett Cannon43802422005-02-10 20:48:03 +000025744# 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 +000025745# (which is not required by ISO C or UNIX spec) and/or if we support
25746# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025747{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25748echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025749if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025750 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025751else
25752 cat >conftest.$ac_ext <<_ACEOF
25753/* confdefs.h. */
25754_ACEOF
25755cat confdefs.h >>conftest.$ac_ext
25756cat >>conftest.$ac_ext <<_ACEOF
25757/* end confdefs.h. */
25758#include <sys/types.h>
25759#include <$ac_cv_struct_tm>
25760
25761
25762int
25763main ()
25764{
25765static struct tm ac_aggr;
25766if (ac_aggr.tm_zone)
25767return 0;
25768 ;
25769 return 0;
25770}
25771_ACEOF
25772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025773if { (ac_try="$ac_compile"
25774case "(($ac_try" in
25775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25776 *) ac_try_echo=$ac_try;;
25777esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025779 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025780 ac_status=$?
25781 grep -v '^ *+' conftest.er1 >conftest.err
25782 rm -f conftest.er1
25783 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025785 (exit $ac_status); } && {
25786 test -z "$ac_c_werror_flag" ||
25787 test ! -s conftest.err
25788 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025789 ac_cv_member_struct_tm_tm_zone=yes
25790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025791 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025792sed 's/^/| /' conftest.$ac_ext >&5
25793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025794 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025795/* confdefs.h. */
25796_ACEOF
25797cat confdefs.h >>conftest.$ac_ext
25798cat >>conftest.$ac_ext <<_ACEOF
25799/* end confdefs.h. */
25800#include <sys/types.h>
25801#include <$ac_cv_struct_tm>
25802
25803
25804int
25805main ()
25806{
25807static struct tm ac_aggr;
25808if (sizeof ac_aggr.tm_zone)
25809return 0;
25810 ;
25811 return 0;
25812}
25813_ACEOF
25814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025815if { (ac_try="$ac_compile"
25816case "(($ac_try" in
25817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25818 *) ac_try_echo=$ac_try;;
25819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025821 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025822 ac_status=$?
25823 grep -v '^ *+' conftest.er1 >conftest.err
25824 rm -f conftest.er1
25825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025827 (exit $ac_status); } && {
25828 test -z "$ac_c_werror_flag" ||
25829 test ! -s conftest.err
25830 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025831 ac_cv_member_struct_tm_tm_zone=yes
25832else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025833 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025834sed 's/^/| /' conftest.$ac_ext >&5
25835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025836 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025838
25839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025841
25842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025843fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025844{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25845echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25846if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025847
25848cat >>confdefs.h <<_ACEOF
25849#define HAVE_STRUCT_TM_TM_ZONE 1
25850_ACEOF
25851
25852
25853fi
25854
25855if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25856
25857cat >>confdefs.h <<\_ACEOF
25858#define HAVE_TM_ZONE 1
25859_ACEOF
25860
25861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25863echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025864if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025865 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866else
25867 cat >conftest.$ac_ext <<_ACEOF
25868/* confdefs.h. */
25869_ACEOF
25870cat confdefs.h >>conftest.$ac_ext
25871cat >>conftest.$ac_ext <<_ACEOF
25872/* end confdefs.h. */
25873#include <time.h>
25874
25875int
25876main ()
25877{
25878#ifndef tzname
25879 (void) tzname;
25880#endif
25881
25882 ;
25883 return 0;
25884}
25885_ACEOF
25886rm -f conftest.$ac_objext
25887if { (ac_try="$ac_compile"
25888case "(($ac_try" in
25889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25890 *) ac_try_echo=$ac_try;;
25891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025893 (eval "$ac_compile") 2>conftest.er1
25894 ac_status=$?
25895 grep -v '^ *+' conftest.er1 >conftest.err
25896 rm -f conftest.er1
25897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025899 (exit $ac_status); } && {
25900 test -z "$ac_c_werror_flag" ||
25901 test ! -s conftest.err
25902 } && test -s conftest.$ac_objext; then
25903 ac_cv_have_decl_tzname=yes
25904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025905 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025906sed 's/^/| /' conftest.$ac_ext >&5
25907
25908 ac_cv_have_decl_tzname=no
25909fi
25910
25911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25912fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025913{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25914echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25915if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916
25917cat >>confdefs.h <<_ACEOF
25918#define HAVE_DECL_TZNAME 1
25919_ACEOF
25920
25921
25922else
25923 cat >>confdefs.h <<_ACEOF
25924#define HAVE_DECL_TZNAME 0
25925_ACEOF
25926
25927
25928fi
25929
25930
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025931 { echo "$as_me:$LINENO: checking for tzname" >&5
25932echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025933if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025934 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025935else
25936 cat >conftest.$ac_ext <<_ACEOF
25937/* confdefs.h. */
25938_ACEOF
25939cat confdefs.h >>conftest.$ac_ext
25940cat >>conftest.$ac_ext <<_ACEOF
25941/* end confdefs.h. */
25942#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025943#if !HAVE_DECL_TZNAME
25944extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025945#endif
25946
25947int
25948main ()
25949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025950return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025951 ;
25952 return 0;
25953}
25954_ACEOF
25955rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025956if { (ac_try="$ac_link"
25957case "(($ac_try" in
25958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25959 *) ac_try_echo=$ac_try;;
25960esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025962 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025963 ac_status=$?
25964 grep -v '^ *+' conftest.er1 >conftest.err
25965 rm -f conftest.er1
25966 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025968 (exit $ac_status); } && {
25969 test -z "$ac_c_werror_flag" ||
25970 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025971 } && test -s conftest$ac_exeext &&
25972 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025973 ac_cv_var_tzname=yes
25974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025975 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025976sed 's/^/| /' conftest.$ac_ext >&5
25977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025978 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025980
25981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025982 conftest$ac_exeext conftest.$ac_ext
25983fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025984{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25985echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025986 if test $ac_cv_var_tzname = yes; then
25987
25988cat >>confdefs.h <<\_ACEOF
25989#define HAVE_TZNAME 1
25990_ACEOF
25991
25992 fi
25993fi
25994
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025995
Martin v. Löwis1d459062005-03-14 21:23:33 +000025996# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025997{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25998echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025999if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026001else
26002
26003if test "$cross_compiling" = yes; then
26004 ac_cv_working_tzset=no
26005else
26006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026007/* confdefs.h. */
26008_ACEOF
26009cat confdefs.h >>conftest.$ac_ext
26010cat >>conftest.$ac_ext <<_ACEOF
26011/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026012
26013#include <stdlib.h>
26014#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026015#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026016
26017#if HAVE_TZNAME
26018extern char *tzname[];
26019#endif
26020
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026021int main()
26022{
Brett Cannon18367812003-09-19 00:59:16 +000026023 /* Note that we need to ensure that not only does tzset(3)
26024 do 'something' with localtime, but it works as documented
26025 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026026 This includes making sure that tzname is set properly if
26027 tm->tm_zone does not exist since it is the alternative way
26028 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026029
26030 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026031 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026032 */
26033
Martin v. Löwis1d459062005-03-14 21:23:33 +000026034 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026035 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26036
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026037 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026038 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026039 if (localtime(&groundhogday)->tm_hour != 0)
26040 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026041#if HAVE_TZNAME
26042 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26043 if (strcmp(tzname[0], "UTC") ||
26044 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26045 exit(1);
26046#endif
Brett Cannon18367812003-09-19 00:59:16 +000026047
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026048 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026049 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026050 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026051 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026052#if HAVE_TZNAME
26053 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26054 exit(1);
26055#endif
Brett Cannon18367812003-09-19 00:59:16 +000026056
26057 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26058 tzset();
26059 if (localtime(&groundhogday)->tm_hour != 11)
26060 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026061#if HAVE_TZNAME
26062 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26063 exit(1);
26064#endif
26065
26066#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026067 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26068 exit(1);
26069 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26070 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026071#endif
Brett Cannon18367812003-09-19 00:59:16 +000026072
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026073 exit(0);
26074}
26075
26076_ACEOF
26077rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026078if { (ac_try="$ac_link"
26079case "(($ac_try" in
26080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26081 *) ac_try_echo=$ac_try;;
26082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026084 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026085 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026088 { (case "(($ac_try" in
26089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26090 *) ac_try_echo=$ac_try;;
26091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026093 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026094 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026096 (exit $ac_status); }; }; then
26097 ac_cv_working_tzset=yes
26098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026099 echo "$as_me: program exited with status $ac_status" >&5
26100echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026101sed 's/^/| /' conftest.$ac_ext >&5
26102
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026103( exit $ac_status )
26104ac_cv_working_tzset=no
26105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026106rm -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 +000026107fi
26108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109
26110fi
26111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026112{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26113echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026114if test "$ac_cv_working_tzset" = yes
26115then
26116
26117cat >>confdefs.h <<\_ACEOF
26118#define HAVE_WORKING_TZSET 1
26119_ACEOF
26120
26121fi
26122
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026123# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026124{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26125echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026126if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026127 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026128else
26129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026130/* confdefs.h. */
26131_ACEOF
26132cat confdefs.h >>conftest.$ac_ext
26133cat >>conftest.$ac_ext <<_ACEOF
26134/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026135#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026136int
26137main ()
26138{
26139
26140struct stat st;
26141st.st_mtim.tv_nsec = 1;
26142
26143 ;
26144 return 0;
26145}
26146_ACEOF
26147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148if { (ac_try="$ac_compile"
26149case "(($ac_try" in
26150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26151 *) ac_try_echo=$ac_try;;
26152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026156 grep -v '^ *+' conftest.er1 >conftest.err
26157 rm -f conftest.er1
26158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026160 (exit $ac_status); } && {
26161 test -z "$ac_c_werror_flag" ||
26162 test ! -s conftest.err
26163 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026164 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026167sed 's/^/| /' conftest.$ac_ext >&5
26168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026169 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026170fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26173fi
26174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026175{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26176echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026177if test "$ac_cv_stat_tv_nsec" = yes
26178then
26179
26180cat >>confdefs.h <<\_ACEOF
26181#define HAVE_STAT_TV_NSEC 1
26182_ACEOF
26183
26184fi
26185
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026186# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026187{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26188echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026189if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026191else
26192 cat >conftest.$ac_ext <<_ACEOF
26193/* confdefs.h. */
26194_ACEOF
26195cat confdefs.h >>conftest.$ac_ext
26196cat >>conftest.$ac_ext <<_ACEOF
26197/* end confdefs.h. */
26198#include <sys/stat.h>
26199int
26200main ()
26201{
26202
26203struct stat st;
26204st.st_mtimespec.tv_nsec = 1;
26205
26206 ;
26207 return 0;
26208}
26209_ACEOF
26210rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211if { (ac_try="$ac_compile"
26212case "(($ac_try" in
26213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26214 *) ac_try_echo=$ac_try;;
26215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026218 ac_status=$?
26219 grep -v '^ *+' conftest.er1 >conftest.err
26220 rm -f conftest.er1
26221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026223 (exit $ac_status); } && {
26224 test -z "$ac_c_werror_flag" ||
26225 test ! -s conftest.err
26226 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026227 ac_cv_stat_tv_nsec2=yes
26228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026229 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026230sed 's/^/| /' conftest.$ac_ext >&5
26231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026232 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26236fi
26237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026238{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26239echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026240if test "$ac_cv_stat_tv_nsec2" = yes
26241then
26242
26243cat >>confdefs.h <<\_ACEOF
26244#define HAVE_STAT_TV_NSEC2 1
26245_ACEOF
26246
26247fi
26248
Jack Jansen666b1e72001-10-31 12:11:48 +000026249# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026250{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26251echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026252if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026253 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026254else
Martin v. Löwis11437992002-04-12 09:54:03 +000026255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026256/* confdefs.h. */
26257_ACEOF
26258cat confdefs.h >>conftest.$ac_ext
26259cat >>conftest.$ac_ext <<_ACEOF
26260/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026261#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026262int
26263main ()
26264{
Jack Jansen666b1e72001-10-31 12:11:48 +000026265
26266 int rtn;
26267 rtn = mvwdelch(0,0,0);
26268
Martin v. Löwis11437992002-04-12 09:54:03 +000026269 ;
26270 return 0;
26271}
26272_ACEOF
26273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274if { (ac_try="$ac_compile"
26275case "(($ac_try" in
26276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26277 *) ac_try_echo=$ac_try;;
26278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026282 grep -v '^ *+' conftest.er1 >conftest.err
26283 rm -f conftest.er1
26284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026286 (exit $ac_status); } && {
26287 test -z "$ac_c_werror_flag" ||
26288 test ! -s conftest.err
26289 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026290 ac_cv_mvwdelch_is_expression=yes
26291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026293sed 's/^/| /' conftest.$ac_ext >&5
26294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026295 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026296fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26299fi
26300
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026301{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26302echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026303
26304if test "$ac_cv_mvwdelch_is_expression" = yes
26305then
Martin v. Löwis11437992002-04-12 09:54:03 +000026306
26307cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026308#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026309_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026310
26311fi
26312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026313{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26314echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026315if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026316 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026317else
Martin v. Löwis11437992002-04-12 09:54:03 +000026318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026319/* confdefs.h. */
26320_ACEOF
26321cat confdefs.h >>conftest.$ac_ext
26322cat >>conftest.$ac_ext <<_ACEOF
26323/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026324#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026325int
26326main ()
26327{
Jack Jansen666b1e72001-10-31 12:11:48 +000026328
26329 WINDOW *w;
26330 w->_flags = 0;
26331
Martin v. Löwis11437992002-04-12 09:54:03 +000026332 ;
26333 return 0;
26334}
26335_ACEOF
26336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026337if { (ac_try="$ac_compile"
26338case "(($ac_try" in
26339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26340 *) ac_try_echo=$ac_try;;
26341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026345 grep -v '^ *+' conftest.er1 >conftest.err
26346 rm -f conftest.er1
26347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349 (exit $ac_status); } && {
26350 test -z "$ac_c_werror_flag" ||
26351 test ! -s conftest.err
26352 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026353 ac_cv_window_has_flags=yes
26354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026356sed 's/^/| /' conftest.$ac_ext >&5
26357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026358 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026359fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26362fi
26363
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026364{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26365echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026366
Jack Jansen666b1e72001-10-31 12:11:48 +000026367
26368if test "$ac_cv_window_has_flags" = yes
26369then
Martin v. Löwis11437992002-04-12 09:54:03 +000026370
26371cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026372#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026373_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026374
26375fi
26376
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026377{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26378echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026379cat >conftest.$ac_ext <<_ACEOF
26380/* confdefs.h. */
26381_ACEOF
26382cat confdefs.h >>conftest.$ac_ext
26383cat >>conftest.$ac_ext <<_ACEOF
26384/* end confdefs.h. */
26385#include <curses.h>
26386int
26387main ()
26388{
26389void *x=is_term_resized
26390 ;
26391 return 0;
26392}
26393_ACEOF
26394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026395if { (ac_try="$ac_compile"
26396case "(($ac_try" in
26397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26398 *) ac_try_echo=$ac_try;;
26399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026402 ac_status=$?
26403 grep -v '^ *+' conftest.er1 >conftest.err
26404 rm -f conftest.er1
26405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026407 (exit $ac_status); } && {
26408 test -z "$ac_c_werror_flag" ||
26409 test ! -s conftest.err
26410 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026411
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026412cat >>confdefs.h <<\_ACEOF
26413#define HAVE_CURSES_IS_TERM_RESIZED 1
26414_ACEOF
26415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026416 { echo "$as_me:$LINENO: result: yes" >&5
26417echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026419 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026420sed 's/^/| /' conftest.$ac_ext >&5
26421
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026422 { echo "$as_me:$LINENO: result: no" >&5
26423echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026424
26425fi
26426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26428
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026429{ echo "$as_me:$LINENO: checking for resize_term" >&5
26430echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026431cat >conftest.$ac_ext <<_ACEOF
26432/* confdefs.h. */
26433_ACEOF
26434cat confdefs.h >>conftest.$ac_ext
26435cat >>conftest.$ac_ext <<_ACEOF
26436/* end confdefs.h. */
26437#include <curses.h>
26438int
26439main ()
26440{
26441void *x=resize_term
26442 ;
26443 return 0;
26444}
26445_ACEOF
26446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026447if { (ac_try="$ac_compile"
26448case "(($ac_try" in
26449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26450 *) ac_try_echo=$ac_try;;
26451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026453 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026454 ac_status=$?
26455 grep -v '^ *+' conftest.er1 >conftest.err
26456 rm -f conftest.er1
26457 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026459 (exit $ac_status); } && {
26460 test -z "$ac_c_werror_flag" ||
26461 test ! -s conftest.err
26462 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026463
26464cat >>confdefs.h <<\_ACEOF
26465#define HAVE_CURSES_RESIZE_TERM 1
26466_ACEOF
26467
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026468 { echo "$as_me:$LINENO: result: yes" >&5
26469echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026471 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026472sed 's/^/| /' conftest.$ac_ext >&5
26473
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026474 { echo "$as_me:$LINENO: result: no" >&5
26475echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026476
26477fi
26478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026481{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26482echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026483cat >conftest.$ac_ext <<_ACEOF
26484/* confdefs.h. */
26485_ACEOF
26486cat confdefs.h >>conftest.$ac_ext
26487cat >>conftest.$ac_ext <<_ACEOF
26488/* end confdefs.h. */
26489#include <curses.h>
26490int
26491main ()
26492{
26493void *x=resizeterm
26494 ;
26495 return 0;
26496}
26497_ACEOF
26498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026499if { (ac_try="$ac_compile"
26500case "(($ac_try" in
26501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26502 *) ac_try_echo=$ac_try;;
26503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026505 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026506 ac_status=$?
26507 grep -v '^ *+' conftest.er1 >conftest.err
26508 rm -f conftest.er1
26509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026511 (exit $ac_status); } && {
26512 test -z "$ac_c_werror_flag" ||
26513 test ! -s conftest.err
26514 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026515
26516cat >>confdefs.h <<\_ACEOF
26517#define HAVE_CURSES_RESIZETERM 1
26518_ACEOF
26519
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026520 { echo "$as_me:$LINENO: result: yes" >&5
26521echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026523 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026524sed 's/^/| /' conftest.$ac_ext >&5
26525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026526 { echo "$as_me:$LINENO: result: no" >&5
26527echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026528
26529fi
26530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26534echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026535
26536if test -r /dev/ptmx
26537then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026538 { echo "$as_me:$LINENO: result: yes" >&5
26539echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026540
26541cat >>confdefs.h <<\_ACEOF
26542#define HAVE_DEV_PTMX 1
26543_ACEOF
26544
Thomas Wouters89f507f2006-12-13 04:49:30 +000026545else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026546 { echo "$as_me:$LINENO: result: no" >&5
26547echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026548fi
26549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026550{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26551echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026552
26553if test -r /dev/ptc
26554then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026555 { echo "$as_me:$LINENO: result: yes" >&5
26556echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026557
26558cat >>confdefs.h <<\_ACEOF
26559#define HAVE_DEV_PTC 1
26560_ACEOF
26561
Thomas Wouters89f507f2006-12-13 04:49:30 +000026562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026563 { echo "$as_me:$LINENO: result: no" >&5
26564echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026565fi
26566
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026567if test "$have_long_long" = yes
26568then
26569 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26570echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26571 if test "${ac_cv_have_long_long_format+set}" = set; then
26572 echo $ECHO_N "(cached) $ECHO_C" >&6
26573else
26574 if test "$cross_compiling" = yes; then
26575 ac_cv_have_long_long_format=no
26576else
26577 cat >conftest.$ac_ext <<_ACEOF
26578/* confdefs.h. */
26579_ACEOF
26580cat confdefs.h >>conftest.$ac_ext
26581cat >>conftest.$ac_ext <<_ACEOF
26582/* end confdefs.h. */
26583
26584 #include <stdio.h>
26585 #include <stddef.h>
26586 #include <string.h>
26587
26588 #ifdef HAVE_SYS_TYPES_H
26589 #include <sys/types.h>
26590 #endif
26591
26592 int main()
26593 {
26594 char buffer[256];
26595
26596 if (sprintf(buffer, "%lld", (long long)123) < 0)
26597 return 1;
26598 if (strcmp(buffer, "123"))
26599 return 1;
26600
26601 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26602 return 1;
26603 if (strcmp(buffer, "-123"))
26604 return 1;
26605
26606 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26607 return 1;
26608 if (strcmp(buffer, "123"))
26609 return 1;
26610
26611 return 0;
26612 }
26613
26614_ACEOF
26615rm -f conftest$ac_exeext
26616if { (ac_try="$ac_link"
26617case "(($ac_try" in
26618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26619 *) ac_try_echo=$ac_try;;
26620esac
26621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26622 (eval "$ac_link") 2>&5
26623 ac_status=$?
26624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26626 { (case "(($ac_try" in
26627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26628 *) ac_try_echo=$ac_try;;
26629esac
26630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26631 (eval "$ac_try") 2>&5
26632 ac_status=$?
26633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26634 (exit $ac_status); }; }; then
26635 ac_cv_have_long_long_format=yes
26636else
26637 echo "$as_me: program exited with status $ac_status" >&5
26638echo "$as_me: failed program was:" >&5
26639sed 's/^/| /' conftest.$ac_ext >&5
26640
26641( exit $ac_status )
26642ac_cv_have_long_long_format=no
26643fi
26644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26645fi
26646
26647
26648
26649fi
26650
26651 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26652echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26653fi
26654
26655if test $ac_cv_have_long_long_format = yes
26656then
26657
26658cat >>confdefs.h <<\_ACEOF
26659#define PY_FORMAT_LONG_LONG "ll"
26660_ACEOF
26661
26662fi
26663
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026664if test $ac_sys_system = Darwin
26665then
26666 LIBS="$LIBS -framework CoreFoundation"
26667fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026669{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26670echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026671if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026672 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026673else
26674 if test "$cross_compiling" = yes; then
26675 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026676else
26677 cat >conftest.$ac_ext <<_ACEOF
26678/* confdefs.h. */
26679_ACEOF
26680cat confdefs.h >>conftest.$ac_ext
26681cat >>conftest.$ac_ext <<_ACEOF
26682/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026683
Thomas Wouters477c8d52006-05-27 19:21:47 +000026684#include <stdio.h>
26685#include <stddef.h>
26686#include <string.h>
26687
Christian Heimes2c181612007-12-17 20:04:13 +000026688#ifdef HAVE_SYS_TYPES_H
26689#include <sys/types.h>
26690#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026691
26692#ifdef HAVE_SSIZE_T
26693typedef ssize_t Py_ssize_t;
26694#elif SIZEOF_VOID_P == SIZEOF_LONG
26695typedef long Py_ssize_t;
26696#else
26697typedef int Py_ssize_t;
26698#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026699
Christian Heimes2c181612007-12-17 20:04:13 +000026700int main()
26701{
26702 char buffer[256];
26703
Thomas Wouters477c8d52006-05-27 19:21:47 +000026704 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26705 return 1;
26706
Thomas Wouters89f507f2006-12-13 04:49:30 +000026707 if (strcmp(buffer, "123"))
26708 return 1;
26709
26710 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26711 return 1;
26712
26713 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026714 return 1;
26715
26716 return 0;
26717}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026718
Thomas Wouters477c8d52006-05-27 19:21:47 +000026719_ACEOF
26720rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026721if { (ac_try="$ac_link"
26722case "(($ac_try" in
26723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26724 *) ac_try_echo=$ac_try;;
26725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026727 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 { (case "(($ac_try" in
26732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26733 *) ac_try_echo=$ac_try;;
26734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026736 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026739 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026740 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026742 echo "$as_me: program exited with status $ac_status" >&5
26743echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026744sed 's/^/| /' conftest.$ac_ext >&5
26745
26746( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026747ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026748fi
26749rm -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 +000026750fi
26751
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026752
26753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026754fi
26755
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026756{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26757echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026758if test $ac_cv_have_size_t_format = yes
26759then
26760
26761cat >>confdefs.h <<\_ACEOF
26762#define PY_FORMAT_SIZE_T "z"
26763_ACEOF
26764
26765fi
26766
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026767{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26768echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026769if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026771else
Martin v. Löwis11437992002-04-12 09:54:03 +000026772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026773/* confdefs.h. */
26774_ACEOF
26775cat confdefs.h >>conftest.$ac_ext
26776cat >>conftest.$ac_ext <<_ACEOF
26777/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026778
26779#ifdef HAVE_SYS_TYPES_H
26780#include <sys/types.h>
26781#endif
26782#ifdef HAVE_SYS_SOCKET_H
26783#include <sys/socket.h>
26784#endif
26785
26786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026787typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026788int
26789main ()
26790{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026791if ((ac__type_new_ *) 0)
26792 return 0;
26793if (sizeof (ac__type_new_))
26794 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026795 ;
26796 return 0;
26797}
26798_ACEOF
26799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800if { (ac_try="$ac_compile"
26801case "(($ac_try" in
26802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26803 *) ac_try_echo=$ac_try;;
26804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026808 grep -v '^ *+' conftest.er1 >conftest.err
26809 rm -f conftest.er1
26810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026812 (exit $ac_status); } && {
26813 test -z "$ac_c_werror_flag" ||
26814 test ! -s conftest.err
26815 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026816 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026819sed 's/^/| /' conftest.$ac_ext >&5
26820
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026821 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823
26824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026825fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026826{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26827echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26828if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026829 :
26830else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026831
Martin v. Löwis01c04012002-11-11 14:58:44 +000026832cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026833#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026834_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026835
26836fi
26837
Michael W. Hudson54241132001-12-07 15:38:26 +000026838
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026839{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26840echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026841if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026842 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026843else
26844 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026845 ac_cv_broken_mbstowcs=no
26846else
26847 cat >conftest.$ac_ext <<_ACEOF
26848/* confdefs.h. */
26849_ACEOF
26850cat confdefs.h >>conftest.$ac_ext
26851cat >>conftest.$ac_ext <<_ACEOF
26852/* end confdefs.h. */
26853
26854#include<stdlib.h>
26855int main() {
26856 size_t len = -1;
26857 const char *str = "text";
26858 len = mbstowcs(NULL, str, 0);
26859 return (len != 4);
26860}
26861
26862_ACEOF
26863rm -f conftest$ac_exeext
26864if { (ac_try="$ac_link"
26865case "(($ac_try" in
26866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26867 *) ac_try_echo=$ac_try;;
26868esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026870 (eval "$ac_link") 2>&5
26871 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26874 { (case "(($ac_try" in
26875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26876 *) ac_try_echo=$ac_try;;
26877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026879 (eval "$ac_try") 2>&5
26880 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026882 (exit $ac_status); }; }; then
26883 ac_cv_broken_mbstowcs=no
26884else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026885 echo "$as_me: program exited with status $ac_status" >&5
26886echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026887sed 's/^/| /' conftest.$ac_ext >&5
26888
26889( exit $ac_status )
26890ac_cv_broken_mbstowcs=yes
26891fi
26892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26893fi
26894
26895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026896fi
26897
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026898{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26899echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026900if test "$ac_cv_broken_mbstowcs" = yes
26901then
26902
26903cat >>confdefs.h <<\_ACEOF
26904#define HAVE_BROKEN_MBSTOWCS 1
26905_ACEOF
26906
26907fi
26908
Antoine Pitroub52ec782009-01-25 16:34:23 +000026909# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026910{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26911echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026912
26913# Check whether --with-computed-gotos was given.
26914if test "${with_computed_gotos+set}" = set; then
26915 withval=$with_computed_gotos;
26916if test "$withval" != no
26917then
26918
26919cat >>confdefs.h <<\_ACEOF
26920#define USE_COMPUTED_GOTOS 1
26921_ACEOF
26922
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026923 { echo "$as_me:$LINENO: result: yes" >&5
26924echo "${ECHO_T}yes" >&6; }
26925else { echo "$as_me:$LINENO: result: no" >&5
26926echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026927fi
26928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026929 { echo "$as_me:$LINENO: result: no" >&5
26930echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026931fi
26932
26933
26934
Michael W. Hudson54241132001-12-07 15:38:26 +000026935
26936
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026937for h in `(cd $srcdir;echo Python/thread_*.h)`
26938do
26939 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26940done
26941
Michael W. Hudson54241132001-12-07 15:38:26 +000026942
Neal Norwitzd24499d2005-12-18 21:36:39 +000026943SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026944{ echo "$as_me:$LINENO: checking for build directories" >&5
26945echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026946for dir in $SRCDIRS; do
26947 if test ! -d $dir; then
26948 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026949 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026950done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026951{ echo "$as_me:$LINENO: result: done" >&5
26952echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026953
Guido van Rossum627b2d71993-12-24 10:39:16 +000026954# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026955ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026956
Martin v. Löwis11437992002-04-12 09:54:03 +000026957cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026958# This file is a shell script that caches the results of configure
26959# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026960# scripts and configure runs, see configure's option --config-cache.
26961# It is not useful on other systems. If it contains results you don't
26962# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026963#
Martin v. Löwis11437992002-04-12 09:54:03 +000026964# config.status only pays attention to the cache file if you give it
26965# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026966#
Skip Montanaro6dead952003-09-25 14:50:04 +000026967# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026968# loading this file, other *unset* `ac_cv_foo' will be assigned the
26969# following values.
26970
26971_ACEOF
26972
Guido van Rossumf78abae1997-01-21 22:02:36 +000026973# The following way of writing the cache mishandles newlines in values,
26974# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026975# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026976# Ultrix sh set writes to stderr and can't be redirected directly,
26977# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026978(
26979 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26980 eval ac_val=\$$ac_var
26981 case $ac_val in #(
26982 *${as_nl}*)
26983 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026984 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26985echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026986 esac
26987 case $ac_var in #(
26988 _ | IFS | as_nl) ;; #(
26989 *) $as_unset $ac_var ;;
26990 esac ;;
26991 esac
26992 done
26993
Martin v. Löwis11437992002-04-12 09:54:03 +000026994 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026995 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26996 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026997 # `set' does not quote correctly, so add quotes (double-quote
26998 # substitution turns \\\\ into \\, and sed turns \\ into \).
26999 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027000 "s/'/'\\\\''/g;
27001 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027002 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027003 *)
27004 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027005 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027006 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027007 esac |
27008 sort
27009) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027011 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027012 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027013 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027014 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27015 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027016 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27017 :end' >>confcache
27018if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27019 if test -w "$cache_file"; then
27020 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027021 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27022echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027023 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027024 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027025 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27026echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027027 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027028fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027029rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027031test "x$prefix" = xNONE && prefix=$ac_default_prefix
27032# Let make expand exec_prefix.
27033test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027035DEFS=-DHAVE_CONFIG_H
27036
Skip Montanaro6dead952003-09-25 14:50:04 +000027037ac_libobjs=
27038ac_ltlibobjs=
27039for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27040 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027041 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027042 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027043 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27044 # will be set to the directory where LIBOBJS objects are built.
27045 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27046 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027047done
27048LIBOBJS=$ac_libobjs
27049
27050LTLIBOBJS=$ac_ltlibobjs
27051
27052
Martin v. Löwis11437992002-04-12 09:54:03 +000027053
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027054: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027055ac_clean_files_save=$ac_clean_files
27056ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027057{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27058echo "$as_me: creating $CONFIG_STATUS" >&6;}
27059cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027060#! $SHELL
27061# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027062# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027063# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027064# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027065
Martin v. Löwis11437992002-04-12 09:54:03 +000027066debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027067ac_cs_recheck=false
27068ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027069SHELL=\${CONFIG_SHELL-$SHELL}
27070_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027071
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027072cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027073## --------------------- ##
27074## M4sh Initialization. ##
27075## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027077# Be more Bourne compatible
27078DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027079if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27080 emulate sh
27081 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027082 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027083 # is contrary to our usage. Disable this feature.
27084 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027085 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027086else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027087 case `(set -o) 2>/dev/null` in
27088 *posix*) set -o posix ;;
27089esac
27090
Michael W. Hudson54241132001-12-07 15:38:26 +000027091fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027092
27093
Michael W. Hudson54241132001-12-07 15:38:26 +000027094
Michael W. Hudson54241132001-12-07 15:38:26 +000027095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027096# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027097# Avoid depending upon Character Ranges.
27098as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27099as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27100as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27101as_cr_digits='0123456789'
27102as_cr_alnum=$as_cr_Letters$as_cr_digits
27103
27104# The user is always right.
27105if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027106 echo "#! /bin/sh" >conf$$.sh
27107 echo "exit 0" >>conf$$.sh
27108 chmod +x conf$$.sh
27109 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27110 PATH_SEPARATOR=';'
27111 else
27112 PATH_SEPARATOR=:
27113 fi
27114 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027115fi
27116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027117# Support unset when possible.
27118if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27119 as_unset=unset
27120else
27121 as_unset=false
27122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027124
27125# IFS
27126# We need space, tab and new line, in precisely that order. Quoting is
27127# there to prevent editors from complaining about space-tab.
27128# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27129# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027130as_nl='
27131'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027132IFS=" "" $as_nl"
27133
27134# Find who we are. Look in the path if we contain no directory separator.
27135case $0 in
27136 *[\\/]* ) as_myself=$0 ;;
27137 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027138for as_dir in $PATH
27139do
27140 IFS=$as_save_IFS
27141 test -z "$as_dir" && as_dir=.
27142 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27143done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027144IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027146 ;;
27147esac
27148# We did not find ourselves, most probably we were run as `sh COMMAND'
27149# in which case we are not to be found in the path.
27150if test "x$as_myself" = x; then
27151 as_myself=$0
27152fi
27153if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027154 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027155 { (exit 1); exit 1; }
27156fi
27157
27158# Work around bugs in pre-3.0 UWIN ksh.
27159for as_var in ENV MAIL MAILPATH
27160do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27161done
27162PS1='$ '
27163PS2='> '
27164PS4='+ '
27165
27166# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027167for as_var in \
27168 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27169 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27170 LC_TELEPHONE LC_TIME
27171do
27172 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27173 eval $as_var=C; export $as_var
27174 else
27175 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27176 fi
27177done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027178
27179# Required to use basename.
27180if expr a : '\(a\)' >/dev/null 2>&1 &&
27181 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27182 as_expr=expr
27183else
27184 as_expr=false
27185fi
27186
27187if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27188 as_basename=basename
27189else
27190 as_basename=false
27191fi
27192
27193
27194# Name of the executable.
27195as_me=`$as_basename -- "$0" ||
27196$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27197 X"$0" : 'X\(//\)$' \| \
27198 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027199echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027200 sed '/^.*\/\([^/][^/]*\)\/*$/{
27201 s//\1/
27202 q
27203 }
27204 /^X\/\(\/\/\)$/{
27205 s//\1/
27206 q
27207 }
27208 /^X\/\(\/\).*/{
27209 s//\1/
27210 q
27211 }
27212 s/.*/./; q'`
27213
27214# CDPATH.
27215$as_unset CDPATH
27216
27217
27218
Martin v. Löwis11437992002-04-12 09:54:03 +000027219 as_lineno_1=$LINENO
27220 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027221 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027222 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027223
Martin v. Löwis11437992002-04-12 09:54:03 +000027224 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27225 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027226 # line-number line after each line using $LINENO; the second 'sed'
27227 # does the real work. The second script uses 'N' to pair each
27228 # line-number line with the line containing $LINENO, and appends
27229 # trailing '-' during substitution so that $LINENO is not a special
27230 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027231 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027232 # scripts with optimization help from Paolo Bonzini. Blame Lee
27233 # E. McMahon (1931-1989) for sed's syntax. :-)
27234 sed -n '
27235 p
27236 /[$]LINENO/=
27237 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027238 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027239 s/[$]LINENO.*/&-/
27240 t lineno
27241 b
27242 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027243 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027244 :loop
27245 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027246 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027247 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027248 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027249 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027250 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027251 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027252
Martin v. Löwis11437992002-04-12 09:54:03 +000027253 # Don't try to exec as it changes $[0], causing all sort of problems
27254 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255 # original and so on. Autoconf is especially sensitive to this).
27256 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 # Exit status is that of the last command.
27258 exit
27259}
27260
27261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027262if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27263 as_dirname=dirname
27264else
27265 as_dirname=false
27266fi
27267
27268ECHO_C= ECHO_N= ECHO_T=
27269case `echo -n x` in
27270-n*)
27271 case `echo 'x\c'` in
27272 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27273 *) ECHO_C='\c';;
27274 esac;;
27275*)
27276 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027279if expr a : '\(a\)' >/dev/null 2>&1 &&
27280 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027281 as_expr=expr
27282else
27283 as_expr=false
27284fi
27285
27286rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027287if test -d conf$$.dir; then
27288 rm -f conf$$.dir/conf$$.file
27289else
27290 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027291 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027292fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027293echo >conf$$.file
27294if ln -s conf$$.file conf$$ 2>/dev/null; then
27295 as_ln_s='ln -s'
27296 # ... but there are two gotchas:
27297 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27298 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27299 # In both cases, we have to default to `cp -p'.
27300 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027301 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027302elif ln conf$$.file conf$$ 2>/dev/null; then
27303 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027304else
27305 as_ln_s='cp -p'
27306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027307rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27308rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027309
Skip Montanaro6dead952003-09-25 14:50:04 +000027310if mkdir -p . 2>/dev/null; then
27311 as_mkdir_p=:
27312else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027313 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027314 as_mkdir_p=false
27315fi
27316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027317if test -x / >/dev/null 2>&1; then
27318 as_test_x='test -x'
27319else
27320 if ls -dL / >/dev/null 2>&1; then
27321 as_ls_L_option=L
27322 else
27323 as_ls_L_option=
27324 fi
27325 as_test_x='
27326 eval sh -c '\''
27327 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027328 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027329 else
27330 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027331 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027332 esac;
27333 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27334 ???[sx]*):;;*)false;;esac;fi
27335 '\'' sh
27336 '
27337fi
27338as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027339
27340# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027341as_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 +000027342
27343# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027344as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027345
27346
Martin v. Löwis11437992002-04-12 09:54:03 +000027347exec 6>&1
27348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027349# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027350# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027351# values after options handling.
27352ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027353This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027354generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027355
27356 CONFIG_FILES = $CONFIG_FILES
27357 CONFIG_HEADERS = $CONFIG_HEADERS
27358 CONFIG_LINKS = $CONFIG_LINKS
27359 CONFIG_COMMANDS = $CONFIG_COMMANDS
27360 $ $0 $@
27361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027362on `(hostname || uname -n) 2>/dev/null | sed 1q`
27363"
27364
Martin v. Löwis11437992002-04-12 09:54:03 +000027365_ACEOF
27366
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027367cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027368# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027369config_files="$ac_config_files"
27370config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027372_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027373
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027374cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027375ac_cs_usage="\
27376\`$as_me' instantiates files from templates according to the
27377current configuration.
27378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027379Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027380
27381 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027383 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027384 -d, --debug don't remove temporary files
27385 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027386 --file=FILE[:TEMPLATE]
27387 instantiate the configuration file FILE
27388 --header=FILE[:TEMPLATE]
27389 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027390
27391Configuration files:
27392$config_files
27393
27394Configuration headers:
27395$config_headers
27396
27397Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027399_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027400cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027401ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027402python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027403configured by $0, generated by GNU Autoconf 2.61,
27404 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027406Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027407This config.status script is free software; the Free Software Foundation
27408gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409
27410ac_pwd='$ac_pwd'
27411srcdir='$srcdir'
27412INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027413_ACEOF
27414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027415cat >>$CONFIG_STATUS <<\_ACEOF
27416# If no file are specified by the user, then we need to provide default
27417# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027418ac_need_defaults=:
27419while test $# != 0
27420do
27421 case $1 in
27422 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27424 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027425 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027426 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027427 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027428 ac_option=$1
27429 ac_optarg=$2
27430 ac_shift=shift
27431 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027432 esac
27433
Skip Montanaro6dead952003-09-25 14:50:04 +000027434 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027435 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027436 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27437 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027438 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027439 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027440 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027441 debug=: ;;
27442 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027443 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027444 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027445 ac_need_defaults=false;;
27446 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027447 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027448 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027449 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027450 --he | --h)
27451 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027452 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027453Try \`$0 --help' for more information." >&2
27454 { (exit 1); exit 1; }; };;
27455 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027456 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027457 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27458 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27459 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027460
27461 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027462 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027463Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027464 { (exit 1); exit 1; }; } ;;
27465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027466 *) ac_config_targets="$ac_config_targets $1"
27467 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027468
27469 esac
27470 shift
27471done
27472
Skip Montanaro6dead952003-09-25 14:50:04 +000027473ac_configure_extra_args=
27474
27475if $ac_cs_silent; then
27476 exec 6>/dev/null
27477 ac_configure_extra_args="$ac_configure_extra_args --silent"
27478fi
27479
27480_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027481cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027482if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027483 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27484 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027485 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027486 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027487fi
27488
Martin v. Löwis11437992002-04-12 09:54:03 +000027489_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027490cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027491exec 5>>config.log
27492{
27493 echo
27494 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27495## Running $as_me. ##
27496_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027497 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027498} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027502_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027503
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027504cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027505
27506# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027507for ac_config_target in $ac_config_targets
27508do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027509 case $ac_config_target in
27510 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27511 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27512 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027513 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27514 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027515 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27516 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027517 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027519 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27520echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027521 { (exit 1); exit 1; }; };;
27522 esac
27523done
27524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027525
Martin v. Löwis11437992002-04-12 09:54:03 +000027526# If the user did not use the arguments to specify the items to instantiate,
27527# then the envvar interface is used. Set only those that are not.
27528# We use the long form for the default assignment because of an extremely
27529# bizarre bug on SunOS 4.1.3.
27530if $ac_need_defaults; then
27531 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27532 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27533fi
27534
Skip Montanaro6dead952003-09-25 14:50:04 +000027535# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027536# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027537# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027538# Hook for its removal unless debugging.
27539# Note that there is a small window in which the directory will not be cleaned:
27540# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027541$debug ||
27542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027543 tmp=
27544 trap 'exit_status=$?
27545 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027547 trap '{ (exit 1); exit 1; }' 1 2 13 15
27548}
Martin v. Löwis11437992002-04-12 09:54:03 +000027549# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027550
Martin v. Löwis11437992002-04-12 09:54:03 +000027551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027552 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027553 test -n "$tmp" && test -d "$tmp"
27554} ||
27555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027556 tmp=./conf$$-$RANDOM
27557 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027558} ||
27559{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027560 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027561 { (exit 1); exit 1; }
27562}
27563
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027564#
27565# Set up the sed scripts for CONFIG_FILES section.
27566#
27567
27568# No need to generate the scripts if there are no CONFIG_FILES.
27569# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027570if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027571
27572_ACEOF
27573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027576ac_delim='%!_!# '
27577for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027578 cat >conf$$subs.sed <<_ACEOF
27579SHELL!$SHELL$ac_delim
27580PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27581PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27582PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27583PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27584PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27585PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27586exec_prefix!$exec_prefix$ac_delim
27587prefix!$prefix$ac_delim
27588program_transform_name!$program_transform_name$ac_delim
27589bindir!$bindir$ac_delim
27590sbindir!$sbindir$ac_delim
27591libexecdir!$libexecdir$ac_delim
27592datarootdir!$datarootdir$ac_delim
27593datadir!$datadir$ac_delim
27594sysconfdir!$sysconfdir$ac_delim
27595sharedstatedir!$sharedstatedir$ac_delim
27596localstatedir!$localstatedir$ac_delim
27597includedir!$includedir$ac_delim
27598oldincludedir!$oldincludedir$ac_delim
27599docdir!$docdir$ac_delim
27600infodir!$infodir$ac_delim
27601htmldir!$htmldir$ac_delim
27602dvidir!$dvidir$ac_delim
27603pdfdir!$pdfdir$ac_delim
27604psdir!$psdir$ac_delim
27605libdir!$libdir$ac_delim
27606localedir!$localedir$ac_delim
27607mandir!$mandir$ac_delim
27608DEFS!$DEFS$ac_delim
27609ECHO_C!$ECHO_C$ac_delim
27610ECHO_N!$ECHO_N$ac_delim
27611ECHO_T!$ECHO_T$ac_delim
27612LIBS!$LIBS$ac_delim
27613build_alias!$build_alias$ac_delim
27614host_alias!$host_alias$ac_delim
27615target_alias!$target_alias$ac_delim
27616VERSION!$VERSION$ac_delim
27617SOVERSION!$SOVERSION$ac_delim
27618CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27619UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27620ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27621PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27622PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27623PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27624PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27625PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27626FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27627FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27628FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27629FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27630FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27631MACHDEP!$MACHDEP$ac_delim
27632SGI_ABI!$SGI_ABI$ac_delim
27633CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27634EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27635CC!$CC$ac_delim
27636CFLAGS!$CFLAGS$ac_delim
27637LDFLAGS!$LDFLAGS$ac_delim
27638CPPFLAGS!$CPPFLAGS$ac_delim
27639ac_ct_CC!$ac_ct_CC$ac_delim
27640EXEEXT!$EXEEXT$ac_delim
27641OBJEXT!$OBJEXT$ac_delim
27642CXX!$CXX$ac_delim
27643MAINCC!$MAINCC$ac_delim
27644CPP!$CPP$ac_delim
27645GREP!$GREP$ac_delim
27646EGREP!$EGREP$ac_delim
27647BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27648LIBRARY!$LIBRARY$ac_delim
27649LDLIBRARY!$LDLIBRARY$ac_delim
27650DLLLIBRARY!$DLLLIBRARY$ac_delim
27651BLDLIBRARY!$BLDLIBRARY$ac_delim
27652LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27653INSTSONAME!$INSTSONAME$ac_delim
27654RUNSHARED!$RUNSHARED$ac_delim
27655LINKCC!$LINKCC$ac_delim
27656GNULD!$GNULD$ac_delim
27657RANLIB!$RANLIB$ac_delim
27658AR!$AR$ac_delim
27659ARFLAGS!$ARFLAGS$ac_delim
27660SVNVERSION!$SVNVERSION$ac_delim
27661INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27662INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27663INSTALL_DATA!$INSTALL_DATA$ac_delim
27664LN!$LN$ac_delim
27665OPT!$OPT$ac_delim
27666BASECFLAGS!$BASECFLAGS$ac_delim
27667UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27668OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27669LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27670SO!$SO$ac_delim
27671LDSHARED!$LDSHARED$ac_delim
27672BLDSHARED!$BLDSHARED$ac_delim
27673CCSHARED!$CCSHARED$ac_delim
27674LINKFORSHARED!$LINKFORSHARED$ac_delim
27675CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27676_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027677
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027678 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027679 break
27680 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027681 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27682echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027683 { (exit 1); exit 1; }; }
27684 else
27685 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027686 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027687done
27688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027689ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27690if test -n "$ac_eof"; then
27691 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27692 ac_eof=`expr $ac_eof + 1`
27693fi
27694
27695cat >>$CONFIG_STATUS <<_ACEOF
27696cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27697/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027698_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027699sed '
27700s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27701s/^/s,@/; s/!/@,|#_!!_#|/
27702:n
27703t n
27704s/'"$ac_delim"'$/,g/; t
27705s/$/\\/; p
27706N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27707' >>$CONFIG_STATUS <conf$$subs.sed
27708rm -f conf$$subs.sed
27709cat >>$CONFIG_STATUS <<_ACEOF
27710CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027711_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027712
27713
27714ac_delim='%!_!# '
27715for ac_last_try in false false false false false :; do
27716 cat >conf$$subs.sed <<_ACEOF
27717SHLIBS!$SHLIBS$ac_delim
27718USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27719SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27720USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27721LDLAST!$LDLAST$ac_delim
27722THREADOBJ!$THREADOBJ$ac_delim
27723DLINCLDIR!$DLINCLDIR$ac_delim
27724DYNLOADFILE!$DYNLOADFILE$ac_delim
27725MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27726TRUE!$TRUE$ac_delim
27727LIBOBJS!$LIBOBJS$ac_delim
27728HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27729HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27730HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27731HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27732HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27733LIBM!$LIBM$ac_delim
27734LIBC!$LIBC$ac_delim
27735THREADHEADERS!$THREADHEADERS$ac_delim
27736SRCDIRS!$SRCDIRS$ac_delim
27737LTLIBOBJS!$LTLIBOBJS$ac_delim
27738_ACEOF
27739
27740 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27741 break
27742 elif $ac_last_try; then
27743 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27744echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027745 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027746 else
27747 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27748 fi
27749done
27750
27751ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27752if test -n "$ac_eof"; then
27753 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27754 ac_eof=`expr $ac_eof + 1`
27755fi
27756
27757cat >>$CONFIG_STATUS <<_ACEOF
27758cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27759/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027760_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027761sed '
27762s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27763s/^/s,@/; s/!/@,|#_!!_#|/
27764:n
27765t n
27766s/'"$ac_delim"'$/,g/; t
27767s/$/\\/; p
27768N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27769' >>$CONFIG_STATUS <conf$$subs.sed
27770rm -f conf$$subs.sed
27771cat >>$CONFIG_STATUS <<_ACEOF
27772:end
27773s/|#_!!_#|//g
27774CEOF$ac_eof
27775_ACEOF
27776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027777
27778# VPATH may cause trouble with some makes, so we remove $(srcdir),
27779# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27780# trailing colons and then remove the whole line if VPATH becomes empty
27781# (actually we leave an empty line to preserve line numbers).
27782if test "x$srcdir" = x.; then
27783 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27784s/:*\$(srcdir):*/:/
27785s/:*\${srcdir}:*/:/
27786s/:*@srcdir@:*/:/
27787s/^\([^=]*=[ ]*\):*/\1/
27788s/:*$//
27789s/^[^=]*=[ ]*$//
27790}'
27791fi
27792
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027793cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027794fi # test -n "$CONFIG_FILES"
27795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027797for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027798do
27799 case $ac_tag in
27800 :[FHLC]) ac_mode=$ac_tag; continue;;
27801 esac
27802 case $ac_mode$ac_tag in
27803 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027804 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27805echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 { (exit 1); exit 1; }; };;
27807 :[FH]-) ac_tag=-:-;;
27808 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27809 esac
27810 ac_save_IFS=$IFS
27811 IFS=:
27812 set x $ac_tag
27813 IFS=$ac_save_IFS
27814 shift
27815 ac_file=$1
27816 shift
27817
27818 case $ac_mode in
27819 :L) ac_source=$1;;
27820 :[FH])
27821 ac_file_inputs=
27822 for ac_f
27823 do
27824 case $ac_f in
27825 -) ac_f="$tmp/stdin";;
27826 *) # Look for the file first in the build tree, then in the source tree
27827 # (if the path is not absolute). The absolute path cannot be DOS-style,
27828 # because $ac_f cannot contain `:'.
27829 test -f "$ac_f" ||
27830 case $ac_f in
27831 [\\/$]*) false;;
27832 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27833 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027834 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27835echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027836 { (exit 1); exit 1; }; };;
27837 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027838 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027839 done
27840
27841 # Let's still pretend it is `configure' which instantiates (i.e., don't
27842 # use $as_me), people would be surprised to read:
27843 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027844 configure_input="Generated from "`IFS=:
27845 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027846 if test x"$ac_file" != x-; then
27847 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027848 { echo "$as_me:$LINENO: creating $ac_file" >&5
27849echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027850 fi
27851
27852 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027853 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027854 esac
27855 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027856 esac
27857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027859$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027860 X"$ac_file" : 'X\(//\)[^/]' \| \
27861 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027862 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027863echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027864 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27865 s//\1/
27866 q
27867 }
27868 /^X\(\/\/\)[^/].*/{
27869 s//\1/
27870 q
27871 }
27872 /^X\(\/\/\)$/{
27873 s//\1/
27874 q
27875 }
27876 /^X\(\/\).*/{
27877 s//\1/
27878 q
27879 }
27880 s/.*/./; q'`
27881 { as_dir="$ac_dir"
27882 case $as_dir in #(
27883 -*) as_dir=./$as_dir;;
27884 esac
27885 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027886 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027887 while :; do
27888 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027889 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027890 *) as_qdir=$as_dir;;
27891 esac
27892 as_dirs="'$as_qdir' $as_dirs"
27893 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027894$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027895 X"$as_dir" : 'X\(//\)[^/]' \| \
27896 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027897 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027898echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027899 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27900 s//\1/
27901 q
27902 }
27903 /^X\(\/\/\)[^/].*/{
27904 s//\1/
27905 q
27906 }
27907 /^X\(\/\/\)$/{
27908 s//\1/
27909 q
27910 }
27911 /^X\(\/\).*/{
27912 s//\1/
27913 q
27914 }
27915 s/.*/./; q'`
27916 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027917 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027918 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027919 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27920echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027921 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027922 ac_builddir=.
27923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027924case "$ac_dir" in
27925.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27926*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027927 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027928 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027929 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027930 case $ac_top_builddir_sub in
27931 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27932 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27933 esac ;;
27934esac
27935ac_abs_top_builddir=$ac_pwd
27936ac_abs_builddir=$ac_pwd$ac_dir_suffix
27937# for backward compatibility:
27938ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027939
27940case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027941 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027942 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027943 ac_top_srcdir=$ac_top_builddir_sub
27944 ac_abs_top_srcdir=$ac_pwd ;;
27945 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027946 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027947 ac_top_srcdir=$srcdir
27948 ac_abs_top_srcdir=$srcdir ;;
27949 *) # Relative name.
27950 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27951 ac_top_srcdir=$ac_top_build_prefix$srcdir
27952 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027953esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027954ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027955
Martin v. Löwis11437992002-04-12 09:54:03 +000027956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027957 case $ac_mode in
27958 :F)
27959 #
27960 # CONFIG_FILE
27961 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027962
27963 case $INSTALL in
27964 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027965 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027966 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027967_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027968
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027969cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027970# If the template does not know about datarootdir, expand it.
27971# FIXME: This hack should be removed a few years after 2.60.
27972ac_datarootdir_hack=; ac_datarootdir_seen=
27973
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027974case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027975 p
27976 q
27977}
27978/@datadir@/p
27979/@docdir@/p
27980/@infodir@/p
27981/@localedir@/p
27982/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027983' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027984*datarootdir*) ac_datarootdir_seen=yes;;
27985*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027986 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27987echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027988_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027989cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027990 ac_datarootdir_hack='
27991 s&@datadir@&$datadir&g
27992 s&@docdir@&$docdir&g
27993 s&@infodir@&$infodir&g
27994 s&@localedir@&$localedir&g
27995 s&@mandir@&$mandir&g
27996 s&\\\${datarootdir}&$datarootdir&g' ;;
27997esac
27998_ACEOF
27999
28000# Neutralize VPATH when `$srcdir' = `.'.
28001# Shell code in configure.ac might set extrasub.
28002# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028003cat >>$CONFIG_STATUS <<_ACEOF
28004 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028005$extrasub
28006_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028007cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028008:t
28009/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028010s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028011s&@top_builddir@&$ac_top_builddir_sub&;t t
28012s&@srcdir@&$ac_srcdir&;t t
28013s&@abs_srcdir@&$ac_abs_srcdir&;t t
28014s&@top_srcdir@&$ac_top_srcdir&;t t
28015s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28016s&@builddir@&$ac_builddir&;t t
28017s&@abs_builddir@&$ac_abs_builddir&;t t
28018s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28019s&@INSTALL@&$ac_INSTALL&;t t
28020$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028021" $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 +000028022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028023test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28024 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28025 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028026 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028027which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028028echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028029which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028031 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028032 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028033 -) cat "$tmp/out"; rm -f "$tmp/out";;
28034 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28035 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028036 ;;
28037 :H)
28038 #
28039 # CONFIG_HEADER
28040 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028041_ACEOF
28042
28043# Transform confdefs.h into a sed script `conftest.defines', that
28044# substitutes the proper values into config.h.in to produce config.h.
28045rm -f conftest.defines conftest.tail
28046# First, append a space to every undef/define line, to ease matching.
28047echo 's/$/ /' >conftest.defines
28048# Then, protect against being on the right side of a sed subst, or in
28049# an unquoted here document, in config.status. If some macros were
28050# called several times there might be several #defines for the same
28051# symbol, which is useless. But do not sort them, since the last
28052# AC_DEFINE must be honored.
28053ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28054# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28055# NAME is the cpp macro being defined, VALUE is the value it is being given.
28056# PARAMS is the parameter list in the macro definition--in most cases, it's
28057# just an empty string.
28058ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28059ac_dB='\\)[ (].*,\\1define\\2'
28060ac_dC=' '
28061ac_dD=' ,'
28062
28063uniq confdefs.h |
28064 sed -n '
28065 t rset
28066 :rset
28067 s/^[ ]*#[ ]*define[ ][ ]*//
28068 t ok
28069 d
28070 :ok
28071 s/[\\&,]/\\&/g
28072 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28073 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28074 ' >>conftest.defines
28075
28076# Remove the space that was appended to ease matching.
28077# Then replace #undef with comments. This is necessary, for
28078# example, in the case of _POSIX_SOURCE, which is predefined and required
28079# on some systems where configure will not decide to define it.
28080# (The regexp can be short, since the line contains either #define or #undef.)
28081echo 's/ $//
28082s,^[ #]*u.*,/* & */,' >>conftest.defines
28083
28084# Break up conftest.defines:
28085ac_max_sed_lines=50
28086
28087# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28088# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28089# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28090# et cetera.
28091ac_in='$ac_file_inputs'
28092ac_out='"$tmp/out1"'
28093ac_nxt='"$tmp/out2"'
28094
28095while :
28096do
28097 # Write a here document:
28098 cat >>$CONFIG_STATUS <<_ACEOF
28099 # First, check the format of the line:
28100 cat >"\$tmp/defines.sed" <<\\CEOF
28101/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28102/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28103b
28104:def
28105_ACEOF
28106 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28107 echo 'CEOF
28108 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28109 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28110 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28111 grep . conftest.tail >/dev/null || break
28112 rm -f conftest.defines
28113 mv conftest.tail conftest.defines
28114done
28115rm -f conftest.defines conftest.tail
28116
28117echo "ac_result=$ac_in" >>$CONFIG_STATUS
28118cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028119 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028120 echo "/* $configure_input */" >"$tmp/config.h"
28121 cat "$ac_result" >>"$tmp/config.h"
28122 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28123 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28124echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028125 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028126 rm -f $ac_file
28127 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028128 fi
28129 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028130 echo "/* $configure_input */"
28131 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028132 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028133 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028134 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028136
28137 esac
28138
28139done # for ac_tag
28140
Guido van Rossum627b2d71993-12-24 10:39:16 +000028141
Martin v. Löwis11437992002-04-12 09:54:03 +000028142{ (exit 0); exit 0; }
28143_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028144chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028145ac_clean_files=$ac_clean_files_save
28146
28147
28148# configure is writing to config.log, and then calls config.status.
28149# config.status does its own redirection, appending to config.log.
28150# Unfortunately, on DOS this fails, as config.log is still kept open
28151# by configure, so config.status won't be able to write to it; its
28152# output is simply discarded. So we exec the FD to /dev/null,
28153# effectively closing config.log, so it can be properly (re)opened and
28154# appended to by config.status. When coming back to configure, we
28155# need to make the FD available again.
28156if test "$no_create" != yes; then
28157 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028158 ac_config_status_args=
28159 test "$silent" = yes &&
28160 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028161 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028162 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028163 exec 5>>config.log
28164 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28165 # would make configure fail if this is the last instruction.
28166 $ac_cs_success || { (exit 1); exit 1; }
28167fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028168
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028169
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028170echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028171if test ! -f Modules/Setup
28172then
28173 cp $srcdir/Modules/Setup.dist Modules/Setup
28174fi
28175
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028176echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028177if test ! -f Modules/Setup.local
28178then
28179 echo "# Edit this file for local setup changes" >Modules/Setup.local
28180fi
28181
28182echo "creating Makefile"
28183$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28184 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028185 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028186mv config.c Modules